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)¶
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.UVDatainstance orSimulatorinstance) – Object containing metadata pertaining to the gains to be saved. Does not need to be provided if bothfreqsandtimesare provided.freqs (array-like of float) – Frequencies corresponding to gains, in Hz. Does not need to be provided if
simis provided.times (array-like of float) – Times corresponding to gains, in JD. Does not need to be provided if
simis 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.