Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-34452: Deprecate calibrate.doInsertFakes and remove gen2-only tests. #667

Merged
merged 6 commits into from Apr 16, 2022

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Apr 14, 2022

No description provided.

doc="Run fake sources injection task"
doc="Run fake sources injection task",
deprecated=("doInsertFakes is no longer supported. This config will be removed after v24. "
"Please use ProcessCcdWithFakesTask instead.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is accurate right now, but @leeskelvin should know about it so he can fix it when the recommendation for what to use instead changes, since that's also in the works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProcessCcdWithFakesTask will itself become obsolete soon, as we transition to using VisitInjectTask and CoaddInjectTask within the new source_injection repo. But yes, for the time being, this is correct.

hasFakes = Field(
dtype=bool,
default=False,
doc="Should be set to True if fake sources have been inserted into the input data."
doc="Should be set to True if fake sources have been inserted into the input data.",
deprecated="hasFakes is no longer supported. This config will be removed after v24."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option is from the newer round of fakes insertion changes and is probably going to be deprecated as part of the moving to gen 3 only but might be a different round of removals.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to have the same deprecation warning as processCcdWithFakes and friends.

exposure = patchRef.get("fakes_" + self.config.coaddName + "Coadd", immediate=True)
else:
exposure = patchRef.get(self.config.coaddName + "Coadd", immediate=True)
exposure = patchRef.get(self.config.coaddName + "Coadd", immediate=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes with the hasFakes config option above.

patchRef.put(results.outputExposure, "fakes_" + coaddName + "_calexp")
else:
patchRef.put(results.outputExposure, coaddName + "_calexp")
patchRef.put(results.outputExposure, coaddName + "_calexp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again here.

@@ -365,7 +360,8 @@ class DeblendCoaddSourcesConfig(Config):
coaddName = Field(dtype=str, default="deep", doc="Name of coadd")
hasFakes = Field(dtype=bool,
default=False,
doc="Should be set to True if fake sources have been inserted into the input data.")
doc="Should be set to True if fake sources have been inserted into the input data.",
deprecated=("hasFakes is no longer supported. This config will be removed after v24."))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here.

coaddType = "fakes_" + self.config.coaddName
else:
coaddType = self.config.coaddName
coaddType = self.config.coaddName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one as well.

@@ -762,7 +755,8 @@ class MeasureMergedCoaddSourcesConfig(PipelineTaskConfig,
hasFakes = Field(
dtype=bool,
default=False,
doc="Should be set to True if fake sources have been inserted into the input data."
doc="Should be set to True if fake sources have been inserted into the input data.",
deprecated="hasFakes is no longer supported. This config will be removed after v24."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another hasFakes

coaddType = "fakes_" + self.config.coaddName
else:
coaddType = self.config.coaddName
coaddType = self.config.coaddName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one too

@erykoff erykoff merged commit 9a336e4 into main Apr 16, 2022
@erykoff erykoff deleted the tickets/DM-34452 branch April 16, 2022 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants