-
Notifications
You must be signed in to change notification settings - Fork 269
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
Add calibration calculators #2609
base: main
Are you sure you want to change the base?
Conversation
added PlainExtractor based on numpy and scipy functions
restructured the stats containers
…ctapipe into stats_extractor
Remove StarVarianceExtractor since is functionality is featured in the existing Extractors
allow overlapping extraction sequences
renaming to chunk(s) and chunk_size and _shift added test for chunk_shift and boundary case
) | ||
# Check if at least one chunk is faulty | ||
if np.all(valid_chunks): | ||
raise ValueError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really an error? Or should it just return as a no-op?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check is needed because if all chunks are valid, an empty list would be vstack
later on, which results an error without a proper message. I would prefer to break
here and put a check for the validity of chunks outside this function, to avoid having multiple return
s in one function. I find it really hard to follow the logic of a function with multiple return
s (maybe just a personal taste). If you insists I can modify it to return a no-op. However, if everything went well in the first_pass
, the second_pass
should not be called in my opinion.
After this, we are still missing a And that will finally replace the two classes in |
Correct, we have prototype tools ready in
Yes, we would have to make sure that the interface to |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
polish doctrings for trait help
Analysis Details0 IssuesCoverage and DuplicationsProject ID: cta-observatory_ctapipe_AY52EYhuvuGcMFidNyUs |
This PR contains the
StatisticsCalculator
, which aggregates statistics, detects outliers, handles faulty data chunks. TheStatisticsCalculator
holds two functions to conduct two different passes over the data with and without overlapping chunks. The first pass is conducted with non-overlapping, while overlapping chunks can be set by thechunk_shift
parameter in the second pass. The second pass over the data is only conducted in regions of trouble with a high percentage of faulty pixels exceeding the thresholdfaulty_pixels_threshold
.related to issue #2542