You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a first ARMSelector implementation for COSIpy event selection.
The selector applies an ARM cut using:
ARM = angular separation(source direction, event axis) - Phi
Updated implementation uses:
Chi galactic
Psi galactic
Phi
all stored in radians
Validated locally on GRB_bn110605183:
ARM cut: ±13 deg
GRB total events: 2,776
GRB selected events: 554
GRB selected fraction: 0.1996
ARM distribution is centered close to 0°, as expected
Tests were updated accordingly:
ARMSelector tests: 5/5 passed locally
Related event-selection tests: 10/10 passed locally
Note:
This is the validated FITS-column implementation. A remaining refinement is adapting it to the full ComptonDataSpaceInSCFrameEventInterface, where SpacecraftHistory is used internally for the sky-to-spacecraft transformation.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.02%. Comparing base (a34afcd) to head (296d8e6). ⚠️ Report is 191 commits behind head on develop.
It's on the right path, but the ARMSelector is not yet working as an EvenSelectionInterface implementation. For that to work, _select needs to accept an EvenDataInterface object, and use it for the calculation. Right now, it's taking a "table-like" object, which doesn't conform with the EvenDataInterface protocol definition. Also, the __init__ method shouldn't take the chi/psi/phi-col parameters, those are also obtained through the input EvenDataInterface object in _select. You can use existing TimeSelector class as a model for what to do.
On a separate note, it would be good if you use the existing RelativeCDSCoordinates class to compute the ARM. If you feel that your code improves upon what's already available, feel free to modify RelativeCDSCoordinates. I just want to avoid duplicated code if possible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a first
ARMSelectorimplementation for COSIpy event selection.The selector applies an ARM cut using:
ARM = angular separation(source direction, event axis) - PhiUpdated implementation uses:
Chi galacticPsi galacticPhiValidated locally on
GRB_bn110605183:Tests were updated accordingly:
Note:
This is the validated FITS-column implementation. A remaining refinement is adapting it to the full
ComptonDataSpaceInSCFrameEventInterface, whereSpacecraftHistoryis used internally for the sky-to-spacecraft transformation.