Skip to content

Commit

Permalink
Add analysis_tools plot yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
taranu committed Aug 29, 2023
1 parent 0aa3a9c commit 51b3ff7
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions pipelines/coaddDiffMatchedQualityExtended.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
description: |
Matched difference (multiprofit vs reference) plots/metrics
parameters:
label_model: "MPF PS+Gauss"
name_model: "psgauss"
mag_x_min: 17
mag_x_max: 29
mag_diff_min: -1000
mag_diff_max: 1000
mag_chi_min: -5
mag_chi_max: 5
tasks:
diff_matched_analysis:
class: lsst.analysis.tools.tasks.DiffMatchedAnalysisTask
config:
bands: ["g", "r", "i"]
connections.data: matched_truth_summary_objectTable_tract_multiprofit
connections.outputName: diff_matched_truth_summary_objectTable_tract_multiprofit

# plots
atools.matchedRefMagDiff: MatchedRefCoaddDiffMagPlot
atools.matchedRefMagDiff.fluxes_default.cmodel_err: model_err
atools.matchedRefMagDiff.produce.xLims: mag_x_lims
atools.matchedRefMagDiff.produce.yLims: mag_diff_lims

atools.matchedRefMagChi: MatchedRefCoaddDiffMagPlot
atools.matchedRefMagChi.fluxes_default.cmodel_err: model_err
atools.matchedRefMagChi.produce.xLims: mag_x_lims
atools.matchedRefMagChi.produce.yLims: mag_chi_lims
atools.matchedRefMagChi.compute_chi: true

# atools.matchedRefPositionXDiff: MatchedRefCoaddDiffPositionPlot
# atools.matchedRefPositionXDiff.variable: x

# atools.matchedRefPositionYDiff: MatchedRefCoaddDiffPositionPlot
# atools.matchedRefPositionYDiff.variable: y

python: |
from lsst.analysis.tools.atools.diffMatched import (
MatchedRefCoaddDiffMagMetric,
MatchedRefCoaddDiffPositionMetric,
MatchedRefCoaddDiffMagPlot,
MatchedRefCoaddDiffPositionPlot,
)
from lsst.analysis.tools.atools.genericBuild import FluxConfig
model_err = FluxConfig(
band_format = "{key}",
name_flux = parameters.label_model,
key_flux = f"mpf_{parameters.name_model}_{{band}}_flux",
key_flux_error = "{key_flux}_err"
)
mag_x_lims = (float(parameters.mag_x_min), float(parameters.mag_x_max))
mag_diff_lims = (float(parameters.mag_diff_min), float(parameters.mag_diff_max))
mag_chi_lims = (float(parameters.mag_chi_min), float(parameters.mag_chi_max))
"""
atools.matchedRefPositionXChi: MatchedRefCoaddDiffPositionPlot
atools.matchedRefPositionXChi.variable: x
atools.matchedRefPositionXChi.compute_chi: true
atools.matchedRefPositionYDiff: MatchedRefCoaddDiffPositionPlot
atools.matchedRefPositionYDiff.variable: y

atools.matchedRefPositionYChi: MatchedRefCoaddDiffPositionPlot
atools.matchedRefPositionYChi.variable: y
atools.matchedRefPositionYChi.compute_chi: true

# metrics
atools.matchedRefCModelMagDiffMetric: MatchedRefCoaddDiffMagMetric

atools.matchedRefMagChiMetric: MatchedRefCoaddDiffMagMetric
atools.matchedRefMagChiMetric.compute_chi: true

atools.matchedRefPositionXDiffMetric: MatchedRefCoaddDiffPositionMetric
atools.matchedRefPositionXDiffMetric.variable: x

atools.matchedRefPositionXChiMetric: MatchedRefCoaddDiffPositionMetric
atools.matchedRefPositionXChiMetric.variable: x
atools.matchedRefPositionXChiMetric.compute_chi: true

atools.matchedRefPositionYDiffMetric: MatchedRefCoaddDiffPositionMetric
atools.matchedRefPositionYDiffMetric.variable: y

atools.matchedRefPositionYChiMetric: MatchedRefCoaddDiffPositionMetric
atools.matchedRefPositionYChiMetric.variable: y
atools.matchedRefPositionYChiMetric.compute_chi: true
"""

0 comments on commit 51b3ff7

Please sign in to comment.