Skip to content

Commit 53e2d18

Browse files
author
Anastasiia Mikhno
committed
Flat Field coefficients computation using the model-based approach + requered changes in containers files. And the script to compute raise and decay times.
Cleaned branch.
1 parent 60b7db7 commit 53e2d18

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/nectarchain/user_scripts/ajardinb/flatfield_example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def get_bad_pixels(output_from_FlatFieldComponent):
104104
hi_lo = get_hi_lo_ratio(output_from_FlatFieldComponent)
105105

106106
amp_int_per_pix_per_event = FlatFieldOutput.amp_int_per_pix_per_event[:, :, :]
107+
107108
mean_amp_int_per_pix = np.mean(amp_int_per_pix_per_event, axis=0)
108109
mean_amp = np.mean(mean_amp_int_per_pix, axis=1)
109110
std_amp = np.std(mean_amp_int_per_pix, axis=1)

src/nectarchain/user_scripts/amikhno/analysis_photostat_simple.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
from nectarchain.data.container import GainContainer
2626

27+
plt.style.use("/home/amikhno/Downloads/plot_style.mpltstyle")
28+
2729
parser = argparse.ArgumentParser(description="Run NectarCAM photostatistics analysis")
2830

2931
parser.add_argument("-r", "--run-number", required=True, help="Run number")
@@ -58,9 +60,10 @@
5860
run_path = args.run_path + f"/runs/NectarCAM.Run{run_number}.0000.fits.fz"
5961
filename_ps = (
6062
args.analysis_file + f"/PhotoStat/PhotoStatisticNectarCAM_FFrun{run_number}"
61-
f"_GlobalPeakWindowSum_window_width_8_Pedrun{run_number}_FullWaveformSum.h5"
63+
f"_LocalPeakWindowSum_window_shift_4_window_width_16_Pedrun{run_number}_FullWaveformSum.h5"
6264
)
6365

66+
6467
# --- Example usage ---
6568
if not os.path.exists(filename_ps):
6669
print(f"[INFO] {filename_ps} not found, running gain_PhotoStat_computation.py...")
@@ -80,10 +83,12 @@
8083
"--SPE_run_number",
8184
run_spe_number,
8285
"--method",
83-
"GlobalPeakWindowSum",
86+
"LocalPeakWindowSum",
8487
"--extractor_kwargs",
85-
'{"window_width":8}',
88+
'{"window_shift": 4, "window_width":16}',
8689
"--overwrite",
90+
"--SPE_config",
91+
"nominal",
8792
"-v",
8893
"INFO",
8994
"--reload_events",

src/nectarchain/user_scripts/amikhno/compute_rise_decay_times.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from ctapipe_io_nectarcam import NectarCAMEventSource
1313
from matplotlib import pyplot as plt
1414

15+
plt.style.use("/home/amikhno/Downloads/plot_style.mpltstyle")
16+
1517
parser = argparse.ArgumentParser(
1618
description="Run computation of mean parameters of waveform"
1719
)

0 commit comments

Comments
 (0)