EchelleInstruments.NEID
— ModuleModule providing types and traits and customized functions for the NEID Spectrograph.
EchelleInstruments.NEID.AnyNEID
— TypeTrait to specify any 1D or 2D Extracted spectra from NEID
EchelleInstruments.NEID.NEID1D
— TypeTrait for 1D Extracted spectra from NEID
EchelleInstruments.NEID.NEID2D
— TypeTrait for 2D Extracted spectra from NEID
EchelleInstruments.NEID.make_manifest
— MethodCreate Dataframe containing filenames and key data for all files neid*.fits in directory
EchelleInstruments.NEID.read_activity_table
— MethodCreate Dict containing filename and default metadata from file.
EchelleInstruments.NEID.read_blaze
— FunctionRead blaze for NEID science fiber from FITS file.
EchelleInstruments.NEID.read_cal_data
— MethodRead calibrator data
EchelleInstruments.NEID.read_data
— FunctionRead NEID data from FITS file, and return in a Spectra2DBasic object.
EchelleInstruments.NEID.read_differential_extinctions!
— FunctionRead space delimited file with differential extinction corrections, interpolate to bjd's in df and insert into df[:,diffextrv].
EchelleInstruments.NEID.read_exposure_meter
— MethodCreate Dict containing filename and default metadata from file.
EchelleInstruments.NEID.read_metadata
— MethodCreate Dict containing filename and default metadata from file.
EchelleInstruments.NEID.read_solar_normalization
— FunctionRead normalization function for approximate solar continuum+blaze correction TODO: Figure out mapping between these orders and what's stored in the FITS file before using.
EchelleInstruments.NEID.read_telluric_ranges
— Methodreadtelluricranges( filename ) Return DataFrame (keys lambdalo and lambdahi) with wavelength ranges to be avoided as containing tellurics based on provided CSV file. Assumes path is included in filename.
RvSpectMLBase.InstrumentsCommon.make_clean_line_list_from_tellurics
— Methodmake_clean_line_list_from_tellurics(line_list, neid_data; Δv_to_avoid_tellurics )
Returns a new line list that excludes lines with telluric contamination. Inputs:
line_list
: Dataframe containing field lambda
- neid_data
: Array of spectra
Δv_to_avoid_tellurics
: in m/sv_center_to_avoid_tellurics
: in m/stellurics_filename
: filename with wavelength ranges affected by tellurics
Outputs:
line_list_without_tellurics
: DataFrame with fields:lambda
,weight
,lambda_lo
, andlambda_hi
.
Warning: Currently, reads in a list of wavelength ranges with tellurics and this file was created based on tellurics metadata in EXPRES data for HR 101501.
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.
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_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.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_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_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)
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.
EchelleInstruments.HPF
— ModuleModule providing types and traits and customized functions for the HPF Spectrograph.
EchelleInstruments.HARPSN.AnyHARPSN
— TypeTrait to specify any 1D or 2D Extracted spectra from HARPS-N
EchelleInstruments.HARPSN.HARPSN1D
— TypeTrait for 1D Extracted spectra from HARPS-N
EchelleInstruments.HARPSN.HARPSN2D
— TypeTrait for 2D Extracted spectra from HARPS-N
EchelleInstruments.HARPSN.make_manifest
— MethodCreate Dataframe containing filenames and key data for all files YYYY-MM-DDThh:mm:ss.mss (year-month-day T hour:minute:second:milisecond in directory timeseriesdatafn is the filename of the harps-n timeseries RV data (e.g. harpnsunreleasetimeseries2015-2018.csv)
EchelleInstruments.HARPSN.read_data
— FunctionRead HARPS-N data from FITS file, and return in a Spectra2DBasic object.
EchelleInstruments.HARPSN.read_metadata
— MethodCreate Dict containing filename and default metadata from file.
EchelleInstruments.HARPSN.read_normalization
— FunctionRead normalization function for approximate continuum+blaze correction TODO: Figure out mapping between these orders and what's stored in the FITS file before using.
EchelleInstruments.HARPSN.read_telluric_ranges
— Methodreadtelluricranges( filename ) Return DataFrame (keys lambdalo and lambdahi) with wavelength ranges to be avoided as containing tellurics based on provided CSV file. Assumes path is included in filename.
RvSpectMLBase.InstrumentsCommon.make_clean_line_list_from_tellurics
— Methodmake_clean_line_list_from_tellurics(line_list, harpsn_data; Δv_to_avoid_tellurics, v_center_to_avoid_tellurics, tellurics_filename )
Returns a new line list that excludes lines with telluric contamination. Inputs:
line_list
: Dataframe containing field lambdaharpsn_data
: Array of spectraΔv_to_avoid_tellurics
: in m/sv_center_to_avoid_tellurics
: in m/stellurics_filename
: filename with wavelength ranges affected by tellurics
Outputs:
line_list_without_tellurics
: DataFrame with fields:lambda
,weight
,lambda_lo
, andlambda_hi
.
Warning: Currently, reads in a list of wavelength ranges with tellurics and this file was created based on tellurics metadata in EXPRES data for HR 101501.
EchelleInstruments.HARPS
— ModuleModule providing types and traits and customized functions for the HARPS Spectrograph.
- https://www.eso.org/sci/facilities/lasilla/instruments/harps.html
EchelleInstruments.HARPS.AnyHARPS
— TypeTrait to specify any 1D or 2D Extracted spectra from HARPS
EchelleInstruments.HARPS.HARPS1D
— TypeTrait for 1D Extracted spectra from HARPS
EchelleInstruments.HARPS.HARPS2D
— TypeTrait for 2D Extracted spectra from HARPS
EchelleInstruments.HARPS.make_manifest
— MethodCreate Dataframe containing filenames and key data for all folders YYYY-MM-DDThh:mm:ss.mss (year-month-day T hour:minute:second:milisecond in directory We assume each YYYY-MM-DDThh:mm:ss.mss folder contains an e2ds.fits spectrum, which is the format for HARPS spectra from the ESO archive.
EchelleInstruments.HARPS.read_data
— FunctionRead HARPS data from FITS file, and return in a Spectra2DBasic object.
EchelleInstruments.HARPS.read_metadata
— MethodCreate Dict containing filename and default metadata from file.
EchelleInstruments.HARPS.read_normalization
— FunctionRead normalization function for approximate continuum+blaze correction TODO: Figure out mapping between these orders and what's stored in the FITS file before using.
EchelleInstruments.HARPS.read_telluric_ranges
— Methodreadtelluricranges( filename ) Return DataFrame (keys lambdalo and lambdahi) with wavelength ranges to be avoided as containing tellurics based on provided CSV file. Assumes path is included in filename.
EchelleInstruments.HARPS.read_λ
— MethodRead HARPS wavelength file. Note:HARPS wavelengths are stored in Float-32 format, which reduces wavelength precision. This function restores that precision using a smooth polynomial fit
RvSpectMLBase.InstrumentsCommon.make_clean_line_list_from_tellurics
— Methodmake_clean_line_list_from_tellurics(line_list, harps_data; Δv_to_avoid_tellurics )
Returns a new line list that excludes lines with telluric contamination. Inputs:
line_list
: Dataframe containing field lambda
- harps_data
: Array of spectra
Δv_to_avoid_tellurics
: in m/sv_center_to_avoid_tellurics
: in m/stellurics_filename
: filename with wavelength ranges affected by tellurics
Outputs:
line_list_without_tellurics
: DataFrame with fields:lambda
,weight
,lambda_lo
, andlambda_hi
.
Warning: Currently, reads in a list of wavelength ranges with tellurics and this file was created based on tellurics metadata in EXPRES data for HR 101501.
EchelleInstruments.EXPRES
— ModuleModule providing types and traits and customized functions for the EXPRES Spectrograph.
EchelleInstruments.EXPRES.AnyEXPRES
— TypeTrait to specify any 1D or 2D Extracted spectra from EXPRES
EchelleInstruments.EXPRES.EXPRES1D
— TypeTrait for 1D Extracted spectra from EXPRES
EchelleInstruments.EXPRES.EXPRES2D
— TypeTrait for 2D Extracted spectra from EXPRES
EchelleInstruments.EXPRES.add_metadata_from_fits!
— Methodadd_metadata_from_fits!(df, filename)
Return updated dataframe after adding metadata from FITS file header.
EchelleInstruments.EXPRES.blaze_normalize_spectra!
— MethodNormalize each spectrum based on blaze model (also tries to include black body function) from FITS files.
EchelleInstruments.EXPRES.blaze_normalize_spectrum!
— MethodNormalize spectrum based on blaze model (also tries to include black body function) from FITS file.
EchelleInstruments.EXPRES.continuum_normalize_spectra!
— MethodNormalize each spectrum based on continuum model from FITS files.
EchelleInstruments.EXPRES.continuum_normalize_spectrum!
— MethodNormalize spectrum based on continuum model from FITS file.
EchelleInstruments.EXPRES.filter_line_list
— Methodfilter_line_list( linelist, inst ; λmin, λmax )
Return DataFrame based on linelist, but filtered to only include lines between λmin and λmax. Defaults for λmin and λmax specified are in traits for EXPRES.
EchelleInstruments.EXPRES.find_worst_telluric_in_each_chunk
— Methodfind_worst_telluric_in_each_chunk( chunk_list_timeseries, spectra )
Return an array of the worst (smallest) telluric for each chunk at any time for the provided ChunkListTimeseries.
EchelleInstruments.EXPRES.jd2mjd
— MethodReturn modified Julian date based on input Julian date
EchelleInstruments.EXPRES.read_data
— FunctionRead EXPRES data from FITS file, and return in a Spectra2DBasic object.
EchelleInstruments.EXPRES.read_data
— MethodRead EXPRES data from FITS a file using Filename from a DataFrameRow. Adds other columns from DataFrameRow as metadata.
EchelleInstruments.EXPRES.read_data_only
— MethodRead only EXPRES data from FITS file, and leave metadata empty.
EchelleInstruments.EXPRES.read_data_only
— MethodRead only EXPRES data from FITS file, and leave metadata empty.
EchelleInstruments.EXPRES.read_metadata
— MethodCreate Dict containing filename and default metadata from FITS file headers.
EchelleInstruments.EXPRES.read_metadata
— MethodCreate Dict containing filename and default metadata from FITS file headers.
EchelleInstruments.make_manifest
— MethodCreate Dataframe containing filenames and key data for all files neid*.fits in directory
RvSpectMLBase.InstrumentsCommon.make_clean_line_list_from_tellurics
— Methodmake_clean_line_list_from_tellurics(line_list, expres_data; Δv_to_avoid_tellurics )
Returns a new line list that excludes lines with telluric contamination. Inputs:
line_list
: Dataframe containing field lambdaexpres_data
: Array of spectraΔv_to_avoid_tellurics
: in m/s
Outputs:
line_list_without_tellurics
: DataFrame with fields:lambda
,weight
,lambda_lo
, andlambda_hi
.
Warning: Currently, assumes a tellurics value in metadata for each spectra, such as is provided by EXPRES.