From cca4ea86a4bd2daa77a03375accf44a96897d0b4 Mon Sep 17 00:00:00 2001 From: Eric Ford Date: Tue, 8 Sep 2020 15:21:04 -0400 Subject: [PATCH] Fixed tests for new version of ESPRESSO masks --- Project.toml | 2 +- data/masks/citation.txt | 3 +++ examples/neid_pipeline_1.jl | 2 +- examples/param.jl | 14 ++++++++++---- test/instruments/linelists.jl | 2 +- test/instruments/masks.jl | 2 +- 6 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 data/masks/citation.txt diff --git a/Project.toml b/Project.toml index 8d88fbc..299b745 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "RvSpectML" uuid = "1f61ac2c-3a1c-440a-925a-2707197041c8" authors = ["Eric B. Ford, Christian Gilbertson, Joe Ninan, Michael L. Palumbo III, Alex Wise, and contributors"] -version = "0.0.6" +version = "0.0.7" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/data/masks/citation.txt b/data/masks/citation.txt new file mode 100644 index 0000000..6790f3c --- /dev/null +++ b/data/masks/citation.txt @@ -0,0 +1,3 @@ +ESPRESSO mask files comes from the public DRS, version 2.2.1: +https://www.eso.org/sci/software/pipelines/espresso/espresso-pipe-recipes.html --> espdr-kit-2.2.1/espdr-calib-2.2.1/cal/ + diff --git a/examples/neid_pipeline_1.jl b/examples/neid_pipeline_1.jl index 89fc833..93ade08 100644 --- a/examples/neid_pipeline_1.jl +++ b/examples/neid_pipeline_1.jl @@ -12,7 +12,7 @@ using RvSpectML target_subdir = "20190918" # USER: Replace with directory of your choice fits_target_str = "Solar" output_dir = "examples/output" - default_paths_to_search = [pwd(),"examples",joinpath(pkgdir(RvSpectML),"examples"),"/gpfs/group/ebf11/default/ebf11/neid/inputs"] + default_paths_to_search = [pwd(),"examples",joinpath(pkgdir(RvSpectML),"examples"), "/gpfs/group/ebf11/default/ebf11/neid_solar"] make_plots = false write_ccf_to_csv = true diff --git a/examples/param.jl b/examples/param.jl index c8961ac..6ea63d4 100644 --- a/examples/param.jl +++ b/examples/param.jl @@ -1,11 +1,16 @@ -global linelist_for_ccf_filename = "G2.espresso.mas" global ccf_mid_velocity = 0 global tophap_ccf_mask_scale_factor=1.6 -global max_spectra_to_use = 20 -global fits_target_str +global max_spectra_to_use = 200 +global fits_target_str if fits_target_str == "Solar" - global ancilary_solar_data_path = "/home/eford/Data/SolarSpectra/NEID_solar/" + global linelist_for_ccf_filename = "G2.espresso.mas" + hostname = gethostname() + if occursin("aci.ics.psu.edu",hostname) + global ancilary_solar_data_path = "/gpfs/group/ebf11/default/ebf11/neid_solar" + elseif occursin("nuc8") # Eric's home machine :) + global ancilary_solar_data_path = "/home/eford/Data/SolarSpectra/NEID_solar/" + end global bjd_first_good = 2458745.1296134139 global bjd_last_good = 2458745.283 global df_files @@ -15,6 +20,7 @@ if fits_target_str == "Solar" @take(max_spectra_to_use) |> DataFrame elseif fits_target_str == "101501" + global linelist_for_ccf_filename = "G8.espresso.mas" global ccf_mid_velocity = -5e3 global df_files global df_files_use = df_files |> diff --git a/test/instruments/linelists.jl b/test/instruments/linelists.jl index 18a5cea..ecce9c8 100644 --- a/test/instruments/linelists.jl +++ b/test/instruments/linelists.jl @@ -5,7 +5,7 @@ using Test using DataFrames linelist_df = read_linelist_espresso(joinpath(pkgdir(RvSpectML),"data/masks","G2.espresso.mas")) @test typeof(linelist_df) <: DataFrame - @test size(linelist_df,1) == 5551 + @test size(linelist_df,1) == 5484 @test hasproperty(linelist_df,:lambda) @test hasproperty(linelist_df,:weight) end diff --git a/test/instruments/masks.jl b/test/instruments/masks.jl index 78ec6d3..db9169b 100644 --- a/test/instruments/masks.jl +++ b/test/instruments/masks.jl @@ -5,7 +5,7 @@ using Test using DataFrames linelist_df = read_mask_espresso(joinpath(pkgdir(RvSpectML),"data/masks/G2.espresso.mas")) @test typeof(linelist_df) <: DataFrame - @test size(linelist_df,1) == 5551 + @test size(linelist_df,1) == 5484 #@test size(linelist_df,2) == 5 @test hasproperty(linelist_df,:lambda) @test hasproperty(linelist_df,:lambda_lo)