hera_sim.cli_utils.write_calfits¶
- hera_sim.cli_utils.write_calfits(gains, filename, sim=None, freqs=None, times=None, x_orientation='north', clobber=False)[source]¶
Write gains to disk as a calfits file.
- Parameters:
gains (dict) – Dictionary mapping antenna numbers or (ant, pol) tuples to gains. Gains may either be spectra or waterfalls.
filename (str) – Name of file, including desired extension.
sim (
pyuvdata.UVData
instance orSimulator
instance) – Object containing metadata pertaining to the gains to be saved. Does not need to be provided if bothfreqs
andtimes
are provided.freqs (array-like of float) – Frequencies corresponding to gains, in Hz. Does not need to be provided if
sim
is provided.times (array-like of float) – Times corresponding to gains, in JD. Does not need to be provided if
sim
is provided.x_orientation (str, optional) – Cardinal direction that the x-direction corresponds to. Defaults to the HERA configuration of north.
clobber (bool, optional) – Whether to overwrite existing file in the case of a name conflict. Default is to not overwrite conflicting files.