Skip to content

Commit e08c9fb

Browse files
committed
Allow time range ped hists to be configured
- Default to 86400.0 seconds
1 parent 3aaf2cc commit e08c9fb

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

proto/diagnostics/simple_charge_stats.proto

+9-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ message SimpleChargeStatsConfig {
4242
double ped_time_hist_resolution = 20 [
4343
(CFO).desc = "Resolution of pedestal mean and variance vs time histogram.",
4444
(CFO).units = "s" ];
45-
double dual_gain_sample_resolution = 21 [
45+
double channel_ped_time_hist_range = 21 [
46+
(CFO).desc = "Maximum time of channel pedestal mean and variance vs time histogram.",
47+
(CFO).units = "s" ];
48+
double camera_ped_time_hist_range = 22 [
49+
(CFO).desc = "Maximum time of camera-wide pedestal mean and variance vs time histogram.",
50+
(CFO).units = "s" ];
51+
52+
double dual_gain_sample_resolution = 30 [
4653
(CFO).desc = "Resolution of high-gain vs low-gain max sample histogram.",
4754
(CFO).units = "DC" ];
48-
double dual_gain_sum_resolution = 22 [
55+
double dual_gain_sum_resolution = 40 [
4956
(CFO).desc = "Resolution of high-gain vs low-gain window sum histogram.",
5057
(CFO).units = "DC" ];
5158
};

src/diagnostics/simple_charge_stats.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,14 @@ bool SimpleChargeStatsParallelEventVisitor::visit_telescope_run(
106106
chan_hists_.resize(run_config->configured_channel_id_size());
107107
for(auto*& h : chan_hists_) {
108108
// For now on do not use per-channel low gain histograms
109-
h = new ChannelHists(has_dual_gain_, config_.ped_time_hist_resolution(), 3600.0,
109+
h = new ChannelHists(has_dual_gain_, config_.ped_time_hist_resolution(),
110+
config_.channel_ped_time_hist_range(),
110111
config_.dual_gain_sample_resolution(), config_.dual_gain_sum_resolution());
111112
}
112113

113114
delete camera_hists_;
114-
camera_hists_ = new CameraHists(has_dual_gain_, config_.ped_time_hist_resolution(), 86400.0);
115+
camera_hists_ = new CameraHists(has_dual_gain_, config_.ped_time_hist_resolution(),
116+
config_.camera_ped_time_hist_range());
115117

116118
delete data_order_camera_;
117119
data_order_camera_ = calin::iact_data::instrument_layout::reorder_camera_channels(
@@ -816,6 +818,8 @@ SimpleChargeStatsParallelEventVisitor::default_config()
816818
config.set_low_gain_wf_clipping_value(4095);
817819
config.set_nearest_neighbor_nchannel_threshold(3);
818820
config.set_ped_time_hist_resolution(5.0);
821+
config.set_channel_ped_time_hist_range(86400.0);
822+
config.set_camera_ped_time_hist_range(86400.0);
819823
config.set_dual_gain_sample_resolution(1.0);
820824
config.set_dual_gain_sum_resolution(5.0);
821825
return config;

0 commit comments

Comments
 (0)