Skip to content

Use valid_data in metrics#1539

Open
mmccrackan wants to merge 1 commit intomasterfrom
260129_qa
Open

Use valid_data in metrics#1539
mmccrackan wants to merge 1 commit intomasterfrom
260129_qa

Conversation

@mmccrackan
Copy link
Contributor

@mmccrackan mmccrackan commented Jan 29, 2026

Preprocessing added a valid_data AxisManager to the preprocess AxisManager in #1371 that keeps track of the final number of detectors at the end of preprocessing. This adds the option to use that instead of passing a field name. The field's valid RangesMatrix and the valid_data.valid_data RangesMatrix may vary since the former is added before the final process's select function (not a concern for the current lite metrics, since the final noise processes do not run select).

@mmccrackan mmccrackan requested a review from tristpinsm January 29, 2026 16:48
Copy link
Contributor

@tristpinsm tristpinsm left a comment

Choose a reason for hiding this comment

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

Should we expect that valid_data not being present is possible in the pipeline? Or would its absence indicate something has gone wrong? I'm wondering because that would determine whether it is best to raise an exception (the latter) or populate an empty result / fallback on another dataset (former).

Apart from that, my only request is that the new behaviour be explained in the docstring.

The threshold for the fraction of valid samples above which a detector is
deemed good (default 0.75)
process_name : str
The process from which to read the valid dataset. (default 'glitches')
Copy link
Contributor

Choose a reason for hiding this comment

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

The behaviour should be explained in the docs.

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.

2 participants