astrohack.utils.imaging
Functions
|
Converts a direction and zenith (frame FK5) to a topocentric Altitude-Azimuth (https://docs.astropy.org/en/stable/api/astropy.coordinates.AltAz.html) |
|
Uses samples of parallactic angle (PA) values to correct differences in PA between maps. The reference PA is |
|
Calculates the aperture illumination pattern from the beam data. |
|
" Calculates the aperture illumination pattern from the near_fiedl beam data. |
Module Contents
- calculate_parallactic_angle_chunk(time_samples, observing_location, direction, dir_frame='FK5', zenith_frame='FK5')[source]
Converts a direction and zenith (frame FK5) to a topocentric Altitude-Azimuth (https://docs.astropy.org/en/stable/api/astropy.coordinates.AltAz.html) frame centered at the observing_location (frame ITRF) for a UTC time. The parallactic angles is calculated as the position angle of the Altitude-Azimuth direction and zenith.
- Parameters:
time_samples (str np.array, [n_time], 'YYYY-MM-DDTHH:MM:SS.SSS') – UTC time series. Example ‘2019-10-03T19:00:00.000’.
observing_location (int np.array, [3], [x,y,z], meters) – ITRF geocentric coordinates.
direction (float np.array, [n_time,2], [time,ra,dec], radians) – The pointing direction.
dir_frame (frame of refecerence of the direction)
zenith_frame (Frame of reference of Zenith's coordinates?)
- Returns:
parallactic_angles – An array of parallactic angles.
- Return type:
float np.array, [n_time], radians
- parallactic_derotation(data, parallactic_angle_dict)[source]
Uses samples of parallactic angle (PA) values to correct differences in PA between maps. The reference PA is selected to be the first maps median parallactic angle. All values are rotated to this PA value using scipy.ndimage.rotate(…)
Args: data (numpy.ndarray): beam data grid (map, chan, pol, l, m) parallactic_angle_dict (dict): dictionary containing antenna selected xds from which the parallactic angle samples are retrieved ==> [map](xds), here the map referred to the map values not the map index.
- Returns:
rotation adjusted beam data grid
- Return type:
numpy.ndarray
- calculate_far_field_aperture(grid, padding_factor, freq, telescope, sky_cell_size, apply_grid_correction, label)[source]
Calculates the aperture illumination pattern from the beam data.
- Parameters:
grid (numpy.ndarray) – gridded beam data
padding_factor (int, optional) – Padding to apply to beam data grid before FFT. Padding is applied on outer edged of each beam data grid and not between layers. Defaults to 20.
freq – Beam grid frequency axis
telescope – telescope object with optical parameters
sky_cell_size – Sky cell size (radians)
apply_grid_correction – Apply grid correction (True for gaussian convolution of the beam)
label – Data label for messages
- Returns:
aperture grid, u-coordinate array, v-coordinate array, aperture cell size, representative wavelength
- calculate_near_field_aperture(grid, sky_cell_size, distance, freq, padding_factor, focus_offset, telescope, apply_grid_correction, label, apodize=True)[source]
“ Calculates the aperture illumination pattern from the near_fiedl beam data.
- Parameters:
grid (numpy.ndarray) – gridded beam data
sky_cell_size (float) – incremental spacing between lm values, i.e. delta_l = l_(n+1) - l_(n)
padding_factor (int, optional) – Padding to apply to beam data grid before FFT. Padding is applied on outer edges of each beam data grid and not between layers. Defaults to 20.
distance – distance to holographic tower
focus_offset – Offset from primary focus on holographic receiver
freq – Beam grid frequency axis
telescope – telescope object with optical parameters
apply_grid_correction – Apply grid correction (True for gaussian convolution of the beam)
apodize – Apodize beam to avoid boxing effects in the FFT (the dashed line cross)
label – Data label for messages
- Returns:
aperture grid, u-coordinate array, v-coordinate array, aperture cell size, representative wavelength