Skip to content

Commit

Permalink
Creation of Flux metrics and source plots
Browse files Browse the repository at this point in the history
Create Flux plots for PSF, AP, and total flux along with a plot for the number of sources
Updated analysis plots

Added back in the source plot
  • Loading branch information
bsmartradio committed Oct 5, 2022
1 parent 15a9f93 commit 97e42fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
26 changes: 7 additions & 19 deletions python/lsst/analysis/tools/analysisMetrics/fluxMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
from lsst.analysis.tools.interfaces import AnalysisMetric


class FluxMeanMetric(AnalysisMetric):
"""Create a metric of the mean psf, aperture, and total
flux from diaSources.
class CentralTendency(AnalysisMetric):
""" Metric for measuring mean and median of psf, ap,
and total flux.
"""

def setDefaults(self):
super().setDefaults()

self.process.calculateActions.psFluxMedianMetric = MedianAction(vectorKey="psFlux")
self.process.calculateActions.apFluxMedianMetric = MedianAction(vectorKey="apFlux")
self.process.calculateActions.totFluxMedianMetric = MedianAction(vectorKey="totFlux")

self.process.calculateActions.psFluxMeanMetric = MeanAction(vectorKey="psFlux")
self.process.calculateActions.apFluxMeanMetric = MeanAction(vectorKey="apFlux")
self.process.calculateActions.totFluxMeanMetric = MeanAction(vectorKey="totFlux")
Expand All @@ -18,22 +22,6 @@ def setDefaults(self):
"psFluxMeanMetric": "flx",
"apFluxMeanMetric": "flx",
"totFluxMeanMetric": "flx",
}


class FluxMedianMetric(AnalysisMetric):
"""Create a metric of the median psf, aperture, and total
flux from diaSources.
"""

def setDefaults(self):
super().setDefaults()

self.process.calculateActions.psFluxMeanMetric = MedianAction(vectorKey="psFlux")
self.process.calculateActions.apFluxMeanMetric = MedianAction(vectorKey="apFlux")
self.process.calculateActions.totFluxMeanMetric = MedianAction(vectorKey="totFlux")

self.produce.units = {
"psFluxMedianMetric": "flx",
"apFluxMedianMetric": "flx",
"totFluxMedianMetric": "flx",
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/analysis/tools/analysisParts/baseFluxRatio.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def setDefaults(self):
self.process.buildActions.loadVectorPsf.vectorKey = "psFlux"
self.process.buildActions.loadVectorAp.vectorKey = "apFlux"

self.process.calculateActions.fluxRatioMetric = DivideVector(
self.process.calculateActions.fluxRatio = DivideVector(
actionA=self.process.buildActions.loadVectorPsf, actionB=self.process.buildActions.loadVectorAp
)

0 comments on commit 97e42fd

Please sign in to comment.