Calibration utilities
Definition of the calibration interface.
- calibration.calibration.apriorical(filename, sourcename, bandwidth, debias=True, remove_autocorr=True, SNR_cut=0.0, station_codes={}, return_coords=False, **kwargs)[source]
Read an alist data file and carry out a priori flux density calibration.
- Parameters
filename (str) – The name of the input alist data file
sourcename (str) – The name of the source whose data to calibrate
bandwidth (float) – The bandwidth over which the data have been averaged, in GHz
debias (bool) – Flag for whether to debias the amplitudes stored in the alist file
remove_autocorr (bool) – Flag for whether to remove autocorrelations during calibration
SNR_cut (float) – SNR cut to apply
station_codes (dict) – Dictionary containing conversions between single- and multi-letter station codes
return_coords (bool) – Flag for whether to return RA and DEC of the source
- Returns
pandas DataFrame containing the calibrated data and associated metainfo
- Return type
(pandas.DataFrame)
- calibration.calibration.argunique(array)[source]
Return the indices associated with the unique elements of an array. Analogous in spirit to functions like argmin and argsort.
Args: array (numpy.array): The array for which to return the unique-element arguments
Returns: (numpy.array): An array of arguments for each unique element
- calibration.calibration.write_dlist(filename, sourcename, bandwidth, outname, debias=True, remove_autocorr=True, SNR_cut=0.0, station_codes={}, **kwargs)[source]
Write a “dlist” data file from an “alist” file.
- Parameters
filename (str) – The name of the input alist data file
sourcename (str) – The name of the source whose data to calibrate
bandwidth (float) – The bandwidth over which the data have been averaged, in GHz
outname (str) – The name of the output dlist data file
debias (bool) – Flag for whether to debias the amplitudes stored in the alist file
remove_autocorr (bool) – Flag for whether to remove autocorrelations during calibration
SNR_cut (float) – SNR cut to apply
station_codes (dict) – Dictionary containing conversions between single- and multi-letter station codes
- Returns
Writes a dlist file to disk