Skip to content

Commit

Permalink
add similar notes for other Instrument methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kosack authored and maxnoe committed Mar 22, 2024
1 parent efa305f commit fac40f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/ctapipe/instrument/camera/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,26 @@ def get_known_camera_names(cls):

@classmethod
def from_name(cls, name):
"""
Construct a CameraDescription from a camera name
"""Construct a CameraDescription from a camera name
Parameters
----------
name: str
Camera name (e.g. NectarCam, LSTCam, ...)
Notes
-----
Warning: This method loads a pre-generated ``CameraDescription`` and is
thus not guranteed to be the same pixel ordering or even positions that
correspond with event data! Therefore if you are analysing data, you
should not rely on this method, but rather open the data with an
``EventSource`` and use the ``CameraDescription`` that is provided by
``source.subarray.tel[i].camera`` or by
``source.subarray.camera_types[type_name]``. This will guarantee that
the pixels in the event data correspond with the ``CameraDescription``
Returns
-------
CameraDescription
Expand Down
13 changes: 13 additions & 0 deletions src/ctapipe/instrument/telescope.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ def from_name(cls, optics_name, camera_name):
optics name (e.g. LST, or SST-ASTRI), also called
telescope_description
Notes
-----
Warning: This method loads a pre-generated ``TelescopeDescription`` and is
thus not guranteed to be the same pixel ordering or even positions that
correspond with event data! Therefore if you are analysing data, you
should not rely on this method, but rather open the data with an
``EventSource`` and use the ``TelescopeDescription`` that is provided by
``source.subarray.tel[i]`` or by
``source.subarray.telescope_types[type_name]``. This will guarantee that
the pixels in the event data correspond with the ``TelescopeDescription``
Returns
-------
TelescopeDescription
Expand Down

0 comments on commit fac40f9

Please sign in to comment.