From 66ccf3967bc45c089a10e77172c3ac2988fdb63c Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 10:45:47 +0100 Subject: [PATCH 1/8] fix example in TelescopeComponent docs Example code was not rendering due to typo Fixes #2513 --- src/ctapipe/core/telescope_component.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ctapipe/core/telescope_component.py b/src/ctapipe/core/telescope_component.py index 6b49dae9227..bb86d38d0c1 100644 --- a/src/ctapipe/core/telescope_component.py +++ b/src/ctapipe/core/telescope_component.py @@ -270,7 +270,7 @@ class TelescopeParameter(List): Examples -------- - .. code-block: python + .. code-block:: python tel_param = [ ('type', '*', 5.0), # default for all @@ -280,7 +280,7 @@ class TelescopeParameter(List): ('id', 34, 4.0), # override telescope 34 specifically ] - .. code-block: python + .. code-block:: python tel_param = 4.0 # sets this value for all telescopes From 2dde2d12bcb4659ff09257a26007638e556a282f Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 10:50:45 +0100 Subject: [PATCH 2/8] show inherited members in atmosphere docs --- docs/api-reference/atmosphere/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-reference/atmosphere/index.rst b/docs/api-reference/atmosphere/index.rst index c4815d075be..d38bd73eb01 100644 --- a/docs/api-reference/atmosphere/index.rst +++ b/docs/api-reference/atmosphere/index.rst @@ -15,3 +15,4 @@ Reference/API ============= .. automodapi:: ctapipe.atmosphere + :inherited-members: From 6317c0dd8f501ccdae2872bfdd188937e1de6e06 Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 10:51:56 +0100 Subject: [PATCH 3/8] fix typo in FiveLayerAtmosphereProfile docstring --- src/ctapipe/atmosphere.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctapipe/atmosphere.py b/src/ctapipe/atmosphere.py index f544c634dd7..d716ef1e005 100644 --- a/src/ctapipe/atmosphere.py +++ b/src/ctapipe/atmosphere.py @@ -315,7 +315,7 @@ class FiveLayerAtmosphereDensityProfile(AtmosphereDensityProfile): Layer 5 is modeled with: - ..math:: T(h) = a_5 - b_5 \frac{h}{c_5} + .. math:: T(h) = a_5 - b_5 \frac{h}{c_5} References ---------- From 9fa035bf70bf12ed5fbde335d3aba8bc45a06b9e Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 10:54:51 +0100 Subject: [PATCH 4/8] fix typo (teim -> Time) in coordinates docs also add better type hint --- src/ctapipe/coordinates/nominal_frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ctapipe/coordinates/nominal_frame.py b/src/ctapipe/coordinates/nominal_frame.py index f5e71b93623..ef98b1a75d2 100644 --- a/src/ctapipe/coordinates/nominal_frame.py +++ b/src/ctapipe/coordinates/nominal_frame.py @@ -39,11 +39,11 @@ class NominalFrame(BaseCoordinateFrame): Attributes ---------- - origin: SkyCoord[AltAz] + origin: astropy.coordinates.SkyCoord[AltAz] Origin of this frame as a HorizonCoordinate - obstime: Tiem + obstime: astropy.time.Time Observation time - location: EarthLocation + location: astropy.coordinates.EarthLocation Location of the telescope """ From 5fbea3253f1a3b5ca350608b52c4cf57a68824e8 Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 11:08:00 +0100 Subject: [PATCH 5/8] remove some wrong/outdated info --- src/ctapipe/coordinates/ground_frames.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ctapipe/coordinates/ground_frames.py b/src/ctapipe/coordinates/ground_frames.py index 634c2fc69bc..d2ff7b0fe9f 100644 --- a/src/ctapipe/coordinates/ground_frames.py +++ b/src/ctapipe/coordinates/ground_frames.py @@ -3,15 +3,6 @@ this different systems. Frames and transformations are defined using the astropy.coordinates framework. This module defines transformations for ground based cartesian and planar systems. - -For examples on usage see examples/coordinate_transformations.py - -This code is based on the coordinate transformations performed in the -read_hess code - -TODO: - -- Tests Tests Tests! """ import astropy.units as u import numpy as np From 19fe45e3e86cd53c7e2d4c226978d45ec781bfa9 Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 11:15:28 +0100 Subject: [PATCH 6/8] fix mangled list in example --- examples/visualization/camera_display.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/visualization/camera_display.py b/examples/visualization/camera_display.py index 01d7a18ee36..8bafe99821f 100644 --- a/examples/visualization/camera_display.py +++ b/examples/visualization/camera_display.py @@ -77,11 +77,12 @@ # top of the camera (when parked) is aligned to the X-axis. To show the # camera in another orientation, it’s useful to apply a coordinate # transform to the ``CameraGeometry`` before passing it to the -# ``CameraDisplay``. The following ``Frames`` are supported: \* -# ``EngineeringCameraFrame`` : similar to CameraFrame, but with the top of -# the camera aligned to the Y axis \* ``TelescopeFrame``: In *degrees* (on -# the sky) coordinates relative to the telescope Alt/Az pointing position, -# with the Alt axis pointing upward. +# ``CameraDisplay``. The following ``Frames`` are supported: +# +# * ``EngineeringCameraFrame`` : similar to CameraFrame, but with the top of +# the camera aligned to the Y axis +# * ``TelescopeFrame``: In *degrees* (on the sky) coordinates relative to the +# telescope Alt/Az pointing position, with the Alt axis pointing upward. # fig, ax = plt.subplots(1, 3, figsize=(15, 4)) From 7d00cf64ee73c3874cb1772fa48545212f8f8cc3 Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 11:25:01 +0100 Subject: [PATCH 7/8] fix very outdated tools list --- docs/user-guide/tools.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/tools.rst b/docs/user-guide/tools.rst index 13e80ec7c8f..619b08bf793 100644 --- a/docs/user-guide/tools.rst +++ b/docs/user-guide/tools.rst @@ -14,12 +14,20 @@ You can get a list of all available command-line tools by typing Data Processing Tools ===================== -* ``ctapipe-process``: input R0, R1, or DL0 data and output DL1/DL2 data in HDF5 format -* ``ctapipe-merge``: merge DL1-DL2 data files into a single file -* ``ctapipe-reconstruct-muons``: detect and parameterize muons (deprecated, to be merged with process tool) - +* ``ctapipe-quickstart``: create some default analysis configurations and a working directory +* ``ctapipe-process``: Process event data in any supported format from R0/R1/DL0 to DL1 or DL2 HDF5 files. +* ``ctapipe-apply-models``: Tool to apply machine learning models in bulk (as opposed to event by event). +* ``ctapipe-train-disp-reconstructor`` : Train the ML models for the `ctapipe.reco.DispReconstructor` (monoscopic reconstruction) +* ``ctapipe-train-energy-regressor``: Train the ML models for the `ctapipe.reco.EnergyRegressor` (energy estimation) +* ``ctapipe-train-particle-classifier``: Train the ML models for the `ctapipe.reco.ParticleClassifier` (gamma-hadron separation) + +File Management Tools: +====================== +* ``ctapipe-merge``: Merge multiple ctapipe HDF5 files into one +* ``ctapipe-fileinfo``: Display information about ctapipe HDF5 output files Other Tools =========== -* ``ctapipe-dump-instrument``: writes instrumental info from any supported event input file, and writes them out as FITS files for external use. +* ``ctapipe-info``: print information about your ctapipe installation and its command-line tools. +* ``ctapipe-dump-instrument``: writes instrumental info from any supported event input file, and writes them out as FITS or ECSV files for external use. From a52d4eab836ff4bb6b82f294929d5f14ce970e06 Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Thu, 22 Feb 2024 11:28:06 +0100 Subject: [PATCH 8/8] reformat broken bullet list --- examples/visualization/camera_display.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/visualization/camera_display.py b/examples/visualization/camera_display.py index 8bafe99821f..e38f7e55084 100644 --- a/examples/visualization/camera_display.py +++ b/examples/visualization/camera_display.py @@ -79,11 +79,16 @@ # transform to the ``CameraGeometry`` before passing it to the # ``CameraDisplay``. The following ``Frames`` are supported: # -# * ``EngineeringCameraFrame`` : similar to CameraFrame, but with the top of -# the camera aligned to the Y axis -# * ``TelescopeFrame``: In *degrees* (on the sky) coordinates relative to the -# telescope Alt/Az pointing position, with the Alt axis pointing upward. +# * ``CameraFrame``: The frame used by SimTelArray, with the top +# of the camera on the x-axis +# * ``EngineeringCameraFrame``: similar to CameraFrame, but with +# the top of the camera aligned to the Y axis +# * ``TelescopeFrame``: In *degrees* (on the sky) coordinates +# relative to the telescope Alt/Az pointing position, +# with the Alt axis pointing upward. # +# Note the the name of the Frame appears in the lower-right corner + fig, ax = plt.subplots(1, 3, figsize=(15, 4)) CameraDisplay(geom, image=image, ax=ax[0]) @@ -91,11 +96,6 @@ CameraDisplay(geom.transform_to(TelescopeFrame()), image=image, ax=ax[2]) -###################################################################### -# Note the the name of the Frame appears in the lower-right corner -# - - ###################################################################### # For the rest of this demo, let’s use the ``TelescopeFrame`` #