Skip to content

Conversation

@astrojarred
Copy link

This is just a base PR which can later facilitate the addition of the MAGIC reader, addressing #836:

  • Add MAGIC detector class: MAGIC(Detector)
  • Add MAGIC geometry file

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.

Copy link
Collaborator

@Aske-Rosted Aske-Rosted left a 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.

feature_map = {
"x_cam": self._xy,
"y_cam": self._xy,
"tel_id": self._identity,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe a small description of what kind of values the tel_id can take I am assuming that this is an integer?

def _charge(self, x: torch.tensor) -> torch.tensor:
"""Add a small epsilon to avoid log(0)."""
epsilon = 1e-6
return torch.log10(x + epsilon)
Copy link
Collaborator

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.

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