HawcPlusFrames¶
- class sofia_redux.scan.custom.hawc_plus.frames.frames.HawcPlusFrames[source]¶
Bases:
SofiaFrames
Initialize HAWC+ frames.
HAWC+ frames contain the timestream data for HAWC+ integrations. The include additional information on the MCE serial, the HWP angle, line-of-sight (LOSS), aircraft roll, the observing status flag, and the detector jump count.
Attributes Summary
Returns default frame/channel type default values.
Used to define the default values for data arrays.
Return the scan info object.
Attributes that will be operated on by the
shift
method.Return the LON/LAT SOFIA coordinates.
Methods Summary
add_data_from
(other_frames[, scaling, indices])Add data from other frames to these.
apply_hdu
(hdu[, start_index, end_index])Read a single data HDU.
Given an HDU and a scan, return columns to be read.
copy
()Return a copy of the HAWC+ frames.
Perform the squid dark correction for blind channels.
read_hdus
(hdus)Populate the data from a list of HDUs.
set_from_downsampled
(frames, start_indices, ...)Set the data for these frames by downsampling higher-res frames.
validate
()Validate frame data after read.
Attributes Documentation
- FITS_FLAG_BETWEEN_SCANS = 3¶
- FITS_FLAG_IVCURVES = 2¶
- FITS_FLAG_LOS_REWIND = 1¶
- FITS_FLAG_NORMAL_OBSERVING = 0¶
- default_channel_fields¶
Returns default frame/channel type default values.
This framework is similar to
default_field_types
, but is used to populate frame/channel data of shape (n_frames, n_channels).- Returns:
- fieldsdict
- default_field_types¶
Used to define the default values for data arrays.
Returns a dictionary of structure {field: default_value}. The default values have the following effects:
type - empty numpy array of the given type. value - full numpy array of the given value. astropy.units.Unit - empty numpy array (float) in the given unit. astropy.units.Quantity - full numpy array of the given quantity.
If a tuple is provided, the array will have additional axes appended such that the first element gives the type as above, and any additional integers give additional axes dimensions, e.g. (0.0, 2, 3) would result in a numpy array filled with zeros of shape (self.size, 2, 3).
- Returns:
- fieldsdict
- info¶
Return the scan info object.
- Returns:
- sofia_redux.scan.custom.hawc_plus.info.info.HawcPlusInfo
- readout_attributes¶
Attributes that will be operated on by the
shift
method.- Returns:
- set (str)
- site¶
Return the LON/LAT SOFIA coordinates.
- Returns:
- GeodeticCoordinates
Methods Documentation
- add_data_from(other_frames, scaling=1.0, indices=None)[source]¶
Add data from other frames to these.
- Parameters:
- other_framesHawcPlusFrames
- scalingfloat, optional
- indicesint or slice or numpy.ndarray (int or bool)
The frame indices to add to.
- Returns:
- None
- apply_hdu(hdu, start_index=0, end_index=None)[source]¶
Read a single data HDU.
- Parameters:
- hduastropy.io.fits.hdu.table.BinTableHDU
A data HDU containing “timestream” data.
- start_indexint
The index at which to start populating frame data.
- end_indexint
The index at which to finish populating frame data.
- Returns:
- None
- configure_hdu_columns(hdu)[source]¶
Given an HDU and a scan, return columns to be read.
Will also update scan astrometry if necessary.
- Parameters:
- hduastropy.io.fits.hdu.table.BinTableHDU
A data HDU containing “timestream” data.
- Returns:
- columnsdict
- dark_correct()[source]¶
Perform the squid dark correction for blind channels.
The dark correction is applied for all frames by by subtracting the associated dark squid channel data from each non-blind channel over all valid frames.
- Returns:
- None
- read_hdus(hdus)[source]¶
Populate the data from a list of HDUs.
- Parameters:
- hduslist (astropy.io.fits.hdu.table.BinTableHDU)
A list of data HDUs containing “timestream” data.
- Returns:
- None
- set_from_downsampled(frames, start_indices, valid, window)[source]¶
Set the data for these frames by downsampling higher-res frames.
- Parameters:
- framesHawcPlusFrames
The frames at a higher resolution.
- start_indicesnumpy.ndarray (int)
The start indices containing the first index of the high resolution frame for each convolution with the window function. Should be of shape (self.size,).
- validnumpy.ndarray (bool)
A boolean mask indicating whether a downsampled frame could be determined from the higher resolution frames. Should be of shape (self.size,).
- windownumpy.ndarray (float)
The window function used for convolution of shape (n_window,).
- Returns:
- None