Source code for beam_settings

from enum import Enum, auto

[docs] class BeamTypes(Enum): """ Enumeration of beam types used in WODEN. This class allows us to label the WODEN primary beam models with a unique name/value, but as it's an enum each label only takes 8 bytes of memory, so we can stack loads of them into an array. We can also do numpy operations on them like np.where. Attributes: NO_BEAM (int): No beam type. GAUSS_BEAM (int): Gaussian beam type. FEE_BEAM (int): FEE beam type. ANALY_DIPOLE (int): Analytical dipole beam type. FEE_BEAM_INTERP (int): Interpolated FEE beam type. MWA_ANALY (int): MWA analytical beam type. EB_OSKAR (int): EveryBeam OSKAR beam type. EB_LOFAR (int): EveryBeam LOFAR beam type. EB_MWA (int): EveryBeam MWA beam type. """ NO_BEAM = 0 GAUSS_BEAM = 1 FEE_BEAM = 2 ANALY_DIPOLE = 3 FEE_BEAM_INTERP = 4 MWA_ANALY = 5 EB_OSKAR = 6 EB_LOFAR = 7 EB_MWA = 8
[docs] class BeamGroups: """A class to represent different groups of beam types. Each group contains a list of `BeamTypes` values that are used in WODEN. Attributes ---------- eb_beam_values : list All the EveryBeam beam types. azza_beam_values : list All beams that need azimuth/altitude calculated before sending to GPU. hadec_beam_values : list All beams that need Hour Angle/Declination calculated/filled before sending to GPU. off_cardinal_beam_values : list All beams that have off-cardinal dipole alignments, e.g. not N/S or E/W at 0,90 degrees, but rather 45, 135 degrees (e.g. LOFAR). """ eb_beam_values = [BeamTypes.EB_OSKAR.value, BeamTypes.EB_LOFAR.value, BeamTypes.EB_MWA.value] azza_beam_values = [BeamTypes.MWA_ANALY.value, BeamTypes.FEE_BEAM.value, BeamTypes.FEE_BEAM_INTERP.value, BeamTypes.ANALY_DIPOLE.value] hadec_beam_values = [BeamTypes.GAUSS_BEAM.value, BeamTypes.MWA_ANALY.value] off_cardinal_beam_values = [BeamTypes.EB_LOFAR.value]