calculate throughput corrections in a separate function and save the them to disk. change default to use sky correction #939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moved calculation of throughput corrections into a separate function and save the factors to
skymodel
files.This includes the creation of a new function in
sky.py
calledcalculate_throuhput_corrections()
that is run at the end ofcompute_sky()
.subtract_sky()
uses the values, which are saved in a 1D array inskymodel
. The index corresponds to the fiber number. Its value is 1 by default. The array is stored inskymodel.throughput_corrections
The array is saved in a new HDU within the
skymodel
fits file labeledTHRPUTCORR
. If that exists in a loaded file, it is assigned toskymodel.throughput_corrections
otherwiseNone
is assigned.This PR also changes the default of the pipeline to use sky corrections in fiber throughput. It changes the input flag of
procexp
(desi_process_exposure
) to--no-sky-throughput-correction
and removes the use of the previous flag fromdesi_proc
.Checked with:
srun -N 1 -n 2 -c 32 /global/homes/k/kremin/workspace/default_skycorrect/desispec/bin/desi_proc --cameras 1 -n 20200314 -e 55444 --mpi --traceshift
It runs to completion.
The results are in:
/global/cfs/cdirs/desi/spectro/redux/kremin/exposures/20200314/00055444