Skip to content

Commit

Permalink
Merge pull request #158 from lsst/tickets/DM-41024
Browse files Browse the repository at this point in the history
DM-41024: Add trailed sources metric
  • Loading branch information
bsmartradio committed Nov 16, 2023
2 parents d95aa78 + 9fb7906 commit 948dc86
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pipelines/apDetectorVisitQualityCore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ tasks:
atools.simpleSky: SimpleDiaPlot
python: |
from lsst.analysis.tools.atools import *
analyzeTrailedDiaSrcCore:
class: lsst.analysis.tools.tasks.TrailedDiaSrcDetectorVisitAnalysisTask
config:
# Counts up the number of dia sources in the trailed table.
atools.numDiaSourcesAll: NumDiaSourcesAllMetric
connections.outputName: trailedDiaSrcCore
python: |
from lsst.analysis.tools.atools import *
1 change: 1 addition & 0 deletions python/lsst/analysis/tools/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
from .objectTableTractAnalysis import *
from .propertyMapTractAnalysis import *
from .sourceTableVisitAnalysis import *
from .trailedDiaSrcDetectorVisitAnalysis import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This file is part of analysis_tools.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from __future__ import annotations

__all__ = ("TrailedDiaSrcDetectorVisitAnalysisConfig", "TrailedDiaSrcDetectorVisitAnalysisTask")

from lsst.pipe.base import connectionTypes as ct

from ..interfaces import AnalysisBaseConfig, AnalysisBaseConnections, AnalysisPipelineTask


class TrailedDiaSrcDetectorVisitAnalysisConnections(
AnalysisBaseConnections,
dimensions=("visit", "band", "detector"),
defaultTemplates={"coaddName": "goodSeeing", "fakesType": ""},
):
data = ct.Input(
doc="Output temporarily storing long trailed diaSources.",
name="{fakesType}{coaddName}Diff_longTrailedSrc",
storageClass="DataFrame",
deferLoad=True,
dimensions=("visit", "band", "detector"),
)


class TrailedDiaSrcDetectorVisitAnalysisConfig(
AnalysisBaseConfig, pipelineConnections=TrailedDiaSrcDetectorVisitAnalysisConnections
):
pass


class TrailedDiaSrcDetectorVisitAnalysisTask(AnalysisPipelineTask):
ConfigClass = TrailedDiaSrcDetectorVisitAnalysisConfig
_DefaultName = "TrailedDiaSrcDetectorVisitAnalysis"

0 comments on commit 948dc86

Please sign in to comment.