Instrument-agnostic interface
Modules
EchelleInstruments.EchelleInstruments
— ModuleDelegates loading of code with functions and parameters specific to different instruments. Subdirectories of src/instruments include provide functions specialized for each instrument, typically the file I/O and pre-processing, so data ends up in a common format. src/instruments/common.jl provides routines that can be shared by instruments.
Functions
EchelleInstruments.make_manifest
— Methodmake_manifest(data_path::String, Inst::Module; [opts] )
Returns a dataframe containing a list of files to be read and some metadata (e.g., observation times)
Optional arguements
- verbose = true
EchelleInstruments.make_manifest
— Methodmake_manifest(data_path::String, r::Regex; [opts] )
Returns a dataframe containing a list of files in datapath with file names that match r.
Optional arguements
- verbose = true
EchelleInstruments.make_manifest
— Methodmake_manifest(data_path::String, target_subdir::String, Inst::Module; [opts] )
Returns a dataframe containing a list of files to be read and some metadata (e.g., observation times)
Optional arguements
- verbose = true
EchelleInstruments.read_fits_header
— Methodread_fits_header( filename )
Read header from FITS file and return Dict with contents. Optional inputs:
- hdu: Specifies which HDU to read from the FITS file. (Default: 1)
EchelleInstruments.read_manifest
— MethodRead manifest containing filename
, bjd
, target
, and optionally additional metadata from CSV file.
EchelleInstruments.read_metadata_from_fits
— Functionread_metadata_from_fits( filename, fields )
Read metadata in FITS header for specified keys and return data as a Dict. fields
can be an array of symbols or strings. Optional inputs:
- Passing both fields (an array of symbols) and fields_str (an array of strings) as named parameters allows for differences in string used in FITS file and Symbol used in resulting Dict.
- hdu: Specifies which HDU to read from the FITS file. (Default: 1)
EchelleInstruments.write_manifest
— MethodWrite manifest containing filename
, bjd
, target
, and optionally additional metadata from CSV file.
Internals
EchelleInstruments.calc_complement_wavelength_ranges
— Methodcalc_complement_wavelength_ranges( df_in ; lambda_start, lambda_stop )
Return DataFrame with the complement of wavelength ranges in input DataFrame. Inputs:
df_in
: DataFrame containinglambda_lo
andlambda_hi
Optional Inputs:
λ_start
: Output range should start atλ_start
rather than first entry in dfλ_stop
: Output range should end atλ_stop
rather than first entry in df
Returns:
df_out
: DataFrame containinglambda_lo
andlambda_hi
EchelleInstruments.find_ranges_with_tellurics
— Methodfind_ranges_with_tellurics( spectra )
Return Dataframe of non-overlapping, sorted wavelength ranges that were marked as having tellurics in any of provided spectra. Calls instrument-specific find_ranges_with_tellurics
on each spectrum.
EchelleInstruments.make_ranges_without_tellurics
— Methodmake_ranges_without_tellurics( telluric_list ; lambda_start, lambda_stop, min_Δv, max_Δv )
Return DataFrame with the complement of wavelength ranges in input DataFrame. Inputs:
telluric_list
: DataFrame containinglambda_lo
andlambda_hi
for each wavelength range to be excluded due to tellurics
Optional Inputs:
min_Δv
: Don't include chunks that are smaller thanmin_Δv
(2*max barycentric correction)max_Δv
: Split up any chunks larger thanmax_Δv
(Inf)λ_start
: Output range should start atλ_start
rather than first entry in telluric_listλ_stop
: Output range should end atλ_stop
rather than last entry in telluric_list
EchelleInstruments.merge_sorted_wavelength_ranges
— Methodmerge_sorted_wavelength_ranges( df; min_Δv_clean )
Return Dataframe of non-overlapping, sorted wavelength ranges (keys lambdalo and lambdahi) that is (approximately) the union of all the wavelength ranges in the input dataframe. minΔvclean limits results included in output. Input dataframe are assumed to be sorted by :lambda_lo
EchelleInstruments.read_header
— Methodread_header( fits_file )
Read header from FITS file and return Dict with contents. Optional inputs:
- hdu: Specifies which HDU to read from the FITS file. (Default: 1)
EchelleInstruments.read_header
— Methodread_header( filename )
Read header from FITS file and return Dict with contents. Optional inputs:
- hdu: Specifies which HDU to read from the FITS file. (Default: 1)
Index
Modules
Functions
EchelleInstruments.calc_complement_wavelength_ranges
EchelleInstruments.find_ranges_with_tellurics
EchelleInstruments.make_manifest
EchelleInstruments.make_manifest
EchelleInstruments.make_manifest
EchelleInstruments.make_manifest
EchelleInstruments.make_ranges_without_tellurics
EchelleInstruments.merge_sorted_wavelength_ranges
EchelleInstruments.read_fits_header
EchelleInstruments.read_header
EchelleInstruments.read_header
EchelleInstruments.read_manifest
EchelleInstruments.read_metadata_from_fits
EchelleInstruments.write_manifest