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-36238: Create AP Number of Dipoles and Number of DIA Sources metrics in analysis_tools. #34

Merged
merged 1 commit into from Nov 1, 2022

Conversation

erinleighh
Copy link
Contributor

No description provided.

def setDefaults(self):
super().setDefaults()

self.process.buildActions.flagSelector = FlagSelector()
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you are not doing any differential filtering (i.e. making two different filter vectors like one for stars and one for galaxies) I would move this flag selector to the prep stage.

  1. Normally quality flags are filtered there anyway as they would apply to all objects
  2. It will make interactive use of your Analysis tool easier. The result of prep stage will directly be all the columns you care about and if necessary you can poke around at it for anything weird prior to sending it to the process stage to have computations done on it.

This would look something like

Suggested change
self.process.buildActions.flagSelector = FlagSelector()
self.prep.selectors.flagSelector = FlagSelector()
self.prep.selectors.flagSelector.selectWhenFalse = [
"base_PixelFlags_flag_bad",
"base_PixelFlags_flag_suspect",
"base_PixelFlags_flag_saturatedCenter",
"base_PixelFlags_flag_interpolated",
"base_PixelFlags_flag_interpolatedCenter",
"base_PixelFlags_flag_edge",
]
self.process.calculateActions.numDiaSources = CountAction(vectorKey="diaSourceId")
self.produce.units = {"numDiaSources": "ct"}

"""Calculate the number of dipoles."""

def setDefaults(self):
super().setDefaults()
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, now that I get down here, something like this for the AnalysisTool above

Copy link
Contributor

@natelust natelust left a comment

Choose a reason for hiding this comment

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

Sorry I forgot to click approve

@erinleighh erinleighh merged commit cadc689 into main Nov 1, 2022
@erinleighh erinleighh deleted the tickets/DM-36238 branch November 1, 2022 18:27
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