Skip to content

Commit

Permalink
Allow time range ped hists to be configured
Browse files Browse the repository at this point in the history
- Default to 86400.0 seconds
  • Loading branch information
sfegan committed Dec 9, 2024
1 parent 3aaf2cc commit e08c9fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 9 additions & 2 deletions proto/diagnostics/simple_charge_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ message SimpleChargeStatsConfig {
double ped_time_hist_resolution = 20 [
(CFO).desc = "Resolution of pedestal mean and variance vs time histogram.",
(CFO).units = "s" ];
double dual_gain_sample_resolution = 21 [
double channel_ped_time_hist_range = 21 [
(CFO).desc = "Maximum time of channel pedestal mean and variance vs time histogram.",
(CFO).units = "s" ];
double camera_ped_time_hist_range = 22 [
(CFO).desc = "Maximum time of camera-wide pedestal mean and variance vs time histogram.",
(CFO).units = "s" ];

double dual_gain_sample_resolution = 30 [
(CFO).desc = "Resolution of high-gain vs low-gain max sample histogram.",
(CFO).units = "DC" ];
double dual_gain_sum_resolution = 22 [
double dual_gain_sum_resolution = 40 [
(CFO).desc = "Resolution of high-gain vs low-gain window sum histogram.",
(CFO).units = "DC" ];
};
Expand Down
8 changes: 6 additions & 2 deletions src/diagnostics/simple_charge_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ bool SimpleChargeStatsParallelEventVisitor::visit_telescope_run(
chan_hists_.resize(run_config->configured_channel_id_size());
for(auto*& h : chan_hists_) {
// For now on do not use per-channel low gain histograms
h = new ChannelHists(has_dual_gain_, config_.ped_time_hist_resolution(), 3600.0,
h = new ChannelHists(has_dual_gain_, config_.ped_time_hist_resolution(),
config_.channel_ped_time_hist_range(),
config_.dual_gain_sample_resolution(), config_.dual_gain_sum_resolution());
}

delete camera_hists_;
camera_hists_ = new CameraHists(has_dual_gain_, config_.ped_time_hist_resolution(), 86400.0);
camera_hists_ = new CameraHists(has_dual_gain_, config_.ped_time_hist_resolution(),
config_.camera_ped_time_hist_range());

delete data_order_camera_;
data_order_camera_ = calin::iact_data::instrument_layout::reorder_camera_channels(
Expand Down Expand Up @@ -816,6 +818,8 @@ SimpleChargeStatsParallelEventVisitor::default_config()
config.set_low_gain_wf_clipping_value(4095);
config.set_nearest_neighbor_nchannel_threshold(3);
config.set_ped_time_hist_resolution(5.0);
config.set_channel_ped_time_hist_range(86400.0);
config.set_camera_ped_time_hist_range(86400.0);
config.set_dual_gain_sample_resolution(1.0);
config.set_dual_gain_sum_resolution(5.0);
return config;
Expand Down

0 comments on commit e08c9fb

Please sign in to comment.