validate¶
- sofia_redux.scan.custom.fifi_ls.frames.fifi_ls_frame_numba_functions.validate(valid, validated, weight, check_coordinates, equatorial_null, equatorial_nan, horizontal_nan, chopper_nan, lst, site_lon, site_lat, telescope_vpa, instrument_vpa)[source]¶
Utility function to validate HAWC+ frames following a data read.
Checks the frame attributes specific to FIFI-LS observations for validity.
- Parameters:
- validnumpy.ndarray (bool)
The validity array where
False
marks an invalid frame that should not be included in any subsequent operations of shape (n_frames,). Will be updated in-place. AFalse
value on entry overrides any further analysis and will remain so.- validatednumpy.ndarray (bool)
A boolean array of shape (n_frames,) where
True
indicates that a frame has already gone through the validation process and should not be re-validated.- weightnumpy.ndarray (float)
The relative frame weights of shape (n_frames,). Zero weighted frames will be marked as invalid.
- check_coordinatesnumpy.ndarray (bool)
If
True
, check the frame coordinates for validity. Should be set toFalse
if this was a lab observation without any real coordinates. IfFalse
, the equatorial, object, horizontal, chopper, lst, site, and vpa type values will not impact the validity of the frames. Should be an array of shape (n_frames,)- equatorial_nullnumpy.ndarray (bool)
An array of shape (n_frames,) where
True
indicates that the equatorial coordinates are zero valued. Any such frames will be marked as invalid.- equatorial_nannumpy.ndarray (bool)
An array of shape (n_frames,) where
True
indicates that one or more of the equatorial coordinates for a given frame is NaN. Any such frames will be marked as invalid.- horizontal_nannumpy.ndarray (bool)
An array of shape (n_frames,) where
True
indicates that the horizontal coordinates for a given frame are NaN. Any such frames will be marked as invalid.- chopper_nannumpy.ndarray (bool)
An array of shape (n_frames,) where
True
indicates that one or more of the chopper coordinates for a given frame is set to NaN. If the chopper is used, then any such frame will be marked as invalid.- lstnumpy.ndarray (float)
The local-sidereal-time values in unix seconds of shape (n_frames,). If any LST value is set to NaN, the associated frame will be marked as invalid.
- site_lonnumpy.ndarray (float)
The site longitude coordinates of shape (n_frames,) in arbitrary units. If any longitude value is NaN, the associated frame will be marked as invalid.
- site_latnumpy.ndarray (float)
The site latitude coordinates of shape (n_frames,) in arbitrary units. If any latitude value is NaN, the associated frame will be marked as invalid.
- telescope_vpanumpy.ndarray (float)
The telescope VPA in arbitrary angle units of shape (n_frames,). If any value is set to NaN, the associated frame will be marked as invalid.
- instrument_vpanumpy.ndarray (float)
The instrument VPA in arbitrary angle units of shape (n_frames,). If any value is set to NaN, the associated frame will be marked as invalid.
- Returns:
- None