Change Log¶
Ctapipe 0.18.1 (2023-03-16)¶
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]
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, particuarly
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 (Max Noe, #489)
Fixes to coordinate
PlanarRepresentation(Max Noe, #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(Max Noe)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 lates documentation
use Lanscape.io for code quality
code for calculating sensitivity curves using event-weighting method (Tino Michael)