Skip to content

Commit

Permalink
Merge pull request #72 from andrew-saydjari/2023_12_11
Browse files Browse the repository at this point in the history
save fpi_expid for holtz
  • Loading branch information
andrew-saydjari authored Dec 12, 2023
2 parents 3e135a4 + 457f528 commit e247a6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ function nightly_wavecal(arc_grp_tup, fpi_tup; f2do=1:300, save_plot_on = true,
if !ispath(dirName)
mkpath(dirName)
end
save_wavecal(wavesavename,outlst_FPI,cavp)
save_wavecal(wavesavename,outlst_FPI,cavp,fpi_tup)

# return msklst
return outlst_FPI
end

#### Assorted functions ####

function save_wavecal(wavesavename,outlst_FPI,cavp)
function save_wavecal(wavesavename,outlst_FPI,cavp,fpi_tup)
# get the pixel to wavelength polynomial coefficients
x = extract_nth.(outlst_FPI,4)
binds = findall(length.(x).==0)
Expand All @@ -116,7 +116,7 @@ function save_wavecal(wavesavename,outlst_FPI,cavp)
cavColNames = ["dcav", "m0"]
cavColVals = [[cavp[1]],[cavp[2]]]

hdr = FITSHeader(["pipeline","git_branch","git_commit"],["apMADGICS.jl",git_branch,git_commit],["","",""])
hdr = FITSHeader(["pipeline","git_branch","git_commit","fpi_expid"],["apMADGICS.jl",git_branch,git_commit,string(fpi_tup[end])],["","",""])

f = FITS(wavesavename,"w")
write(f,[0],header=hdr,name="header_only")
Expand Down

0 comments on commit e247a6a

Please sign in to comment.