Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
natelust committed Apr 26, 2023
1 parent 507170a commit 30a4d18
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions python/lsst/analysis/tools/atools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
from .simpleDiaPlot import *
from .skyFluxStatisticMetrics import *
from .skyObject import *
from .skySource import *
from .sources import *
from .stellarLocus import *
4 changes: 3 additions & 1 deletion python/lsst/analysis/tools/interfaces/_analysisTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ def _baseFinalize(self) -> None:
self.populatePrepFromProcess()

def freeze(self):
self.finalize()
if not self.__dict__.get("_finalizeRun"):
self.finalize()
self.__dict__["_finalizeRun"] = True
super().freeze()


Expand Down
19 changes: 10 additions & 9 deletions python/lsst/analysis/tools/interfaces/_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,16 @@ class AnalysisBaseConfig(PipelineTaskConfig, pipelineConnections=AnalysisBaseCon
def freeze(self):
# Copy the meta configuration values to each of the configured tools
# only do this if the tool has not been further specialized
for tool in self.atools:
for tag in self.metric_tags:
tool.metric_tags.insert(-1, tag)
if tool.dataset_identifier is None:
tool.dataset_identifier = self.dataset_identifier
if tool.reference_package == "lsst_distrib":
tool.reference_package = self.reference_package
if tool.timestamp_version == "run_timestamp":
tool.timestamp_version = self.timestamp_version
if not self._frozen:
for tool in self.atools:
for tag in self.metric_tags:
tool.metric_tags.insert(-1, tag)
if tool.dataset_identifier is None:
tool.dataset_identifier = self.dataset_identifier
if tool.reference_package == "lsst_distrib":
tool.reference_package = self.reference_package
if tool.timestamp_version == "run_timestamp":
tool.timestamp_version = self.timestamp_version
super().freeze()

def validate(self):
Expand Down

0 comments on commit 30a4d18

Please sign in to comment.