From fdbbeca2ed90e7f6b056e389bbce0ab3c36d8e98 Mon Sep 17 00:00:00 2001 From: ArmelleJB Date: Tue, 14 Jan 2025 17:32:57 -0300 Subject: [PATCH] Clean imports --- .../data/container/flatfieldContainer.py | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/nectarchain/data/container/flatfieldContainer.py b/src/nectarchain/data/container/flatfieldContainer.py index 2ebb8e72..ebe3a2e1 100644 --- a/src/nectarchain/data/container/flatfieldContainer.py +++ b/src/nectarchain/data/container/flatfieldContainer.py @@ -1,15 +1,15 @@ import logging -logging.basicConfig(format="%(asctime)s %(name)s %(levelname)s %(message)s") -log = logging.getLogger(__name__) -log.handlers = logging.getLogger("__main__").handlers - import numpy as np from ctapipe.containers import Field -from ctapipe.core.traits import ComponentNameList, Dict, Integer, List, Tuple +from ctapipe.core.traits import List from .core import NectarCAMContainer +logging.basicConfig(format="%(asctime)s %(name)s %(levelname)s %(message)s") +log = logging.getLogger(__name__) +log.handlers = logging.getLogger("__main__").handlers + __all__ = ["FlatFieldContainer"] @@ -22,10 +22,13 @@ class FlatFieldContainer(NectarCAMContainer): npixels (np.uint16): Number of pixels pixels_id (np.ndarray): Array of pixel's ID ucts_timestamp (np.ndarray) : Array of time stamps of each event (UTC) - event_type (np.ndarray): Array of trigger event types (should be all flat field events) + event_type (np.ndarray): Array of trigger event types (should be all flat + field events) event_id (np.ndarray): Array of the IDs of each event - amp_int_per_pix_per_event (np.ndarray): Array of integrated amplitude of each pulse - t_peak_per_pix_per_event (np.ndarray): Array of samples containing the pulse maximum + amp_int_per_pix_per_event (np.ndarray): Array of integrated amplitude of each + pulse + t_peak_per_pix_per_event (np.ndarray): Array of samples containing the pulse + maximum FF_coef (np.ndarray): Array of flat field coefficients bad_pixels (List): List of pixel identified as outliers """ @@ -56,30 +59,33 @@ class FlatFieldContainer(NectarCAMContainer): type=np.ndarray, dtype=np.float32, ndim=3, - description="The amplitude integrated over the window width, per pixel and per event", + description="amplitude integrated over the window width, per pixel per event", ) t_peak_per_pix_per_event = Field( type=np.ndarray, dtype=np.uint8, ndim=3, - description="Sample containing the pulse maximum, per pixel and per event", + description="sample containing the pulse maximum, per pixel and per event", ) FF_coef = Field( type=np.ndarray, dtype=np.float32, ndim=3, - description="The flat field coefficient, per event", + description="the flat field coefficients, per event", ) # masked_wfs = Field( - # type=np.ndarray, dtype=np.uint64, ndim=4, description="Masked array for amplitude integration" + # type=np.ndarray, + # dtype=np.uint64, + # ndim=4, + # description="Masked array for amplitude integration", # ) bad_pixels = Field( type=List, dtype=np.uint16, ndim=1, - description="Pixels considered as bad in at least one gain channels", + description="pixels considered as bad in at least one gain channels", )