-
Notifications
You must be signed in to change notification settings - Fork 272
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
Rename Containers 'Camera' to 'Telescope' #2182
Conversation
scipy 1.10 released yesterday and seems to have cythonized something which makes it fail on big-endian data (why do we have those???) that worked before. |
FITS data are stored big-endian I believe, so perhaps reading a FITS image gives you back a big-endian ndarray by default |
7fe13cb
to
2d29c44
Compare
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.
I grepped for cameracontainer
, and found those in docstrings:
ctapipe/image/extractor.py
405: DL1CameraContainer:
ctapipe/calib/camera/pedestals.py
53: Fills the MonitoringCameraContainer.PedestalContainer on the base of a given pedestal sample.
92: Fills the MonitoringCameraContainer.PedestalContainer on the base of a given pedestal sample.
211: DL1CameraContainer
ctapipe/calib/camera/flatfield.py
23: Fills the MonitoringCameraContainer.FlatfieldContainer on the base of a given
65: Fills the MonitoringCameraContainer.FlatfieldContainer on the base of a given
182: DL1CameraContainer
@@ -29,7 +29,7 @@ | |||
"CoreParametersContainer", | |||
"ImageParametersContainer", | |||
"LeakageContainer", | |||
"MonitoringCameraContainer", | |||
"TelescopeMonitoringContainer", |
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.
Why the change of the order of Monitoring and Telescope?
See my general comment: this change is no longer greppable.
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.
That was just for english/readability reasons (telescope monitoring is correct english, while monitoring telescope is not) but it's true that keeping the order might be better. You can of course still grep, but need to specify a better regexp :-) rg "Telescope.*Container"
Note that we also have a few others in this order as well like TelescopeImpactParameterContainer
, which also reads better than ImpactParameterTelescopeContainer (which are semantically different as well)
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.
For class naming usually you prepend less general terms, so it may even be better to change all to the form: DL1Container
+ TelecopeDL1Container
, rather than DL1Container
+DL1TelescopeContainer
. But the current form does also make some sense, it just reads poorly
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.
FWIW, I also favor DL1Container
+ TelescopeDL1Container
, then the former has the implicit Array
-DL1Container
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.
We could even explicitly call it ArrayDL1Container
Since this will be breaking a lot of code, we might want to tackle this (very easy change) with the inverted container hierarchy, to only majorly break the container structure once. But that will be a much larger change. On the other hand, this change is trivial for us, but results in large breakage and no real advantage, so it is not urgent. The other change however, will make much code much simpler (i.e. remove all internal loops in components only caring about single telescopes). |
Yes, but I thought we only use FITS via |
Yes, this may be a better idea - then the renaming can be done at the same time |
So shall we close this in favor of #2204 ? |
closing since superseded by #2204 |
Fixes #2170
Here's a quick first pass thanks to the magic of refactoring tools...