def initialize_pixel_status(mon_camera_container,shape): """ Initialize the pixel status container in the case of simulation events (this should be done in the event source, but added here for the moment) """ # initialize the container status_container = PixelStatusContainer() status_container.hardware_failing_pixels = np.zeros((shape[0],shape[1]), dtype=bool) status_container.pedestal_failing_pixels = np.zeros((shape[0],shape[1]), dtype=bool) status_container.flatfield_failing_pixels = np.zeros((shape[0],shape[1]), dtype=bool) mon_camera_container.pixel_status = status_container
def initialize_mon_container(self): """ Fill with MonitoringContainer. For the moment, initialize only the PixelStatusContainer """ container = self.data.mon container.tels_with_data = [self.camera_config.telescope_id, ] mon_camera_container = container.tel[self.camera_config.telescope_id] # initialize the container status_container = PixelStatusContainer() status_container.hardware_failing_pixels = np.zeros((self.n_gains, self.n_camera_pixels), dtype=bool) status_container.pedestal_failing_pixels = np.zeros((self.n_gains, self.n_camera_pixels), dtype=bool) status_container.flatfield_failing_pixels = np.zeros((self.n_gains, self.n_camera_pixels), dtype=bool) mon_camera_container.pixel_status = status_container
import numpy as np from matplotlib.backends.backend_pdf import PdfPages from ctapipe.instrument import CameraGeometry # read back the monitoring containers written with the tool calc_camera_calibration.py from ctapipe.io.containers import FlatFieldContainer, WaveformCalibrationContainer, PedestalContainer, \ PixelStatusContainer from ctapipe.io.hdf5tableio import HDF5TableReader __all__ = ['read_file', 'plot_all'] ff_data = FlatFieldContainer() ped_data = PedestalContainer() calib_data = WaveformCalibrationContainer() status_data = PixelStatusContainer() channel = ['HG', 'LG'] plot_dir = "none" def read_file(file_name, tel_id=1): """ read camera calibration quantities Parameters ---------- file_name: calibration hdf5 file tel_id: telescope id