Skip to content

Commit

Permalink
Merge pull request #83 from andrew-saydjari/2024_01_24
Browse files Browse the repository at this point in the history
2024 01 24
  • Loading branch information
andrew-saydjari authored Jan 25, 2024
2 parents ee88086 + 340cfbd commit f117154
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
10 changes: 5 additions & 5 deletions pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ end
end

@everywhere begin
function pipeline_single_spectra(argtup; caching=true, sky_caching=true, sky_off=false, cache_dir="../local_cache", inject_cache_dir=prior_dir*"2023_08_22/inject_local_cache")
function pipeline_single_spectra(argtup; caching=true, sky_caching=true, sky_off=false, cache_dir="../local_cache_1", inject_cache_dir=prior_dir*"2023_08_22/inject_local_cache")
release_dir, redux_ver, tele, field, plate, mjd, fiberindx = argtup[2:end]
out = []

Expand Down Expand Up @@ -310,13 +310,13 @@ end
end
if prior_load_needed
### Need to load the priors here
f = h5open(prior_dir*"2023_07_22/sky_priors/APOGEE_skycont_svd_30_f"*lpad(adjfibindx,3,"0")*".h5")
f = h5open(prior_dir*"2024_01_22/sky_priors/APOGEE_skycont_svd_30_f"*lpad(adjfibindx,3,"0")*".h5")
global V_skycont = read(f["Vmat"])
chebmsk_exp = convert.(Bool,read(f["chebmsk_exp"]))
close(f)

f = h5open(prior_dir*"2023_07_22/sky_priors/APOGEE_skyline_svd_120_f"*lpad(adjfibindx,3,"0")*".h5") #revert temp
global V_skyline = read(f["Vmat"])
f = h5open(prior_dir*"2024_01_22/sky_priors/APOGEE_skyline_svd_120_f"*lpad(adjfibindx,3,"0")*".h5") #revert temp
global V_skyline = read(f["Vmat"]).*(6000)
submsk = convert.(Bool,read(f["submsk"]))
close(f)

Expand Down Expand Up @@ -369,7 +369,7 @@ end
(x->x[metai][7], "a_relFlux"),
(x->x[metai][8], "b_relFlux"),
(x->x[metai][9], "c_relFlux"),
(x->x[metai][10], "cartVisit"),
# (x->x[metai][10], "cartVisit"),
(x->x[metai][11], "flux"),
(x->x[metai][12], "fluxerr2"),
(x->adjfibindx, "adjfiberindx"),
Expand Down
6 changes: 4 additions & 2 deletions src/ingest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function stack_out(release_dir,redux_ver,tele,field,plate,mjd,fiberindx; varoffs
thrpt = read(f[chip],fiberindx)
thrptDict[chip] = thrpt
end
cartVisit = read_header(f[1])["CARTID"]
cartVisit = parse(Int,read_header(f[1])["CARTID"])
close(f)

fill!(outvec,0)
Expand All @@ -146,7 +146,9 @@ function stack_out(release_dir,redux_ver,tele,field,plate,mjd,fiberindx; varoffs
fill!(Xd_std_stack,0)
fill!(waveobs_stack,0)
fill!(pixmsk_stack,0)
fill!(telluric_stack,0)
if telluric_div
fill!(telluric_stack,0)
end
fill!(fullBit,0)
for (chipind,chip) in enumerate(["c","b","a"]) #needs to be c,b,a for chip ind to be right
fname = build_framepath(release_dir,redux_ver,tele,mjd,imid,chip)
Expand Down
11 changes: 6 additions & 5 deletions src/verify_drp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ for outsub in outdirsubs
end
end

release_dir = "sdsswork/mwm"
redux_ver = "1.2"
# release_dir = "ipl-3"
# redux_ver = "1.2"

# release_dir = "dr17"
# redux_ver = "dr17"

# release_dir = ARGS[1]
# redux_ver = ARGS[2]
release_dir = ARGS[1]
redux_ver = ARGS[2]

release_dir_n = replace(release_dir,"/"=>"_")
release_dir_n = replace(replace(release_dir,"/"=>"_"),"-"=>"_")
redux_ver_n = replace(redux_ver,"."=>"p")

check_ap1d = true
Expand Down Expand Up @@ -760,4 +760,5 @@ end
rmprocs(workers())

# julia +1.8.2 verify_drp.jl > > (tee -a ../../outlists/sdsswork_mwm_1p2.log) 2> >(tee -a ../../outlists/sdsswork_mwm_1p2.err >&2)
# julia +1.8.2 verify_drp.jl > > (tee -a ../../outlists/ipl_3_1p2.log) 2> >(tee -a ../../outlists/ipl_3_1p2.err >&2)
# julia +1.8.2 verify_drp.jl > > (tee -a ../../outlists/dr17_dr17_stdout.log) 2> >(tee -a ../../outlists/dr17_dr17_stderr.log >&2)

0 comments on commit f117154

Please sign in to comment.