sofia_redux.instruments.fifi_ls: FIFI-LS Data Reduction Algorithms¶
The sofia_redux.instruments.fifi_ls
package contains data reduction
algorithms for the FIFI-LS instrument. It is designed to be used with the
sofia_redux
package, so it does not provide its own interfaces or workflows.
Basic usage via the Redux interface is described below. See the
sofia_redux.pipeline
documentation for more information on the pipeline
interfaces, or the API documentation below for more information on
FIFI-LS algorithms.
Reference/API¶
sofia_redux.instruments.fifi_ls Package¶
sofia_redux.instruments.fifi_ls.apply_static_flat Module¶
Functions¶
Clear all data from the flat cache. |
|
|
Retrieves flat data from the flat cache. |
|
Store flat data in the flat cache. |
|
Return flat data table |
|
Divide extension data by static flat. |
|
Apply pre-reduced and normalized flat to FIFI-LS data. |
|
Wrapper for apply_static_flat over multiple files. |
sofia_redux.instruments.fifi_ls.combine_grating_scans Module¶
Functions¶
|
Get overlapping wavelengths for all extensions. |
|
Combine all extensions into a single extension. |
|
Combine separate grating positions in FIFI-LS data. |
|
Wrapper for combine_grating_scans over multiple files. |
sofia_redux.instruments.fifi_ls.combine_nods Module¶
Functions¶
|
Extract various properties of all files for subsequent combination. |
|
Find a B nod for each A nod. |
|
Combine nods of ramp-fitted, chop-subtracted data. |
sofia_redux.instruments.fifi_ls.correct_wave_shift Module¶
Functions¶
|
Correct LAMBDA extension in HDU list. |
|
Correct wavelength shift due to motion of the Earth. |
|
Wrapper for correct_wave_shift over multiple files. |
sofia_redux.instruments.fifi_ls.fit_ramps Module¶
Functions¶
|
Returns the readout range as extracted from header. |
|
Trim and reshape data to separate ramps. |
|
Applies linear fit (y = ax + b) over the second dimension of a 4D array. |
|
Wrapper to process a single HDU extension. |
|
Fit straight lines to raw voltage ramps to calculate corresponding flux. |
|
Wrapper for fit_ramps over multiple files. |
sofia_redux.instruments.fifi_ls.flux_calibrate Module¶
Functions¶
|
Apply response data to data in an HDUList. |
|
Convert spectra to physical flux units. |
|
Wrapper for flux_calibrate over multiple files. |
sofia_redux.instruments.fifi_ls.get_atran Module¶
Functions¶
Clear all data from the atran cache. |
|
|
Retrieves atmospheric transmission data from the atran cache. |
|
Store atran data in the atran cache. |
|
Retrieve reference atmospheric transmission data. |
sofia_redux.instruments.fifi_ls.get_badpix Module¶
Functions¶
Clear all data from the badpix cache. |
|
|
Retrieves bad pixel masks or default file from the badpix cache. |
|
Store badpix data in the badpix cache. |
Read the badpix defaults table. |
|
|
Retrieve bad pixel data. |
sofia_redux.instruments.fifi_ls.get_resolution Module¶
Functions¶
Clear all data from the resolution cache. |
|
|
Retrieves table from the resolution cache. |
|
Store resolution data in the resolution cache. |
|
Retrieve expected spectral or spatial resolution. |
sofia_redux.instruments.fifi_ls.get_response Module¶
Functions¶
Clear all data from the response cache. |
|
|
Retrieves response data from the response cache. |
|
Store response data in the response cache |
|
Retrieve instrumental response data. |
sofia_redux.instruments.fifi_ls.lambda_calibrate Module¶
Functions¶
Clear all data from the wavecal cache. |
|
|
Retrieves wavelength calibration data from the wavecal cache. |
|
Store wavecal data in the wavecal cache. |
|
Read and return the data from the wavecal file. |
|
Calculate wavelengths for each spectral pixel. |
|
Apply spectral calibration. |
|
Wrapper for lambda_calibrate over multiple files. |
sofia_redux.instruments.fifi_ls.make_header Module¶
Functions¶
|
Create the header keyword requirements definition table. |
Clear all data from the requirements cache. |
|
Get the keyword comments table from the cache. |
|
|
Returns a dataframe containing the header requirements. |
|
Returns a dictionary containing header keyword comments. |
|
Update the base header with values that may be missing. |
|
Order headers based on contents. |
|
Standardize and combine input headers. |
sofia_redux.instruments.fifi_ls.readfits Module¶
Functions¶
|
Read a FIFI-LS FITS file and return data and header. |
sofia_redux.instruments.fifi_ls.resample Module¶
Functions¶
|
Combine all files into a single dataset. |
|
Get output coordinate system and useful parameters. |
|
Create the exposure map from combined files. |
|
Combines multiple datasets using radial basis functions and mean combine. |
|
Resamples combined data on regular grid using local polynomial fitting. |
|
Create final HDU List from combined data and gridding info. |
|
Resample unevenly spaced FIFI-LS pixels to regular grid. |
|
Reduce the files using a scan reduction. |
|
Remove all temporary files created during a scan reduction. |
sofia_redux.instruments.fifi_ls.spatial_calibrate Module¶
Functions¶
Clear all data from the spatial cache. |
|
|
Retrieves spatial data from the spatial cache. |
|
Store spatial data in the spatial cache. |
|
Calculate X and Y offsets for each spaxel. |
|
Read the correct delta vector spatial coefficients. |
|
Calculate X and Y spatial offsets. |
|
Apply spatial calibration (x and y offsets). |
|
Wrapper for spatial_calibrate over multiple files. |
sofia_redux.instruments.fifi_ls.split_grating_and_chop Module¶
Functions¶
|
Returns RED or BLUE channel extracted from header and data. |
|
Check if a file can be split by basic header checks. |
|
Remove partial ramps and "unpaired" chop plateaus. |
|
Names the split files. |
|
Separate data into different files, by chop index. |
|
Split FIFI-LS raw data file into separate FITS files. |
|
Wrapper for split_grating_and_chop over multiple files. |
sofia_redux.instruments.fifi_ls.subtract_chops Module¶
Functions¶
|
Given the chop 0 filename, return the chop 0 and chop 1 HDU lists. |
|
Subtract extensions in the correct order. |
|
Subtract chops of ramp-fitted data. |
|
Wrapper for subtract_chops over multiple files. |
sofia_redux.instruments.fifi_ls.telluric_correct Module¶
Functions¶
|
Apply transmission data to data in an HDUList. |
|
Correct spectra for atmospheric absorption features. |
|
Wrapper for telluric_correct over multiple files. |