Utility

processing_library.util Package

Functions

average_chunks(arr, wts, chunksize)

Average the array arr with weights by chunks

average_chunks2(arr, wts, chunksize)

Average the two dimensional array arr with weights by chunks

azel_to_hadec(az, el, latitude)

Converting Az El to HA Dec

baselines(ants_uvw)

Compute baselines in uvw co-ordinate system from uvw co-ordinate system station positions

calculate_initial_compass_bearing(pointA, pointB)

Calculates the bearing between two points.

get_size(obj)

hadec_to_azel(ha, dec, latitude)

Convert HA Dec to Az El

insert_array(im, x, y, flux[, bandwidth, …])

Insert point into image using specified function

insert_function_L(x[, a])

insert_function_pswf(x[, a])

insert_function_sinc(x)

lmn_to_skycoord(lmn, phasecentre)

Convert l,m,n coordinate system + phascentre to astropy sky coordinate relative to a phase centre.

pa_z(ha, dec, lat)

Calculate parallactic angle and zenith angle of source at ha, dec observed from site at latitude dec

parallactic_angle(ha, dec, lat)

Calculate parallactic angle of source at ha, dec observed from site at latitude dec

simulate_point(dist_uvw, l, m)

Simulate visibilities for unit amplitude point source at direction cosines (l,m) relative to the phase centre.

skycoord_to_lmn(pos, phasecentre)

Convert astropy sky coordinates into the l,m,n coordinate system relative to a phase centre.

tukey_filter(x, r)

Calculate the Tukey (tapered cosine) filter

uvw_to_xyz(uvw, ha, dec)

Rotate \((x,y,z)\) positions relative to a sky position at \((ha, dec)\) to earth coordinates.

uvw_transform(uvw, transform_matrix)

Transforms UVW baseline coordinates such that the image is transformed with the given matrix.

visibility_shift(uvw, vis, dl, dm)

Shift visibilities by the given image-space distance.

xyz_at_latitude(local_xyz, lat)

Rotate local XYZ coordinates into celestial XYZ coordinates.

xyz_to_baselines(ants_xyz, ha_range, dec)

Calculate baselines in \((u,v,w)\) co-ordinate system for a range of hour angles (i.e.

xyz_to_uvw(xyz, ha, dec)

Rotate \((x,y,z)\) positions in earth coordinates to \((u,v,w)\) coordinates relative to astronomical source position \((ha, dec)\).