Custom Instrument

PHRINGE provides a couple predefined Instrument``s, but also allows the creation of custom instruments. This requires the specification of the ``array_configuration_matrix, the complex_amplitude_transfer_matrix and the kernels arguments,

inst = Instrument(
    array_configuration_matrix=acm,
    complex_amplitude_transfer_matrix=catm,
    kernels=kernels
    aperture_diameter=aperture_diameter,
    nulling_baseline_max=nulling_baseline_max,
    nulling_baseline_min=nulling_baseline_min,
    quantum_efficiency=quantum_efficiency,
    spectral_resolving_power=spectral_resolving_power,
    throughput=throughput,
    wavelength_min=Union[str, float, Quantity],
    wavelength_max=Union[str, float, Quantity]
)

as described in the Instrument documentation. This page explains how to specify these arguments.

Array Configuration Matrix

The array configuration matrix describes the time-dependent positions of the collector spacecraft. It has the shape (2 x N_collectors); the two rows corresponding to the x and y coordinates. The matrix is usually a function of time, t, the modulation period of the array, tm^ and the nulling baseline, b.

For instance, the baseline design of LIFE features a rotating Emma-X configuration features 4 collectors arranged in an X-shape. We can express this as

\[\begin{split}\mathbf{A}(t, t_m, b) = \frac{b}{2}\begin{bmatrix} \cos(2\pi t/t_m) & -\sin(2\pi t/t_m)\\ \sin(2\pi t/t_m) & \cos(2\pi t/t_m) \end{bmatrix} \begin{bmatrix} q & q & -q & -q\\ 1 & -1 & -1 & 1 \end{bmatrix},\end{split}\]

where q = 6 is the baseline ratio, i.e. the ratio between the imaging and the nulling baselines.

We define this equivalently in Python as

t, tm, b = symbols('t tm b')

q = 6

acm = (b / 2
       * Matrix([[cos(2 * pi / tm * t), -sin(2 * pi / tm * t)],
                 [sin(2 * pi / tm * t), cos(2 * pi / tm * t)]])
       * Matrix([[q, q, -q, -q],
                 [1, -1, -1, 1]]))

Beam Combination Transfer Matrix

The beam combination transfer matrix has the shape (N_inputs x N_outputs), where N_inputs is equal to the number of collectors, N_collectors, and N_outputs is the number of outputs, and describes how the input beams are combined to form the outputs. For instance, a dual Bracewell nuller with four inputs and four outputs is described by

\[\begin{split}\mathbf{CATM} = \frac{1}{2}\begin{bmatrix} 0 & 0 & \sqrt{2} & \sqrt{2}\\ \sqrt{2} & \sqrt{2} & 0 & 0\\ 1 & -1 & -\exp(i \pi / 2) & \exp(i \pi / 2)\\ 1 & -1 & \exp(i \pi / 2) & -\exp(i \pi / 2) \end{bmatrix}.\end{split}\]

We define this equivalently in Python as

catm = 1 / 2 * Matrix([[0, 0, sqrt(2), sqrt(2)],
                   [sqrt(2), sqrt(2), 0, 0],
                   [1, -1, -exp(I * pi / 2), exp(I * pi / 2)],
                   [1, -1, exp(I * pi / 2), -exp(I * pi / 2)]])

Kernels

The kernels are created by the difference of pairwise outputs of the beam combiner. Different beam combiners can have different numbers of differential outputs. They are specified in PHRINGE as matrix of shape (N_kernels x N_inputs). For instance, the dual Bracewell nuller has one differnetial output formed by the third and fourth outputs. Thus:

kernels = Matrix([[0, 0, 1, -1]])

With indices starting at 0 in Python, this corresponds to the third and fourth outputs.

Separation at Maximum Modulation Efficiency

The separation at maximum modulation efficiency describes the angular separation at which the instrument response modulates most efficiently. It is only used to calculate the optimal nulling baseline length. For instance, for a dual Bracewell nuller, the angular separation for which the modulation efficiency is maximized is given by (Dannert et al. 2022)

\[\theta_{\text{max}} \approx 0.6 \frac{\lambda}{b},\]

where \(\lambda\) is the wavelength and \(b\) is the nulling baseline.

We specify this in Python as a list containing the coefficient in front of the wavelength:

sep_at_max_mod_eff = [0.6]

Note that this list must contain a value for each differential output; they are usually different for different outputs.

Note

These coefficients can be calculated by calculating the RMS of the instrument response throughout the observation and plotting it as a function of angular separation. The maximum of this curve corresponds to the coefficient.

They can then be used to get the optimal nulling baseline as follows:

nulling_baseline=OptimalNullingBaseline(  # Alternatively a fixed value, e.g. 10 * u.m
    angular_star_separation=0.1 * u.arcsec,
    wavelength=10 * u.um,
    sep_at_max_mod_eff=sep_at_max_mod_eff[0] # Index corresponding to kernel index to be optimized for
),