-
Notifications
You must be signed in to change notification settings - Fork 111
Add MAGIC Telescope detector class #837
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
base: main
Are you sure you want to change the base?
Conversation
Aske-Rosted
left a comment
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.
A couple of comments otherwise looks good.
| def _charge(self, x: torch.tensor) -> torch.tensor: | ||
| """Add a small epsilon to avoid log(0).""" | ||
| epsilon = 1e-6 | ||
| return torch.log10(x + epsilon) |
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.
If you would always expect any user to have zero-padding in the data when using the MAGIC detector class then this approach is fine otherwise adding the epsilon as an optional toggle is probably cleaner.
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.
Added an input parameter use_charge_epsilon which seems to be settable now from the config file. Hoping this is the right way to go about it.
|
Thank you for the detailed review! I will take a look asap and let you know if I have questions. |
Aske-Rosted
left a comment
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.
looks good to me.
This is just a base PR which can later facilitate the addition of the MAGIC reader, addressing #836:
MAGIC(Detector)I'm not sure if anything should be updated in the documentation at this point, but I can definitely take care of that in either case when the reader is added.