PixelStatisticsCalculatorTool#
- class ctapipe.tools.calculate_pixel_stats.PixelStatisticsCalculatorTool(*args: t.Any, **kwargs: t.Any)[source]#
Bases:
ToolPerform statistics calculation for pixel-wise image data
Attributes Summary
List of allowed tel_ids, others will be ignored.
Column name of the pixel-wise image data to calculate statistics
Set the pixel values marked as invalid in 'pixel_status' to NaN, so that they are ignored by the aggregation.
Output filename
If the input data is gain selected, fill each pixel value into the gain channel given by 'selected_gain_channel', so that the statistics are calculated per gain channel.
Methods Summary
finish()Finish up.
setup()Set up the tool.
start()Iterate over all telescopes, process their statistics, and save the results.
Attributes Documentation
- aliases = {('i', 'input_url'): 'TableLoader.input_url', ('o', 'output_path'): 'PixelStatisticsCalculatorTool.output_path'}#
- allowed_tels#
List of allowed tel_ids, others will be ignored. If None, all telescopes in the input stream will be included.
- classes = [<class 'ctapipe.io.tableloader.TableLoader'>, <class 'ctapipe.monitoring.calculator.PixelStatisticsCalculator'>]#
- description = 'Perform statistics calculation for pixel-wise image data'#
- examples = '\n To calculate statistics of pixel-wise image data files:\n\n > ctapipe-calculate-pixel-statistics --TableLoader.input_url input.dl1.h5 --output_path /path/monitoring.h5 --overwrite\n\n '#
- flags = {'append': ({'HDF5Merger': {'append': True}}, 'Append to existing files'), 'mask-invalid-pixels': ({'PixelStatisticsCalculatorTool': {'mask_invalid_pixels': True}}, 'Exclude pixels marked as invalid in pixel_status from the statistics'), 'no-mask-invalid-pixels': ({'PixelStatisticsCalculatorTool': {'mask_invalid_pixels': False}}, 'Include pixels marked as invalid in pixel_status in the statistics'), 'overwrite': ({'HDF5Merger': {'overwrite': True}}, 'Overwrite existing files'), 'per-channel': ({'PixelStatisticsCalculatorTool': {'per_channel_statistics': True}}, 'Calculate per-channel statistics for gain selected input data')}#
- input_column_name#
Column name of the pixel-wise image data to calculate statistics
- mask_invalid_pixels#
Set the pixel values marked as invalid in ‘pixel_status’ to NaN, so that they are ignored by the aggregation. Has no effect if the input data has no column ‘pixel_status’.
- name = 'ctapipe-calculate-pixel-statistics'#
- output_path#
Output filename
- per_channel_statistics#
If the input data is gain selected, fill each pixel value into the gain channel given by ‘selected_gain_channel’, so that the statistics are calculated per gain channel. Unfilled entries are set to NaN and ignored by the aggregation.
Methods Documentation