Skip to content

Commit

Permalink
Merge pull request #2514 from cta-observatory/fix_doc_examples
Browse files Browse the repository at this point in the history
fix some documentation bugs
  • Loading branch information
maxnoe authored Feb 22, 2024
2 parents daf12f0 + a52d4ea commit 3b610d2
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
1 change: 1 addition & 0 deletions docs/api-reference/atmosphere/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Reference/API
=============

.. automodapi:: ctapipe.atmosphere
:inherited-members:
18 changes: 13 additions & 5 deletions docs/user-guide/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
21 changes: 11 additions & 10 deletions examples/visualization/camera_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,25 @@
# 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:
#
# * ``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])
CameraDisplay(geom.transform_to(EngineeringCameraFrame()), image=image, ax=ax[1])
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``
#
Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe/atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
9 changes: 0 additions & 9 deletions src/ctapipe/coordinates/ground_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/ctapipe/coordinates/nominal_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
4 changes: 2 additions & 2 deletions src/ctapipe/core/telescope_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class TelescopeParameter(List):
Examples
--------
.. code-block: python
.. code-block:: python
tel_param = [
('type', '*', 5.0), # default for all
Expand 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
Expand Down

0 comments on commit 3b610d2

Please sign in to comment.