positions#
Methods related to positions (injections and references).
- hsr4hci.positions.get_injection_position(separation, azimuthal_position)[source]#
Get the position (in astronomical polar coordinates) at which to inject a fake planet; specified by the separation and an identifier for the
azimuthal_position.While this function is not particularly complicated, it helps to ensure consistency across different parts of the code base.
- Parameters:
separation (Quantity) – The separation from the origin / star at the center.
azimuthal_position (str) – A string specifying the azimuthal position. There are six valid positions, denoted by “a”, “b”, …, “f”, which are at positions 9 o’clock, 11 o’clock, …, 4 o’clock. There are only six such positions, because at the smallest (meaningful) separation, exactly 6 apertures can be placed.
- Returns:
A tuple (separation, position_angle) with the desired injection position.
- Return type:
- hsr4hci.positions.get_reference_positions(polar_position, aperture_radius, exclusion_angle=None)[source]#
Get a list of reference positions for the given
polar_position.If the
polar_positionis the position of a suspected planet signal, then the reference positions can be used to estimate the noise at this separation to compute the signal-to-noise ratio.- Parameters:
polar_position (Tuple[Quantity, Quantity]) – A tuple (separation, position_angle) that specifies the target position for which the reference positions are computed.
aperture_radius (Quantity) – The radius of the apertures that are used to do the photometry. Traditionally, a common choice is to use apertures with a diameter of \(1\,\lambda / D\). To ensure that the samples are actually independent, one should probably base the size of the apertures on the size of the PSF of the data set (e.g., a diameter of 1 FWHM).
exclusion_angle (Optional[Quantity]) – The angle around the
polar_positionswhere no reference positions are placed. This can be used, for example, to ignore the “neighbors” of the target position which, in the case of PCA-based PSF subtraction, often contain negative “wings” that would bias the computation of the SNR. The exclusion angle is centered on thepolar_position, that is, exclusion_angle / 2 to the left and to the right of thepolar_positiondo not contain reference positions. Ifexclusion_angleis set to None, the exclusion angle is automatically determined to exclude the immediate neighbors of thepolar_position(this is the default behavior).
- Returns:
A list of polar positions (i.e., tuples (separation, position_angle)) that can be used as reference positions for the given
polar_position.- Return type:
- hsr4hci.positions.rotate_reference_positions(reference_positions, n_steps)[source]#
Rotate a given list of
reference_positions.The positions returned by
get_reference_positions()are somewhat arbitrary, as they depend, for example, on an arbitrary choice of the exclusion angle. Experiments have shown that the exact placement of the reference apertures can have an unreasonably large effect on the SNR; meaning that an already slightly different (and arguably just as valid) choice of the reference positions can result in a significantly different SNR. For this reason, this function allows us to add some variation to the placement of the reference positions: we drop one reference position and then rotate the remaining positions over the opening angle of the dropped position / aperture. Using this function, we can compute multiple SNRs for a signal candidate, and average them or look at the standard deviation to get a feeling for how much the SNR depends on the exact placement of the reference apertures.- Parameters:
- Returns:
A list where each element is a list containing one rotated version of the
reference_positions(including the originalreference_positions, which corresponds to a zero rotation).- Return type: