-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved code for GMOS LS recipes to ql, and kept sq recipes by importin…
…g those functions
- Loading branch information
1 parent
f17af4b
commit 990c0e1
Showing
7 changed files
with
113 additions
and
83 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
Recipes available to data with tags ['GMOS', 'SPECT', 'LS', 'ARC']. | ||
These are GMOS longslit arc-lamp calibrations. | ||
Default is "reduce". | ||
""" | ||
recipe_tags = set(['GMOS', 'SPECT', 'LS', 'ARC']) | ||
|
||
|
||
def makeProcessedArc(p): | ||
p.prepare() | ||
p.addDQ(static_bpm=None) | ||
p.addVAR(read_noise=True) | ||
p.overscanCorrect() | ||
p.biasCorrect() | ||
p.ADUToElectrons() | ||
p.addVAR(poisson_noise=True) | ||
p.mosaicDetectors() | ||
p.makeIRAFCompatible() | ||
p.writeOutputs() # for now, to speed up diagnostics of the next step | ||
p.determineWavelengthSolution() | ||
p.determineDistortion() | ||
p.storeProcessedArc() | ||
p.writeOutputs() | ||
|
||
|
||
_default = makeProcessedArc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Recipes available to data with tags ['GMOS', 'SPECT', 'LS', 'FLAT']. | ||
These are GMOS longslit observations. | ||
Default is "reduce". | ||
""" | ||
recipe_tags = set(['GMOS', 'SPECT', 'LS', 'FLAT']) | ||
|
||
|
||
def makeProcessedFlat(p): | ||
p.prepare() | ||
p.addDQ(static_bpm=None) | ||
p.addVAR(read_noise=True) | ||
p.overscanCorrect() | ||
p.biasCorrect() | ||
p.ADUToElectrons() | ||
p.addVAR(poisson_noise=True) | ||
p.stackFrames() | ||
p.normalizeFlat() | ||
p.thresholdFlatfield() | ||
p.makeIRAFCompatible() | ||
p.storeProcessedFlat() | ||
|
||
|
||
_default = makeProcessedFlat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
""" | ||
Recipes available to data with tags ['GMOS', 'SPECT', 'LS']. | ||
These are GMOS longslit observations. | ||
Default is "reduce". | ||
""" | ||
recipe_tags = set(['GMOS', 'SPECT', 'LS']) | ||
|
||
|
||
def reduce(p): | ||
""" | ||
todo: add docstring | ||
Parameters | ||
---------- | ||
p : :class:`geminidr.core.primitives_gmos_longslit.GMOSLongslit` | ||
""" | ||
p.prepare() | ||
p.addDQ(static_bpm=None) | ||
p.addVAR(read_noise=True) | ||
p.overscanCorrect() | ||
p.biasCorrect() | ||
p.ADUToElectrons() | ||
p.addVAR(poisson_noise=True) | ||
p.flatCorrect() | ||
p.distortionCorrect() | ||
p.findSourceApertures() | ||
p.skyCorrectFromSlit() | ||
p.traceApertures() | ||
p.extract1DSpectra() | ||
p.linearizeSpectra() | ||
p.writeOutputs() | ||
|
||
def reduceStandard(p): | ||
""" | ||
todo: add docstring | ||
Parameters | ||
---------- | ||
p : :class:`geminidr.core.primitives_gmos_longslit.GMOSLongslit` | ||
""" | ||
p.prepare() | ||
p.addDQ(static_bpm=None) | ||
p.addVAR(read_noise=True) | ||
p.overscanCorrect() | ||
p.biasCorrect() | ||
p.ADUToElectrons() | ||
p.addVAR(poisson_noise=True) | ||
p.flatCorrect() | ||
p.distortionCorrect() | ||
p.findSourceApertures(max_apertures=1) | ||
p.skyCorrectFromSlit() | ||
p.traceApertures() | ||
p.extract1DSpectra() | ||
p.linearizeSpectra() # TODO: needed? | ||
p.calculateSensitivity() | ||
p.writeOutputs() | ||
|
||
_default = reduce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters