Skip to content

Commit

Permalink
Merge branch 'tickets/DM-33256'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Aug 12, 2022
2 parents 762897c + fb10651 commit f311ae1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 17 deletions.
6 changes: 5 additions & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Copyright 2017-2019 University of Washington
Copyright 2017-2022 University of Washington
Copyright 2021 University of Illinois Board of Trustees
Copyright 2019-2022 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory
Copyright 2021 Association of Universities for Research in Astronomy, Inc. (AURA)
Copyright 2021 The Trustees of Princeton University
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Input datasets
--------------

:lsst-config-field:`~lsst.verify.tasks.metadataMetricTask.MetadataMetricConfig.metadata`
The metadata of the top-level command-line task (e.g., ``ProcessCcdTask``, ``ApPipeTask``) being instrumented.
Because the metadata produced by each top-level task is a different Butler dataset type, this dataset **must** be explicitly configured when running ``FractionUpdatedDiaObjectsMetricTask`` or a :lsst-task:`~lsst.verify.gen2tasks.MetricsControllerTask` that contains it.
The metadata of the top-level pipeline task (e.g., ``CharacterizeImageTask``, ``DiaPipeTask``) being instrumented.

.. _lsst.ap.association.metrics.FractionUpdatedDiaObjectsMetricTask-subtasks:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ Input datasets
--------------

:lsst-config-field:`~lsst.verify.tasks.metadataMetricTask.MetadataMetricConfig.metadata`
The metadata of the top-level command-line task (e.g., ``ProcessCcdTask``, ``ApPipeTask``) being instrumented.
Because the metadata produced by each top-level task is a different Butler dataset type, this dataset **must** be explicitly configured when running ``NumberNewDiaObjectsMetricTask`` or a :lsst-task:`~lsst.verify.gen2tasks.MetricsControllerTask` that contains it.
The metadata of the top-level pipeline task (e.g., ``CharacterizeImageTask``, ``DiaPipeTask``) being instrumented.

.. _lsst.ap.association.metrics.NumberNewDiaObjectsMetricTask-subtasks:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Input datasets
--------------

:lsst-config-field:`~lsst.verify.tasks.metadataMetricTask.MetadataMetricConfig.metadata`
The metadata of the top-level command-line task (e.g., ``ProcessCcdTask``, ``ApPipeTask``) being instrumented.
Because the metadata produced by each top-level task is a different Butler dataset type, this dataset **must** be explicitly configured when running ``NumberUnassociatedDiaObjectsMetricTask`` or a :lsst-task:`~lsst.verify.gen2tasks.MetricsControllerTask` that contains it.
The metadata of the top-level pipeline task (e.g., ``CharacterizeImageTask``, ``DiaPipeTask``) being instrumented.

.. _lsst.ap.association.metrics.NumberUnassociatedDiaObjectsMetricTask-subtasks:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Input datasets
:lsst-config-field:`~lsst.verify.tasks.apdbMetricTask.ApdbMetricConfig.dbInfo`
The Butler dataset from which the database connection can be initialized.
The type must match the input required by the :lsst-config-field:`~lsst.verify.tasks.apdbMetricTask.ApdbMetricConfig.dbLoader` subtask (default: the top-level science task's config).
If the input is a config, its name **must** be explicitly configured when running ``TotalUnassociatedDiaObjectsMetricTask`` or a :lsst-task:`~lsst.verify.gen2tasks.MetricsControllerTask` that contains it.

.. _lsst.ap.association.metrics.TotalUnassociatedDiaObjectsMetricTask-subtasks:

Expand Down
7 changes: 0 additions & 7 deletions python/lsst/ap/association/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import astropy.units as u

from lsst.verify import Measurement
from lsst.verify.gen2tasks import register
from lsst.verify.tasks import MetadataMetricTask, MetadataMetricConfig, \
ApdbMetricTask, ApdbMetricConfig, MetricComputationError

Expand All @@ -43,7 +42,6 @@ def setDefaults(self):
self.connections.metric = "numNewDiaObjects"


@register("numNewDiaObjects")
class NumberNewDiaObjectsMetricTask(MetadataMetricTask):
"""Task that computes the number of DIASources that create new DIAObjects
in an image, visit, etc..
Expand Down Expand Up @@ -92,7 +90,6 @@ def setDefaults(self):
self.connections.metric = "numUnassociatedDiaObjects"


@register("numUnassociatedDiaObjects")
class NumberUnassociatedDiaObjectsMetricTask(MetadataMetricTask):
"""Task that computes the number of previously-known DIAObjects that do
not have detected DIASources in an image, visit, etc..
Expand Down Expand Up @@ -141,7 +138,6 @@ def setDefaults(self):
self.connections.metric = "fracUpdatedDiaObjects"


@register("fracUpdatedDiaObjects")
class FractionUpdatedDiaObjectsMetricTask(MetadataMetricTask):
"""Task that computes the fraction of previously created DIAObjects that
have a new association in this image, visit, etc..
Expand Down Expand Up @@ -205,7 +201,6 @@ def setDefaults(self):
self.connections.metric = "numTotalSolarSystemObjects"


@register("numTotalSolarSystemObjects")
class NumberSolarSystemObjectsMetricTask(MetadataMetricTask):
"""Task that computes the number of SolarSystemObjects that are
observable within this detectorVisit.
Expand Down Expand Up @@ -256,7 +251,6 @@ def setDefaults(self):
self.connections.metric = "numAssociatedSsObjects"


@register("numAssociatedSsObjects")
class NumberAssociatedSolarSystemObjectsMetricTask(MetadataMetricTask):
"""Number of SolarSystemObjects that were associated with new DiaSources
for this detectorVisit.
Expand Down Expand Up @@ -305,7 +299,6 @@ def setDefaults(self):
self.connections.metric = "totalUnassociatedDiaObjects"


@register("totalUnassociatedDiaObjects")
class TotalUnassociatedDiaObjectsMetricTask(ApdbMetricTask):
"""Task that computes the number of DIAObjects with only one
associated DIASource.
Expand Down
3 changes: 1 addition & 2 deletions tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
from lsst.pipe.base import Task, Struct
import lsst.pipe.base.testUtils
from lsst.verify import Name
from lsst.verify.gen2tasks.testUtils import MetricTaskTestCase
from lsst.verify.tasks import MetricComputationError
from lsst.verify.tasks.testUtils import MetadataMetricTestCase, ApdbMetricTestCase
from lsst.verify.tasks.testUtils import MetricTaskTestCase, MetadataMetricTestCase, ApdbMetricTestCase

from lsst.ap.association.metrics import \
NumberNewDiaObjectsMetricTask, \
Expand Down

0 comments on commit f311ae1

Please sign in to comment.