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-37383: Add package to support DM processing of camera runs #210

Merged
merged 3 commits into from Oct 16, 2023

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Sep 6, 2023

Use explicit names for the ISR task calls.

@czwa czwa requested a review from erykoff September 11, 2023 22:00
Copy link
Contributor

@erykoff erykoff left a comment

Choose a reason for hiding this comment

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

First of all, do like the fact that all these isr tasks are getting unique names; I think this will lead to less confusion (as well as enabling single pipelines without clashes). However, I worry that this will break existing workflows (outside of cp_pipe). Does this restructuring need an RFC? (Or at least a wide announcement).

@czwa czwa force-pushed the tickets/DM-37383 branch 2 times, most recently from 102d98c to a846613 Compare September 26, 2023 22:29
@@ -605,7 +605,8 @@ def debugHistogram(self, stepname, ampImage, nSigmaUsed, exp):
plt.close()


class MeasureDefectsCombinedConnections(MeasureDefectsConnections,
class MeasureDefectsCombinedConnections(pipeBase.PipelineTaskConnections,
# MeasureDefectsConnections,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment necessary?

class MeasureDefectsCombinedWithFilterConnections(MeasureDefectsCombinedConnections,
dimensions=("instrument", "detector")):
class MeasureDefectsCombinedWithFilterConnections(pipeBase.PipelineTaskConnections,
# MeasureDefectsCombinedConnections,
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this comment mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment and the previous one removed, as we're avoiding potential connection inheritance issues.

# is what MergeDefectsTask expects. If there are multiple,
# use the one with the most inputs.
tempList = [self.chooseBest(inputs['inputFlatDefects']),
self.chooseBest(inputs['inputDarkDefects'])]
Copy link
Contributor

Choose a reason for hiding this comment

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

So the decision is to just use the one with the most inputs, rather than try to merge all of them from the different filters? Have you confirmed that this does something sensible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the {{cp_testing}} processing, all flats are generated prior to these defects, so the task needs to handle the existence of multiple inputs. I didn't want to simply {{OR}} all of the inputs, as the verify ticket for combined defects showed that the dust spots can trigger masking if they're fainter than the threshold. {{OR}}ing these together means that the output defects may have all faint areas in all dust spots in all filters contributing to the masks.
I will admit that choosing the one with the most inputs is completely arbitrary. However, this is somewhat artificial problem; In general processing, the flats would be inspected prior to use, and a single optimal input selected. Only in the {{cp_testing}} case does this decision need to be made automatically.

@czwa czwa merged commit 1777734 into main Oct 16, 2023
2 checks passed
@czwa czwa deleted the tickets/DM-37383 branch October 16, 2023 21:01
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

2 participants