Skip to content

Commit

Permalink
Update the SkyObject[Source]HistPlot classes
Browse files Browse the repository at this point in the history
This updates the skyObject and skySource analysisPlot classes to
adapt to the new range setting configs in the HistPlot action.
This also adds vertical solid black lines at a "reference" value
(0.0 here) in both the flux and S/N panels as well as a shaded
PDF(0, 1) distribution on the now density normalized S/N plots
for reference.

This also adds the GaaP 1p0 flux to the skyObject histograms (GaaP
fluxes are not measured for the visit-level sky sources).
  • Loading branch information
laurenam committed Dec 23, 2022
1 parent 0011b21 commit d6000fe
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 8 deletions.
29 changes: 25 additions & 4 deletions python/lsst/analysis/tools/analysisPlots/skyObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,37 @@ def setDefaults(self):
self.prep.selectors.skyObjectSelector = SkyObjectSelector()

self.process.buildActions.hist_psf_flux = LoadVector(vectorKey="{band}_psfFlux")
self.process.buildActions.hist_09_flux = LoadVector(vectorKey="{band}_ap09Flux")
self.process.buildActions.hist_ap09_flux = LoadVector(vectorKey="{band}_ap09Flux")
self.process.buildActions.hist_gaap1p0_flux = LoadVector(vectorKey="{band}_gaap1p0Flux")
self.process.buildActions.hist_psf_sn = SNCalculator(fluxType="{band}_psfFlux")
self.process.buildActions.hist_09_sn = SNCalculator(fluxType="{band}_ap09Flux")
self.process.buildActions.hist_ap09_sn = SNCalculator(fluxType="{band}_ap09Flux")
self.process.buildActions.hist_gaap1p0_sn = SNCalculator(fluxType="{band}_gaap1p0Flux")

self.produce = HistPlot()

self.produce.panels["panel_flux"] = HistPanel()
self.produce.panels["panel_flux"].label = "Flux (nJy)"
self.produce.panels["panel_flux"].hists = dict(hist_psf_flux="psfFlux", hist_09_flux="ap09Flux")
self.produce.panels["panel_flux"].hists = dict(
hist_psf_flux="psfFlux",
hist_ap09_flux="ap09Flux",
hist_gaap1p0_flux="gaap1p0Flux",
)
self.produce.panels["panel_flux"].rangeType = "sigmaMad"
self.produce.panels["panel_flux"].lowerRange = 3.5
self.produce.panels["panel_flux"].upperRange = 3.5
self.produce.panels["panel_flux"].referenceValue = 0.0
self.produce.panels["panel_flux"].validate()

self.produce.panels["panel_sn"] = HistPanel()
self.produce.panels["panel_sn"].label = "S/N"
self.produce.panels["panel_sn"].hists = dict(hist_psf_sn="psfFlux S/N", hist_09_sn="ap09Flux S/N")
self.produce.panels["panel_sn"].hists = dict(
hist_psf_sn="psf S/N",
hist_ap09_sn="ap09 S/N",
hist_gaap1p0_sn="gaap1p0 S/N",
)
self.produce.panels["panel_sn"].rangeType = "sigmaMad"
self.produce.panels["panel_sn"].lowerRange = 3.5
self.produce.panels["panel_sn"].upperRange = 3.5
self.produce.panels["panel_sn"].referenceValue = 0.0
self.produce.panels["panel_sn"].histDensity = True
self.produce.panels["panel_sn"].validate()
25 changes: 21 additions & 4 deletions python/lsst/analysis/tools/analysisPlots/skySource.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,33 @@ def setDefaults(self):
self.prep.selectors.skySourceSelector = SkySourceSelector()

self.process.buildActions.hist_psf_flux = LoadVector(vectorKey="psfFlux")
self.process.buildActions.hist_09_flux = LoadVector(vectorKey="ap09Flux")
self.process.buildActions.hist_ap09_flux = LoadVector(vectorKey="ap09Flux")
self.process.buildActions.hist_psf_sn = SNCalculator(fluxType="psfFlux")
self.process.buildActions.hist_09_sn = SNCalculator(fluxType="ap09Flux")
self.process.buildActions.hist_ap09_sn = SNCalculator(fluxType="ap09Flux")

self.produce = HistPlot()

self.produce.panels["panel_flux"] = HistPanel()
self.produce.panels["panel_flux"].label = "Flux (nJy)"
self.produce.panels["panel_flux"].hists = dict(hist_psf_flux="psfFlux", hist_09_flux="ap09Flux")
self.produce.panels["panel_flux"].hists = dict(
hist_psf_flux="psfFlux",
hist_ap09_flux="ap09Flux",
)
self.produce.panels["panel_flux"].rangeType = "sigmaMad"
self.produce.panels["panel_flux"].lowerRange = 3.5
self.produce.panels["panel_flux"].upperRange = 3.5
self.produce.panels["panel_flux"].referenceValue = 0.0
self.produce.panels["panel_flux"].validate()

self.produce.panels["panel_sn"] = HistPanel()
self.produce.panels["panel_sn"].label = "S/N"
self.produce.panels["panel_sn"].hists = dict(hist_psf_sn="psfFlux S/N", hist_09_sn="ap09Flux S/N")
self.produce.panels["panel_sn"].hists = dict(
hist_psf_sn="psf S/N",
hist_ap09_sn="ap09 S/N",
)
self.produce.panels["panel_sn"].rangeType = "sigmaMad"
self.produce.panels["panel_sn"].lowerRange = 3.5
self.produce.panels["panel_sn"].upperRange = 3.5
self.produce.panels["panel_sn"].referenceValue = 0.0
self.produce.panels["panel_sn"].histDensity = True
self.produce.panels["panel_sn"].validate()

0 comments on commit d6000fe

Please sign in to comment.