Skip to content

Commit

Permalink
Clean imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmelleJB committed Jan 14, 2025
1 parent 89e5140 commit fdbbeca
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/nectarchain/data/container/flatfieldContainer.py
Original file line number Diff line number Diff line change
@@ -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"]


Expand All @@ -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
"""
Expand Down Expand Up @@ -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",
)

0 comments on commit fdbbeca

Please sign in to comment.