Change Log#
ctapipe 0.27.1.dev15+g1af6977ab (2025-10-23)#
API Changes#
Bug Fixes#
Fix the normalization for muon analysis to account for different PixelShapes. [#2865]
Data Model Changes#
New Features#
add a documentation page to show Hillas parameters displayed on camera image as schematic. [#2868]
Maintenance#
Refactoring and Optimization#
ctapipe v0.27.0 (2025-10-10)#
This release contains a major breaking change and introduction of a new plugin interface, both concerned with how monitoring data is handled in ctapipe.
The existing data structures have been reworked and a new MonitoringSource Interface
and plugin entry point are now defined.
See below for details and other smaller new features and bug fixes.
API Changes#
Update definition of the
ctapipe.containers.EventTypeenum to match an updated definition in the CTAO R1 and DL0 data models.SKY_PEDESTAL=2is changed to the genericPEDESTAL, which is expected from most cameras in real data.New types added are
SKY_PEDESTAL=5andRANDOM_MONO=18.These types were previously assigned at the subarray event level but in fact are per telescope event in the data model. A new field
event_typewas added to theTelescopeTriggerContainerand will be filled by theEventSource-implementations in ctapipe. [#2769]Refactor old containers (breaking changes) and implement calibpipe-datapipe interface using a new
MonitoringSource()mechanism.Remove containers
DL1CameraCalibrationContainer,FlatFieldContainer,PedestalContainer,PixelStatusContainer, andWaveformCalibrationContainerAdd containers
CameraCalibrationContainer,MonitoringTelescopeContainer,ChunkStatisticsContainer,PixelStatisticsContainer, andArrayPointingContainerModify containers
MonitoringContainer,MonitoringCameraContainer,PointingContainer,TelescopePointingContainer, andStatisticsContainer,Move pointing tree of
ArrayEventContainerinto the monitoring tree.Remove calibration tree of
ArrayEventContainer. Information is retrieved from themonitoring.tel[tel_id].camera.coefficientstree.Implement
MonitoringSource()to handle different monitoring data sourcesImplement the monitoring sources
HDF5MonitoringSourcethat handles HDF5 file inputImplement Table I/O for camera calibration coefficients following the agreed HDF5 table naming and hierarchy
Remove
ctapipe.calib.camera.flatfieldandctapipe.calib.camera.pedestalmodules. Functionality is implemented in thectapipe.monitoringmodule. [#2802]
Remove the option
DataWriter.write_index_tablesalong with its alias inctapipe-process --write-index-tables. The option seems to corrupt output files for large data sizes, is not used in ctapipe itself and was not tested. [#2853]
Bug Fixes#
Fix image conversion to cartesian in case geometry units are not in meters. [#2779]
Raise a clear error message in the
DispReconstructorin case of non-supported coordinate frames for the pointing directions instead of silently assuming AltAz. [#2785]Avoid astropy warnings in
ctapipe.utils.astro.get_bright_stars. [#2801]In the muon intensity fitting class filters out non-physical solutions for chord vs phi function. [#2803]
Fix HDF5EventSource not properly reading telescope-wise DL2 fields written by
ctapipe-apply-models. [#2824]Fix misleading error messages if a non-existing file is passed via the command-line to a Tool that has another configuration option that uses
Path(default_value=None, allow_none=False).This pattern is now deprecated as it results in these hard to understand error messages due to behavior deep in traitlets.
A warning will be raised if traitlets are defined like this and all ctapipe tools have been adapted to explicitly check for None if a
Pathis required. [#2826]Return the number of events used to compute the statistics in SigmaClippingAggregator. [#2841]
Fixed bug in
ctapipe.core.Tool.get_current_configwhereToolscontaining lists ofComponentsdid not get registered, and thus their configs did not end up in the provenance log. [#2851]
New Features#
Add short-form alternatives to the cli aliases of
ctapipe-optimize-event-selection. [#2770]Use the HDF5Merger to add the observation block and scheduling block info to the DL1 files produced by ctapipe-calculate-pixel-statistics tool. [#2776]
Enable
ctapipe-mergeto be used on camera calibration data and pixel statistics aggregation. [#2787]Generalise the DL2 table processing implemented in IRF tools in order to be used by other usecases that ingest, filter and merge DL2 tables. The module was moved from IRF to IO. [#2791]
Add new cli tool
ctapipe-store-astropy-cacheto download and store astropy data needed for coordinate transformations. [#2823]ctapipe.io.read_tableandctapipe.io.write_tablenow support custom column metadata. [#2824]Add common names of stars to table output of
ctapipe.utils.astro.get_bright_stars. [#2827]Add support for disabling numba caching via
CTAPIPE_DISABLE_NUMBA_CACHE=1environment variable. See numba/numba#10128 for why this might be needed. [#2836]
Maintenance#
fixed confusing (and incorrect) debug log message in download.py
removed all references to
ctapipe_resourcesin the code and docs, since that module is no longer supported. Updated documentation to mention the remote test data server when applicable. [#2782]
Updated the developer environment in environment.yml to be in sync with what is in pyproject.toml. [#2849]
ctapipe v0.26.0 (2025-06-05)#
API Changes#
The algorithms for muon ring fitting have been improved
Upgrade the taubin_circle_fit with weights to avoid bias toward rings with larger radii
Add the optional initial parameters : ring center and radius.
Add a combined ring fitting method (kundu_chaudhuri_taubin).
This new combined method is set to be the default method.
Updated the test with an additional fitting method, each method is tested separately.
Realistic muon ring simulation for all camera types implemented in the test with toy model.
Include the parameter fit errors in the tolerance metric.
Add error fields to the muon container.
The API for MuonFitter has been modified.
Minor documentation updates. [#2736]
Bug Fixes#
Fix
CameraDisplaythrowing an error when used in a matplotlib subfigure. [#2762]
Data Model Changes#
Add error fields to the muon container.
New Features#
Add option
single_obto theHDF5Mergerto support merging chunks of the same observation block into the same. [#2436]Add option to skip the simtel R1 calibration [#2753]
Add support for chunked reading over subsets of a file by passing
start=and/orstop=to theTableLoader.read_..._chunkedmethods. [#2757]
ctapipe 0.25.1 (2025-04-28)#
Bug Fixes#
ctapipe 0.25.0 (2025-04-16)#
Bug Fixes#
Fix units (absence of) for skewness and excess kurtosis in muon analysis [#2732]
Improve heuristic in
SimTelEventSourcefor when true Cherenkov images are expected to be present in the input file. This fixes missing true images in output files when the first event of a run had missing true images. [#2735]Fix inverted sign of
DispReconstructorprediction. [#2738]
Data Model Changes#
Two new fields in the Hillas parameters: 1. psi_uncertainty (uncertainty on the psi angle of the image) 2. transverse_cog_uncertainty (uncertainty on the center of gravity along the transverse axis of the image) [#2629]
New Features#
Add two new fields in the Hillas parameters computations: 1. psi_uncertainty (uncertainty on the psi angle of the image) 2. transverse_cog_uncertainty (uncertainty on the center of gravity along the transverse axis of the image) [#2629]
ctapipe v0.24.0 (2025-03-31)#
Bug Fixes#
Fix
SubarrayDescription.info()in cases of differentTelescopeDescriptionwith the same string representation. [#2673]Make sure that the configuration stored in the provenance information actually contains the full configuration and can be used to re-create the application. [#2688]
Fix the function grouping telescope ids into ranges for the case of unsigned integer telescope ids. [#2692]
Fix
Toolnot exposing all options defined bytraitlets.Applicationby default.Fix
--show-configand--show-config-jsonby not runningsetupandfinishsteps in case those options are given. [#2703]Fix processing gain-selected dl1 data with the
PixelStatisticsCalculatorTool. [#2715]
Data Model Changes#
Change definition of DVR bits in PixelStatus to new definition in DL0 data model. [#2725]
Change format in which event timestamps are written to HDF5 files. Instead of a single float64 MJD value which has ~µs precision, the CTAO high precision time format is used now. This stores the timestamp as two uint32 values: seconds and quarter nanoseconds since
1970-01-01T00:00:00.0 TAI.This only affects the storage format and the precision, the in-memory API is unchanged as it relies on
astropy.time.Timeand values are converted when reading/writing from/to HDF5. [#2707]
New Features#
Add a
ctapipe-optimize-event-selectiontool to produce cut-selection files, based on a gamma, and optionally a proton and an electron DL2 file. Two components for calculating G/H and optionally theta cuts are added:PercentileCutskeeps a certain percentage of gamma events in each bin andPointSourceSensitivityOptimizeroptimizes G/H cuts for maximum point source sensitivity and optionally calculates percentile theta cuts.Add a
ctapipe-compute-irftool to produce irfs given a cut-selection file, a gamma, and optionally a proton, and an electron DL2 input file. Given only a gamma file, the energy dispersion, effective area, and point spread function are calculated. Optionally, the bias and resolution of the energy reconstruction and the angular resolution can be calculated and saved in a separate output file. If a proton or a proton and an electron file is also given, a background model can be calculated, as well as the point source sensitivity.Irfs can be calculated with and without applying a direction cut. Only radially symmetric parameterizations of the irf components are implemented so far. [#2473]
Add a generic stats-calculation tool utilizing the PixelStatisticsCalculator. [#2628]
Add ChunkInterpolator to ctapipe.monitoring.interpolation as a tool to select data from chunks. The planned use for this is to select calibration data. [#2634]
Adds psf models to
ctapipe.instrument.opticswith the parent classPSFModeland a psf model based on pure coma aberration calledComaPSFModel- The functionPSFModel.pdfgives the value of the PSF in a given location [#2643]Add new fields to the MuonParametersContainer.
Implement the computation of the new features listed below and refactor the code using the existing containers.
Added fields: - ring_intensity - intensity_outside_ring - n_pixels_in_ring - mean_intensity_outside_ring - radial_std_dev - skeweness - excess_kurtosis [#2670]
Store also the SubarrayDescription in the camera monitoring data produced by the stats tool [#2696]
Add a method
read_scheduling_blocksin theTableLoaderclass to read scheduling block information. [#2709]Adding a
meta_conventionoption toSubarrayDescription.to_table()method to choose between hdf and fits conventions mainly for the reference location. Default is set to ‘hdf’. In AdditionTableLoaderdoes not join metadata of instrument table wheninstrument=true. [#2722]
Maintenance#
Add a tutorial to the docs on how to use the machine learning tools to process dl1b (image parameters) files to dl2 for a mono analysis.
Perform minor updates to other parts of the api docs and the user-guide. [#2691]
ctapipe v0.23.2 (2025-01-21)#
Bug Fixes#
Fill
ctapipe.containers.SimulatedCameraContainer.true_image_suminHDF5EventSource. Always returned default value of -1 before the fix. [#2680]
Maintenance#
Add compatibility with numpy>=2.1. [#2682]
ctapipe v0.23.1 (2024-12-04)#
Bug Fixes#
Fix
<reconstruction_property>_uncertcalculations inctapipe.reco.StereoMeanCombiner. Add helper functions for vectorized numpy calculations as newctapipe.reco.telescope_event_handlingmodule. [#2658]Fix error in
ctapipe-processwhen in the middle of a simtel file that has true images available, a telescope event is missing the true image. This can happen rarely in case a telescope triggered on pure NSB or is oversaturated to the point where the true pe didn’t fit into memory constraints.The error was due to the
DataWritertrying to write aNoneinto an already setup table for the true images.The
SimTelEventSourcewill now create an invalid true image filled with-1for such events. [#2659]In
SimTelEventSource, ignore telescope events that did not take part in the stereo event trigger. This happens rarely in Prod6 files in conjunction with the random mono trigger system.Fix the order in which
Toolruns final operations to fix an issue of provenance not being correctly recorded. [#2662]Fix data type of
tel_idin the output ofSubarrayDescription.to_tableFixed a bug where if a configuration file with unknown file extension was passed to a tool, e.g.
--config myconf.confinstead of--config myconf.yaml, it was silently ignored, despite an info log saying “Loading config file myconf.conf”. Configuration files must now have one of the following extensions to be recognized: yml, yaml, toml, json, py. If not aToolConfigurationErroris raised. [#2666]
Maintenance#
ctapipe v0.23.0 (2024-11-18)#
API Changes#
Add possibility to use
HIPPARCOScatalog to get star positionsadd catalogs enumerator to
ctapipe.utils.astroupdate
get_bright_starsinctapipe.utils.astroto allow catalog selectionensure application of proper motion
add possibility to select stars on proximity to a given position and on apparent magnitude
Bundle star catalogs in the python package
API change:
ctapipe.utils.astro.get_bright_starsnow requires a timestamp to apply proper motion. In the prevision revision, the time argument was missing and the proper motion was not applied. [#2625]
Move the simulated shower distribution from something that was specific to
SimTelEventSourceto a general interface ofEventSource. Implement the new interface in bothSimTelEventSourceandHDF5EventSourceand adapt writing of this information inDataWriter.This makes sure that the
SimulatedShowerDistributioninformation is always included, also when runningctapipe-processconsecutively. [#2633]The following dependencies are now optional:
eventio, used for
ctapipe.io.SimTelEventSource.matplotlib, used
ctapipe.visualization.CameraDisplay,ctapipe.visualization.ArrayDisplay, and most default visualization tasks, e.g..peek()methods.iminuit, used for the
ctapipe.image.muonandctapipe.reco.impactfitting routines.bokeh, for
ctapipe.visualiation.bokeh
Code that needs these dependencies will now raise
ctapipe.exceptions.OptionalDependencyMissingin case such functionality is used and the dependency in question is not installed.These packages will now longer be installed by default when using e.g.
pip install ctapipe.If you want to install ctapipe with all optional dependencies included, do
pip install "ctapipe[all]".For
conda, we will publish to packages:ctapipewill include all optional dependencies and a newctapipe-basepackage will only include the required dependencies.[#2641]
Add possibility to directly pass the reference metadata to
Provenance.add_input_file.Remove the call to
Provenace.add_input_filefrom theEventSourcebase class.Add the proper calls to
Provenance.add_input_fileinHDF5EventSource(providing the metadata) andSimTelEventSource(not providing metadata yet, but avoiding a warning)Plugin implementations of
EventSourceshould make sure they register their input files usingProvenance.add_input_file, preferably providing also the reference metadata. [#2648]
Bug Fixes#
Fix ensuring that hdf5 files created with older versions of ctapipe, e.g. the public dataset created with 0.17 can be read by ctapipe-process. These files contain pointing information at a different location and are missing the subarray reference location, which was introduced in later versions of ctapipe. A dummy location (lon=0, lat=0) is used for these now, the same value is already used for simtel files lacking this information. [#2627]
New Features#
Add option
override_obs_idtoSimTelEventSourcewhich allows assigning new, uniqueobs_idsin case productions reuse CORSIKA run numbers. [#2411]Add calibration calculators which aggregates statistics, detects outliers, handles faulty data chunks. [#2609]
- Update 
CameraCalibratorinctapipe.calib.camera.calibratorallowing it to correctly calibrate variance images generated with theVarianceExtractor. If the
VarianceExtractoris used for theCameraCalibratorthe element-wise square of the relative and absolute gain calibration factors are applied to the image;For other image extractors the plain factors are still applied.
The
VarianceExtractorprovides no peak time and the calibrator will skip shifting the peak time for extractors like theVarianceExtractorthat similarly do not provide a peak time [#2636]
- Update 
 Add
__repr__methods to all objects that were missing them inctapipe.io.metadata, update the existing ones for consistency. [#2650]
ctapipe v0.22.0 (2024-09-12)#
API Changes#
The
PointingInterpolatorwas moved fromctapipe.iotoctapipe.monitoring. [#2615]
Bug Fixes#
New Features#
ctapipe is now compatible with numpy 2.0. [#2580] Note: not all new behaviour of numpy 2.0 is followed, as the core dependency
numbadoes not yet implement all changes from numpy 2.0. See the numba announcement for more detail.Add lstchains image cleaning procedure including its pedestal cleaning method. [#2541]
A new ImageExtractor called
VarianceExtractorwas added An Enum class was added to containers.py that is used in the metadata of the VarianceExtractor output [#2543]Add API to extract the statistics from a sequence of images. [#2554]
The provenance system now records the reference metadata of input and output files, if available. [#2598]
Add Interpolator class to generalize the PointingInterpolator in the monitoring collection. [#2600]
Add outlier detection components to identify faulty pixels. [#2604]
The
ctapipe-mergetool now checks for duplicated input files and raises an error in that case.The
HDF5Mergerclass, and thus also thectapipe-mergetool, now checks for duplicated obs_ids during merging, to prevent invalid output files. [#2611]The
Instrument.sitemetadata item now accepts any string, not just a pre-defined list of sites. [#2616]
Refactoring and Optimization#
Update exception handling in tools
Add a possibility to handle custom exception in
Tool.run()with the preservation of the exit code. [#2594]
ctapipe v0.21.2 (2024-06-26)#
A small bugfix release to add support for scipy 1.14.
Also contains a small new feature regarding exit code handling in Tool.
Bug Fixes#
Replace deprecated usage of scipy sparse matrices, adds support for scipy 1.14. [#2569]
New Features#
Add
SystemExithandling at thectapipe.core.ToollevelIf a
SystemExitwith a custom error code is generated during the tool execution, the tool will be terminated gracefully and the error code will be preserved and propagated.The
Activitystatuses have been updated to["running", "success", "interrupted", "error"]. The"running"status is assigned at init. [#2566]
Maintenance#
made plugin detection less verbose in logs: DEBUG level used instead of INFO [#2560]
ctapipe v0.21.1 (2024-05-15)#
This is a small bug fix and maintenance release for 0.21.0.
Bug Fixes#
Fix
SoftwareTriggernot correctly handling different telescope types that have the same string representation, e.g. the four LSTs in prod6 files.Telescopes that have the same string representation now always are treated as one group in
SoftwareTrigger. [#2552]
Maintenance#
A number of simple code cleanups in the ImPACT reconstructor code. [#2551]
ctapipe v0.21.0 (2024-04-25)#
API Changes#
reference_locationis now a required argument forSubarrayDescription[#2402]CameraGeometry.position_to_pix_indexwill now return the minimum integer value for invalid pixel coordinates instead of -1 due to the danger of using -1 as an index in python accessing the last element of a data array for invalid pixels. The function will now also no longer raise an error if the arguments are empty arrays and instead just return an empty index array. The function will also no longer log a warning in case of coordinates that do not match a camera pixel. The function is very low-level and if not finding a pixel at the tested position warrants a warning or is expected will depend on the calling code. [#2397]Change the definition of the
leakage_pixels_width_{1,2}image features to give the ratio of pixels at the border to the pixels after cleaning instead of to the total number of pixels of the camera. [#2432]Change how the
DataWriterwrites pointing information. Before, each unique pointing position was written in a table with the event time as index column intodl1/monitoring/telescope/pointing.This has two issues: For observed data, each pointing will be unique in horizontal coordinates due to tracking a fixed ICRS coordinate. Resulting in a pointing position written for each event, although the resolution of the monitoring is much lower. For simulated events, the event time is the timestamp of the simulation and pointing is fixed in
AltAz.ctapipewas using the closest point in time for simulated events when reading data back in, however, this is problematic in case of many simulation runs processed in parallel.We now store the first received pointing information in the
configuration/telescope/pointingtable per obs id, only for simulation events. [#2438]Replace
n_signalandn_backgroundoptions inctapipe-train-particle-classifierwithn_eventsandsignal_fraction, wheresignal_fraction= n_signal / (n_signal + n_background). [#2465]Move the
TableLoaderoptions from being traitlets to eachread_...method allowing to load different data with the same TableLoader-Instance.In addition the default values for the options have changed. [#2482]
Adding monitoring: MonitoringCameraContainer as keyword argument to the
ImageCleanerAPI so cleaning algorithms can now access relevant information for methods that e.g. require monitoring information. [#2511]Unified the options for DataWriter and the data level names:
Old
New
write_raw_waveformswrite_r0_waveformswrite_waveformswrite_r1_waveformswrite_imageswrite_dl1_imageswrite_parameterswrite_dl1_parameterswrite_showerswrite_dl2This changes requires that existing configuration files are updated if they use these parameters [#2520]
Bug Fixes#
Ensure that
SubarrayDescription.reference_locationis always generated by`SimTelEventSource, even if the metadata is missing. In that case, construct a dummy location with the correct observatory height and latitude and longitude equal to zero (“Null Island”).Fixed the definition of
h_max, which was both inconsistent betweenHillasReconstructorandHillasIntersectionimplementations, and was also incorrect since it was measured from the observatory elevation rather than from sea level.The value of
h_maxis now defined as the height above sea level of the shower-max point (in meters), not the distance to that point. Therefore it is not corrected for the zenith angle of the shower. This is consistent with the options currently used for CORSIKA, where the SLANT option is set to false, meaning heights are actual heights not distances from the impact point, andx_maxis a depth, not a slant depth. Note that this definition may be inconsistent with other observatories where slant-depths are used, and also note that the slant depth or distance to shower max are the more useful quantities for shower physics. [#2403]Add the example config for ctapipe-train-disp-reconstructor to the list of configs generated by ctapipe-quickstart. [#2414]
Do not use a hidden attribute of
SKLearnReconstructorinctapipe-apply-models. [#2418]Add docstring for
ctapipe-train-disp-reconstructor. [#2420]Remove warnings about missing R1 or DL0 data when using the CameraCalibrator. These were previously emitted directly as python warnings and did not use the component logging system, which they now do. As we do not actually expect R1 to be present it was also moved down to debug level. [#2421]
Check that the array pointing is given in horizontal coordinates before training a
DispReconstructor. [#2431]Fix additional, unwanted columns being written into disp prediction output. [#2440]
Properly transform pixel coordinates between
CameraFrameandTelescopeFrameinMuonIntensityFittertaking. Before,MuonIntensityFitteralways used the equivalent focal length for transformations, now it is using the focal length attached to theCameraGeometry, thus respecting thefocal_length_choiceoptions of the event sources. [#2464]Fix colored logging in case of custom log levels being defined. [#2505]
Fix a possible out-of-bounds array access in the FlashCamExtractor. [#2544]
Data Model Changes#
Remove redundant
is_validfield inDispContainerand rename the remaining field. Use the same prefix for both containers filled byDispReconstructor.Fix default name of
DispReconstructortarget column.Let
HDF5EventSourceloadDispContainer. [#2443]Change R1- and DL0-waveforms datamodel shape from (n_pixels, n_samples) to be always (n_channels, n_pixels, n_samples).
HDF5EventSourcewas adjusted accordingly to support also older datamodel versions.Re-introduce also the possibility of running
ImageExtractors on data consisting of multiple gain channels. [#2529]
New Features#
Large updates to the Image Pixel-wise fit for Atmospheric Cherenkov Telescopes reconstruction method (https://doi.org/10.48550/arXiv.1403.2993)
ImPACT - General code clean up and optimisation. Now updated to work similarly to other reconstructors using the standardised interface, such that it can be used ctapipe-process. Significant improvements to tests too
ImPACT_utilities - Created new file to hold general usage functions, numba used in some areas for speedup
template_network_interpolator - Now works with templates with different zenith and azimuth angles
unstructured_interpolator - Significant speed improvements
pixel_likelihood - Constants added back to neg_log_likelihood_approx, these are quite important to obtaining a well normalised goodness of fit.
hillas_intersection - Fixed bug in core position being incorrectly calculated, fixed tests too [#2305]
Allow passing the matplotlib axes to the
SubarrayDescription.peekfunction, fix warnings in case of layout engine being already defined. [#2369]Add support for interpolating a monitoring pointing table in
TableLoader. The corresponding table is not yet written byctapipe, but can be written by external tools. This is to enable analysis of real observations, where the pointing changes over time in alt/az. [#2409]Implement the overburden-to height a.s.l. transformation function in the atmosphere module and test that round-trip returns original value. [#2422]
In case no configuration is found for a telescope in
TelescopeParameter, it is now checked whether the telescope exists at all to provide a better error message. [#2429]Allow setting n_jobs on the command line for the train_* and apply_models tools using a new
n_jobsflag. This temporarily overwrites any settings in the (model) config(s). [#2430]Add support for using
strandPathobjects as input toctapipe.io.get_hdf5_datalevels. [#2451]The recommended citation for ctapipe has been updated to the ICRC 2023 proceeding, please update. [#2470]
Support astropy 6.0. [#2475]
The
DispReconstructornow computes a score for how certain the prediction of the disp sign is. [#2479]Also load the new fixed pointing information in
TableLoader.Add option
keep_ordertoctapipe.io.astropy_helpers.join_allow_emptythat will keep the original order of rows when performing left or right joins. [#2481]Add an
AstroQuantitytrait which can hold anyastropy.units.Quantity. [#2524]Add function
ctapipe.coordinates.get_point_on_shower_axisthat computes a point on the shower axis in alt/az as seen from a telescope. [#2537]Update bokeh dependency to version 3.x. [#2549]
Maintenance#
The CI system now reports to the CTA SonarQube instance for code quality tracking [#2214]
Updated some numpy calls to not use deprecated functions. [#2406]
The
ctapipesource code repository now uses thesrc/-based layout. This fixes the editable installation of ctapipe. [#2459]Fix headings in docs. Change occurrences of
API ReferencetoReference/APIfor consistency. Change capitalization of some headings for consistency. [#2474]The
from_namemethods of instrument description classes now raise a warning that it is better to access instrument information via aSubarrayDescription.Also improve documentation in instrument module to explain when not to use the various
from_name()methods. These are provided for the case when no event data is available, e.g. for unit testing or demos, but do not guarantee that the returned instrument information corresponds to a particular set of event data. [#2485]Support and test on python 3.12. [#2486]
Drop support for python 3.9. [#2526]
Refactoring and Optimization#
Load data and apply event and column selection in chunks in
ctapipe-train-*before merging afterwards. This reduces memory usage. [#2423]Make default ML config files more readable and add comments. [#2455]
Update and add missing docstrings related to the ML functionalities. [#2456]
Add
true_impact_distanceto the output ofCrossValidator. [#2468]Add
cache=Trueto some numba-compiled functions which were missing it. [#2477]Write cross validation results for each model out immediately after validation to free up memory earlier. [#2483]
Compute deconvolution parameters in FlashCamExtractor only as needed. [#2545]
ctapipe v0.20.0 (2023-09-11)#
API Changes#
The
ctapipe-dump-triggerstool was removed, since it wrote a custom data format not compatible with e.g. the output of theDataWriterandctapipe-process. If you only want to store trigger and simulation information from simulated / DL0 input files into the ctapipe format HDF5 files, you can now usectapipe-process -i <input> -o <output> --no-write-parameters. [#2375]Change the fill value for invalid telescope ids in
SubarrayDescription.tel_index_arrayfrom-1tonp.iinfo(int).minvalto prevent-1being used as an index resulting in the last element being used for invalid telescope ids. [#2376]Remove
EventSource.from_config, simply useEventSource(config=config)orEventSource(parent=parent). [#2384]
Data Model Changes#
Added missing fields defined in the CTAO R1 and DL0 data models to the corresponding containers. [#2338]
Remove the
injection_heightfield from theSimulationConfigContainer, this field was always empty and is never filled bysim_telarray.Add the corresponding
starting_grammagefield to theSimulatedShowerContainer, where it is actually available. [#2343]Added new fields to the
MuonEfficiencyContainer-is_validto check if fit converged successfully,parameters_at_limitto check if parameters were fitted close to a bound andlikelihood_valuewhich represents cost function value atthe minimum. These fields were added to the output of theMuonIntensityFitter. [#2381]
New Features#
Bug Fixes#
The
`HillasIntersection`method used to fail when individual events were reconstructed to originate from a FoV offset of more than 90 degrees. This is now fixed by returning an INVALID container for a reconstructed offset of larger than 45 degrees. [#2265]Fixed a bug in the calculation of the full numeric pixel likelihood and the corresponding tests. [#2388]
Maintenance#
ctapipe 0.19.3 (2023-06-20)#
This is a bugfix release fixing a number of bugs, mainly one preventing the processing of divergent pointing
prod6 data due to a bug in SoftwareTrigger, see below for details.
Bug Fixes#
Fix peak time units of FlashCamExtractor (See cta-observatory/ctapipe#2336) [#2337]
Fix shape of mask returned by
NullDataVolumeReducer. [#2340]Fix definition of the
--dl2-subarrayflag ofctapipe-merge. [#2341]Fix
ctapipe-train-disp-reconstructor --helpraising an exception. [#2352]Correctly fill
reference_locationforSubarrayDescription.tel_coords. [#2354]Fix
SoftwareTriggernot removing all parts of a removed telescope event from the array event leading to invalid files produced byDataWriter. [#2357]Fix that the pixel picker of the matplotlib
CameraDisplaytriggers also for clicks on otherCameraDisplayinstances in the same figure. [#2358]
New Features#
Maintenance#
Improve docstring and validation of parameters of
CameraGeometry. [#2361]
ctapipe v0.19.2 (2023-05-17)#
This release contains a critical bugfix for the FlashCamExtractor that resulted
in non-sensical peak time values in DL1, see below.
Bug Fixes#
ctapipe v0.19.1 (2023-05-11)#
This release is a small bugfix release for v0.19.0, that also includes a new feature enabling computing different telescope multiplicities in the machine learning feature generation.
Thanks to the release of numba 0.57 and some minor fixes, ctapipe is now also compatible with Python 3.11.
Bug Fixes#
Fix
ApplyModels.overwrite. [#2311]Fix for config files not being included as inputs in provenance log. [#2312]
Fix calculation of the neighbor matrix of
CameraGeometryfor empty and single-pixel geometries. [#2317]Fix HDF5Writer not working on windows due to using pathlib for hdf5 dataset names. [#2319]
Fix StereoTrigger assuming the wrong data type for
tels_with_trigger, resulting in it not working for actual events read from an EventSource. [#2320]Allow disabling the cross validation (by setting
CrossValidator.n_cross_validations = 0) for the train tools. [#2310]
New Features#
Add
SubarrayDescription.multiplicitymethod that can compute telescope multiplicity for a given telescope boolean mask, either for all telescope or a given telescope type.Enable adding additional keyword arguments to
FeatureGenerator.Pass the
SubarrayDescriptiontoFeatureGeneratorin sklearn classes. [#2308]
Maintenance#
Add support for python 3.11. [#2107]
ctapipe v0.19.0 (2023-03-30)#
API Changes#
Renamed
GeometryReconstructortoHillasGeometryReconstructor[#2293]
Bug Fixes#
Data Model Changes#
New Features#
Add signal extraction algorithm for the FlashCam. [#2188]
Maintenance#
The
examples/subdirectory was removed as most scripts there were out of date. Useful information in those examples was moved to example notebooks in docs/examples [#2266]The tools to train ml models now provide better error messages in case the input files did not contain any events for specific telescope types. [#2295]
Refactoring and Optimization#
ctapipe v0.18.1 (2023-03-16)#
Bug Fixes#
ctapipe v0.18.0 (2023-02-09)#
API Changes#
ctapipe now uses entry points for plugin discovery.
EventSourceimplementations now need to advertise actapipe_ioentry point, to be discovered by ctapipe. Additionally, ctapipe now includes preliminary support for discoveringReconstructorimplementations via thectapipe_recoentry_point. [#2101]Migrate muon analysis into the
ctapipe-processtool:The former
muon_reconstructiontool is dropped and all functionalities are transferred into thectapipe-processtool.The
processtool now has awrite_muon_parametersflag which defaults tofalse. Muons are only analyzed and written if the flag is set. Analyzing muons requires DL1 image parameters, so they are computed in case they are not available from the input even if the user did not explicitly ask for the computation of image parameters.Two instances of
QualityQuery,MuonProcessor.ImageParameterQueryandMuonProcessor.RingQueryare added to the muon analysis to either preselect images according to image parameters and to select images according to the initial, geometrical ring fit for further processing. Deselected events or those where the muon analysis fails are being returned and written filled with invalid value markers instead of being ignored. Base configure options for the muon analysis were added to thebase_config.yaml.The
DataWriternow writes the results of a muon analysis into/dl1/event/telescope/muon/tel_id, givenwrite_moun_parametersis set totrue.Muon nodes were added to the
HDF5EventSource, theTableLoaderand thectapipe-mergetool. [#2168]
Change default behaviour of
run_rool:The default value of
raisesis nowTrue. That means, when usingrun_tool, the Exceptions raised by a Tool will be re-raised. The raised exceptions can be tested for their type and content. If the Tool must fail and only the non-zero error case is important to test, setraises=False(as it was before).If the
cwdparameter isNone(as per default), now a temporary directory is used instead of the directory, whererun_toolis called (typically via pytest). This way, log-files and other output files don’t clutter your working space. [#2175]
Remove
-fflag as alias for--overwriteand fail early if output exists, but overwrite is not set [#2213]The
_chunkedmethods of theTableLoadernow return an Iterator over namedtuples with start, stop, data. [#2241]Remove debug-logging and early-exits in
hdf5eventsourceso broken files raise errors. [#2244]
New Features#
Implement Components and Tools to perform training and application of machine learning models based on scikit-learn.
Four new tools are implemented: -
ctapipe-train-energy-regressor-ctapipe-train-particle-classifier-ctapipe-train-disp-reconstructor-ctapipe-apply-modelsThe first two tools are used to train energy regression and particle classification respectively. The third tool trains two models for geometrical reconstruction using the disp method and the fourth tool can apply those models in bulk to input files.
ctapipe-processcan now also apply these trained models directly in the event loop.The intended workflow is to process training files to a combined dl1 / dl2 level using
ctapipe-process, merging those to large training files usingctapipe-mergeand then train the models. [#1767, #2121, #2133, #2138, #2217, #2229, #2140]Toolnow comes with anExitStackthat enables proper handling of context-manager members insideTool.run. Things that require a cleanup step should be implemented as context managers and be added to the tool like this:self.foo = self.enter_context(Foo())
This will ensure that
Foo.__exit__is called when theToolterminates, for whatever reason. [#1926]Implement atmospheric profiles for conversions from h_max to X_max. The new module
ctapipe.atmospherehas classes for the most common cases of a simpleExponentialAtmosphereDensityProfile, aTableAtmosphereDensityProfileand CORSIKA’sFiveLayerAtmosphereDensityProfile. [#2000]TableLoadercan now also load observation and scheduling block configuration. [#2096]The
ctapipe-infotool now supports printing information about the availableEventSourceandReconstructorimplementations as well as io and reco plugins. [#2101]Allow lookup of
TelescopeParametervalues by telescope type. [#2120]Implement a
SoftwareTriggercomponent to handle the effect of selecting sub-arrays from larger arrays in the simulations. The component can remove events where the stereo trigger would not have decided to record an event and also remove single telescopes from events for cases like the CTA LSTs, that have their own hardware stereo trigger that requires at least two LSTs taking part in an event. [#2136]It’s now possible to transform between
GroundFramecoordinates andastropy.coordinates.EarthLocation, enabling the conversion between relative array coordinates (used in the simulation) and absolute real-world coordinates. [#2167]The
ctapipe-display-dl1tool now has aQualityQueryinstance which can be used to select which images should be displayed. [#2172]Add a new
ctapipe.io.HDF5Mergercomponent that can selectively merge HDF5 files produced with ctapipe. The new component is now used in thectapipe-mergetool but can also be used on its own. This component is also used byctapipe-apply-modelsto selectively copy data from the input file to the output file. Through using this new component,ctapipe-mergegained support for fine-grained control which information should be included in the output file and for appending to existing output files. [#2179]CameraDisplay.overlay_coordinatecan now be used to plot coordinates into the camera display, e.g. to show the source position or the position of stars in the FoV. [#2203]
Bug Fixes#
Fix for Hillas lines in
ArrayDisplaybeing wrong in the newEastingNorthingFrame. [#2134]Replace usage of
$HOMEwithPath.home()for cross-platform compatibility. [#2155]Fix for
TableLoaderhaving the wrong data types forobs_id,event_idandtel_id. [#2163]Fix
Toolprinting a large traceback in case of certain configuration errors. [#2171]The string representation of
Fieldnow sets numpy print options to prevent large arrays in the docstrings ofContainerclasses. [#2173]Fix missing comma in eventio version requirement in setup.cfg (#2185). [#2187]
Move reading of stereo data before skipping empty events in HDF5EventSource, this fixes a bug where the stereo data and simulation data get out of sync with the other event data when using
allowed_tels. [#2189]Fix mixture of quantity and unit-less values passed to
np.histograminctapipe.image.muon.ring_completeness, which raises an error with astropy 5.2.1. [#2197]
Maintenance#
Use towncrier for the generation of change logs [#2144]
Replace usage of deprecated astropy matrix function. [#2166]
Use
weakref.proxy(parent)inComponent.__init__.Due to the configuration systems, children need to reference their parent(s). When parents get out of scope, their children still hold the reference to them. That means that python cannot garbage-collect the parents (which are Tools, most of the time).
This change uses weak-references (which do not increase the reference count), which means parent-Tools can get garbage collected by python.
This decreases the memory consumption of the tests by roughly 50%. [#2223]
Refactoring and Optimization#
Speed-up table loader by using
hstackinstead ofjoinwhere possible. [#2126]
v0.7.0 – 0.17.0#
For changelogs for these releases, please visit the github releases page
v0.6.1#
Fix broken build (#743) @kosack
Add example script for a simple event writer (#746) @jjlk
Fix camera axis alignment in HillasReconstructor (#741) @mackaiver
Lst reader (#749) @FrancaCassol
replace deprecated astropy broadcast (#754) @mackaiver
A few more example notebooks (#757) @kosack
Add MC xmax info (#759) @mackaiver
Use Astropy Coordinate Transofmations For Reconstruction (#758) @mackaiver
Trigger pixel reader (#745) @thomasarmstrong
Change requested in #742: init Hillas skewness and kurtosis to NaN (#744) @STSpencer
Fix call to np.linalg.leastsq (#760) @kosack
Fix/muon bugs (#762) @kosack
Implement hillas features usen eigh (#748) @MaxNoe
Use HillasParametersContainer only (#763) @MaxNoe
Regression features in
RegressorClassifierBase(#764) @vuillautAdding an example notebook no how to convert hex geometry to square and back (#767) @vuillaut
Wrong angle in ArrayDisplay. changed phi to psi. (#771) @thomasgas
Unstructured interpolator (#770) @ParsonsRD
Lst reader (#776) @FrancaCassol
Fixing core reconstruction (#777) @kpfrang
Leakage (#783) @MaxNoe
Revert “Fixing core reconstruction” (#789) @kosack
Fixing the toy image generator (#790) @MaxNoe
Fix bad builds by changing channel name (missing pyqt package) (#793) @kosack
Implement concentration image features (#791) @MaxNoe
updated main documentation page (#792) @kosack
Impact intersection (#778) @mackaiver
add test for sliced geometries for hillas calculation (#781) @mackaiver
Simple HESS adaptations (#794) @ParsonsRD
added a config file for github release-drafter plugin (#795) @kosack
Array plotting (#784) @thomasgas
Minor changes: mostly deprecationwarning fixes (#787) @mireianievas
Codacy code style improvements (#796) @dneise
Add unit to h_max in HillasReconstructor (#797) @jjlk
speed up unit tests that use test_event fixture (#798) @kosack
Update Timing Parameters (#799) @LukasNickel
v0.6.0#
This is an interim release, after some major refactoring, and before we add the automatic gain selection and refactored container classes. It’s not intended yet for production.
Some Major changes since last release:
new
EventSourceclass hierarchy for reading event data, which now supports simulation and testbench data from multiple camera prototypes (notably CHEC, SST-1M, NectarCam)new
EventSeekerclass for (inefficient) random event access.a much improved
Factoryclassre-organized event data structure (still evolving) - all scripts not in ctapipe must be changed to work with the new data items that were re-named (a migration guide will be given in the 0.7 release)
better HDF5 table output, supporting merging multiple
Containersinto a single output tableimprovements to Muon analysis, and the muon example script
improvements to the calibration classes
big improvements to the Instrument classes
lots of cleanups and bug fixes
much more…
v0.5.3 (unreleased)#
- Major speed improvements to calibration code, particularly
 NeighborPeakIntegrator(Jason Watson, #490), which now uses some compiled c-code for speed.
GeometryConverternow works for all cameras (Tino Michael, #)Plotting improvements when overlays are used (MaxNoe, #489)
Fixes to coordinate
PlanarRepresentation(MaxNoe, #506)HDF5 output for charge resolution calculation (Jason Watons, #488)
Stastical errors added to sensitivity calculation (Tino Michel, #508)
Error estimator for direction and h_max fits in
HillasReconstructor(Tino Michael, #509, #510)
v0.5.2 (2017-07-31)#
improvements to
core.Container(MaxNoe)TableWritercorrectly handles units and metadatactapipe.instrumentnow has much more rich functionality (SubarrayDescription, TelescopeDescription, OpticsDescription classes added)no more need to construct
CameraGeometrymanually, they are created in thehessio_event_source, all new code should useevent.inst.subarray. The old inst.tel_pos, inst.optics_foclen, etc, will be phased out in the next point release (but still exist in this release) (K. Kosack)ctapipe-dump-instrumentscript addedimprovements to
Regressorand Classifier code (Tino Michael)provenance system includes actor roles
fixes to likelihood tests (Dan Parsons)
v0.5.1 (2016-07-20)#
TQDM and iminuit are now accepted dependencies
Implementation of ImPACT reconstruction and
TableInterpolatorclass (Dan Parsons)improved handling of atmosphere profiles
Implementation of Muon detection and reconstruction algorithms (Alison Mitchell)
unified camera and telescope names
better dataset handling (
ctapipe.utils.datasets), and now automatically find datasets and tables inctapipe-extraor in any directory listed in the user-defined$CTAPIPE_SVC_PATHpath.TableWriter class (HDF5TableWriter) for writing out any
core.Containerto an HDF5 table viapytables(Karl Kosack)Improvements to
flowframework (Jean Jacquemier)Travis CI now builds automatically for multiply python versions and uploads latest documentation
use Lanscape.io for code quality
code for calculating sensitivity curves using event-weighting method (Tino Michael)