MultiBeamMixinClass¶
- class spectral_cube.base_class.MultiBeamMixinClass[source]¶
Bases:
object
A mixin class to handle multibeam objects. To be used by VaryingResolutionSpectralCube’s and OneDSpectrum’s
Attributes Summary
Methods Summary
average_beams
(threshold[, mask, warn])Average the beams.
identify_bad_beams
(threshold[, ...])Mask out any layers in the cube that have beams that differ from the central value of the beam by more than the specified threshold.
jtok_factors
([equivalencies])Compute an array of multiplicative factors that will convert from Jy/beam to K
mask_out_bad_beams
(threshold[, ...])See
identify_bad_beams
.with_beams
(beams[, goodbeams_mask, ...])Attach a new beams object to the VaryingResolutionSpectralCube.
Attributes Documentation
- beams¶
- goodbeams_mask¶
- pixels_per_beam¶
- unmasked_beams¶
Methods Documentation
- average_beams(threshold, mask='compute', warn=False)[source]¶
Average the beams. Note that this operation only makes sense in limited contexts! Generally one would want to convolve all the beams to a common shape, but this method is meant to handle the “simple” case when all your beams are the same to within some small factor and can therefore be arithmetically averaged.
- Parameters:
- thresholdfloat
The fractional difference between beam major, minor, and pa to permit
- mask‘compute’, None, or boolean array
The mask to apply to the beams. Useful for excluding bad channels and edge beams.
- warnbool
Warn if successful?
- Returns:
- new_beamradio_beam.Beam
A new radio beam object that is the average of the unmasked beams
- identify_bad_beams(threshold, reference_beam=None, criteria=['sr', 'major', 'minor'], mid_value=<function nanmedian>)[source]¶
Mask out any layers in the cube that have beams that differ from the central value of the beam by more than the specified threshold.
- Parameters:
- thresholdfloat
Fractional threshold
- reference_beamBeam
A beam to use as the reference. If unspecified,
mid_value
will be used to select a middle beam- criterialist
A list of criteria to compare. Can include ‘sr’,’major’,’minor’,’pa’ or any subset of those.
- mid_valuefunction
The function used to determine the ‘mid’ value to compare to. This will identify the middle-valued beam area/major/minor/pa.
- Returns:
- includemasknp.array
A boolean array where
True
indicates the good beams
- jtok_factors(equivalencies=())[source]¶
Compute an array of multiplicative factors that will convert from Jy/beam to K
- mask_out_bad_beams(threshold, reference_beam=None, criteria=['sr', 'major', 'minor'], mid_value=<function nanmedian>)[source]¶
See
identify_bad_beams
. This function returns a masked cube- Returns:
- newcubeVaryingResolutionSpectralCube
The cube with bad beams masked out