SofiaScan¶
- class sofia_redux.scan.custom.sofia.scan.scan.SofiaScan(channels, reduction=None)[source]¶
Bases:
Scan
Initialize a SOFIA scan.
The SOFIA scan is an abstract class general to all SOFIA instruments.
- Parameters:
- channelssofia_redux.scan.custom.sofia.channels.camera.SofiaCamera
The instrument channels for the scan.
- reductionsofia_redux.scan.reduction.reduction.Reduction, optional
The reduction to which this scan belongs.
Attributes Summary
Return the scan astrometry information.
Return the information object for the scan.
Return the names of attributes that are referenced during a copy.
Methods Summary
Add integrations to this scan from a HDU list.
Close the scan FITS file.
copy
()Return a copy of the scan.
edit_pointing_header_info
(header)Edit pointing information in a header.
edit_scan_header
(header)Edit scan FITS header information.
get_earliest_scan
(scans)Return the earliest scan in a list of scans determined by MJD.
Return the flight number for the scan.
get_id
()Return the scan ID.
Return the instrument VPA.
get_latest_scan
(scans)Return the latest scan in a list of scans determined by MJD.
get_lowest_quality
(scans)Return the lowest quality processing stats from a set of scans.
get_nominal_pointing_offset
(native_pointing)Get the nominal point offset for a native pointing coordinate.
Return pointing data information.
Return a string representing the scan pointing.
Return the scan number.
get_si_arcseconds_offset
(native_pointing)Get the offsets of the science instrument in arcseconds.
get_si_pixel_offset
(native_pointing)Get the pixel offset of the science instrument.
get_table_entry
(name)Return a parameter value for the given name.
Return the telescope VPA.
get_total_exposure_time
(scans)Return the total exposure time in a set of scans.
guess_reference_coordinates
([header])Guess the reference coordinates of the scan from the header.
has_tracking_error
(scans)Report whether any scan in a set contains a telescope tracking error.
Checks whether the observation AOR ID is valid.
is_coordinate_valid
(coordinate)Checks whether coordinates are valid.
is_requested_valid
(header)Check if the requested coordinates are valid.
read
(filename[, read_fully])Read a filename to populate the scan.
read_hdul
(hdul[, read_fully])Read an open FITS HDUL.
validate
()Validate the scan after a read.
Attributes Documentation
- DEFAULT_FITS_DATE = '1970-01-01T00:00:00.0'¶
- astrometry¶
Return the scan astrometry information.
- Returns:
- infoSofiaAstrometryInfo
- info¶
Return the information object for the scan.
The information object contains the reduction configuration and various parameters pertaining the this scan.
- Returns:
- SofiaInfo
- referenced_attributes¶
Return the names of attributes that are referenced during a copy.
- Returns:
- attribute_namesset (str)
Methods Documentation
- abstract add_integrations_from_hdul(hdul)[source]¶
Add integrations to this scan from a HDU list.
- Parameters:
- hdulfits.HDUList
- Returns:
- None
- edit_pointing_header_info(header)[source]¶
Edit pointing information in a header.
- Parameters:
- headerastropy.io.fits.header.Header
The FITS header to edit.
- Returns:
- None
- edit_scan_header(header)[source]¶
Edit scan FITS header information.
- Parameters:
- headerastropy.io.fits.header.Header
The header to edit.
- Returns:
- None
- static get_earliest_scan(scans)[source]¶
Return the earliest scan in a list of scans determined by MJD.
- Parameters:
- scanslist (Scan)
- Returns:
- Scan
- get_flight_number()[source]¶
Return the flight number for the scan.
- Returns:
- flightint
Returns the flight number or -1 if not found.
- get_instrument_vpa()[source]¶
Return the instrument VPA.
The value represents the midpoint of the first and last frames of the first and last integrations respectively.
- Returns:
- angleastropy.units.Quantity
- static get_latest_scan(scans)[source]¶
Return the latest scan in a list of scans determined by MJD.
- Parameters:
- scanslist (Scan)
- Returns:
- Scan
- static get_lowest_quality(scans)[source]¶
Return the lowest quality processing stats from a set of scans.
- Parameters:
- scanslist (SofiaScan)
A list of scans.
- Returns:
- QualityFlags.QualityFlagTypes
The lowest quality flag type.
- get_nominal_pointing_offset(native_pointing)[source]¶
Get the nominal point offset for a native pointing coordinate.
The nominal pointing offset ignores the reference coordinate of the supplied
native_coordinate
and adds the offset values to the pointing offset stored in the configuration.- Parameters:
- native_pointingOffset2D
The native pointing offset. The reference position is ignored.
- Returns:
- nominal_pointing_offset: Coordinate2D
- get_pointing_string_from_increment(native_pointing)[source]¶
Return a string representing the scan pointing.
- Parameters:
- native_pointingOffset2D
- Returns:
- str
- get_scan_number()[source]¶
Return the scan number.
- Returns:
- scan_numberint
The scan number if found and -1 otherwise.
- get_si_arcseconds_offset(native_pointing)[source]¶
Get the offsets of the science instrument in arcseconds.
- Parameters:
- native_pointingOffset2D
The native pointing offset. The reference position is ignored.
- Returns:
- Coordinate2D
- get_si_pixel_offset(native_pointing)[source]¶
Get the pixel offset of the science instrument.
- Parameters:
- native_pointingOffset2D
The native pointing offset. The reference position is ignored.
- Returns:
- Coordinate2D
- get_table_entry(name)[source]¶
Return a parameter value for the given name.
- Parameters:
- namestr
The name of the parameter to retrieve.
- Returns:
- value
- get_telescope_vpa()[source]¶
Return the telescope VPA.
The value represents the midpoint of the first and last frames of the first and last integrations respectively.
- Returns:
- angleastropy.units.Quantity
- static get_total_exposure_time(scans)[source]¶
Return the total exposure time in a set of scans.
- Parameters:
- scanslist (SofiaScan)
A list of scans.
- Returns:
- exposure_timeunits.Quantity
The total exposure time from all scans in seconds.
- guess_reference_coordinates(header=None)[source]¶
Guess the reference coordinates of the scan from the header.
- Parameters:
- headerastropy.io.fits.Header, optional
The header from which to guess the coordinates. If not supplied, is read from the stored configuration.
- Returns:
- coordinatesEquatorialCoordinates
- static has_tracking_error(scans)[source]¶
Report whether any scan in a set contains a telescope tracking error.
- is_coordinate_valid(coordinate)[source]¶
Checks whether coordinates are valid.
- Parameters:
- coordinateCoordinate2D
- Returns:
- validbool
- is_requested_valid(header)[source]¶
Check if the requested coordinates are valid.
- Parameters:
- headerfits.Header
- Returns:
- validbool
- read(filename, read_fully=True)[source]¶
Read a filename to populate the scan.
The read should validate the channels before instantiating integrations for reading.
- Parameters:
- filenamestr
The name of the file to read.
- read_fullybool, optional
If
True
, perform a full read (default)
- Returns:
- None