TailCutsDataVolumeReducer¶
-
class
ctapipe.image.
TailCutsDataVolumeReducer
(**kwargs)[source]¶ Bases:
ctapipe.image.reducer.DataVolumeReducer
Reduce the time integrated shower image in 3 Steps:
Select pixels with tailcuts_clean.
Add iteratively all pixels with Signal S >= boundary_thresh with ctapipe module dilate until no new pixels were added.
Adding new pixels with dilate to get more conservative.
- Attributes
- image_extractor_type: String
Name of the image_extractor to be used.
- n_end_dilates: IntTelescopeParameter
Number of how many times to dilate at the end.
- do_boundary_dilation: BoolTelescopeParameter
If set to ‘False’, the iteration steps in 2) are skipped and normal TailcutCleaning is used.
Attributes Summary
a
TelescopeParameter
with Bool trait typeAllow a parameter value to be specified as a simple value (of type dtype), or as a list of patterns that match different telescopes.
a
TelescopeParameter
with Int trait typeMethods Summary
select_pixels
(waveforms[, telid, …])Abstract method to be defined by a DataVolumeReducer subclass.
Attributes Documentation
-
do_boundary_dilation
¶ a
TelescopeParameter
with Bool trait type
-
image_extractor_type
¶ Allow a parameter value to be specified as a simple value (of type dtype), or as a list of patterns that match different telescopes.
The patterns are given as a list of 3-tuples in the form:
[(command, argument, value), ...]
.Command can be one of:
'type'
: argument is then a telescope type string (e.g.('type', 'SST_ASTRI_CHEC', 4.0)
to apply to all telescopes of that type, or use a wildcard like “LST*”, or “*” to set a pure default value for all telescopes.'id'
: argument is a specific telescope ID['id', 89, 5.0]
)
These are evaluated in-order, so you can first set a default value, and then set values for specific telescopes or types to override them.
Examples
-
n_end_dilates
¶ a
TelescopeParameter
with Int trait type
Methods Documentation
-
select_pixels
(waveforms, telid=None, selected_gain_channel=None)[source]¶ Abstract method to be defined by a DataVolumeReducer subclass. Call the relevant functions for the required pixel selection.
- Parameters
- waveforms: ndarray
Waveforms stored in a numpy array of shape (n_pix, n_samples).
- telid: int
The telescope id. Required for the ‘image_extractor’ and ‘camera.geometry’ in ‘TailCutsDataVolumeReducer’.
- selected_gain_channel: ndarray
The channel selected in the gain selection, per pixel. Required for the ‘image_extractor’ in ‘TailCutsDataVolumeReducer’.
- Returns
- mask: array
Mask of selected pixels.