#include <OmniChannelNoiseDB.h>
Classes | |
struct | ChannelInfo |
Public Member Functions | |
OmniChannelNoiseDB () | |
virtual | ~OmniChannelNoiseDB () |
virtual void | configure (const WireCell::Configuration &config) |
Accept a configuration. More... | |
virtual WireCell::Configuration | default_configuration () const |
Optional, override to return a hard-coded default configuration. More... | |
virtual double | sample_time () const |
FIXME: how to handle state changes? More... | |
virtual double | nominal_baseline (int channel) const |
Return a nominal baseline correction (additive offset) More... | |
virtual double | gain_correction (int channel) const |
virtual double | response_offset (int channel) const |
Return a time offset associated with the response(). More... | |
virtual double | min_rms_cut (int channel) const |
virtual double | max_rms_cut (int channel) const |
virtual int | pad_window_front (int channel) const |
virtual int | pad_window_back (int channel) const |
virtual float | coherent_nf_decon_limit (int channel) const |
virtual float | coherent_nf_decon_lf_cutoff (int channel) const |
virtual float | coherent_nf_decon_limit1 (int channel) const |
virtual float | coherent_nf_adc_limit (int channel) const |
virtual float | coherent_nf_protection_factor (int channel) const |
virtual float | coherent_nf_min_adc_limit (int channel) const |
virtual float | coherent_nf_roi_min_max_ratio (int channel) const |
virtual const filter_t & | rcrc (int channel) const |
Return the filter for the RC+RC coupling response function. More... | |
virtual const filter_t & | config (int channel) const |
Return the filter to correct any wrongly configured channels. More... | |
virtual const filter_t & | noise (int channel) const |
Return the filter to attenuate noise. More... | |
virtual const filter_t & | response (int channel) const |
A nominal detector response spectrum for a given channel. More... | |
virtual std::vector< channel_group_t > | coherent_channels () const |
Return channel grouping for coherent noise subtraction. More... | |
virtual channel_group_t | bad_channels () const |
Return channels which are considered a'priori "bad". More... | |
virtual channel_group_t | miscfg_channels () const |
Return channels which are considered a'priori "misconfigured". More... | |
Public Member Functions inherited from WireCell::IChannelNoiseDatabase | |
virtual | ~IChannelNoiseDatabase () |
Public Member Functions inherited from WireCell::IComponent< IChannelNoiseDatabase > | |
virtual | ~IComponent () |
Public Member Functions inherited from WireCell::Interface | |
virtual | ~Interface () |
Public Member Functions inherited from WireCell::IConfigurable | |
virtual | ~IConfigurable () |
Public Member Functions inherited from WireCell::IComponent< IConfigurable > | |
virtual | ~IComponent () |
Protected Member Functions | |
virtual void | set_bad_channels (const channel_group_t &bad) |
virtual void | set_misconfigured (const std::vector< int > &channels, double from_gain, double from_shaping, double to_gain, double to_shaping, bool reset=false) |
Private Types | |
typedef std::shared_ptr< filter_t > | shared_filter_t |
typedef std::vector< shared_filter_t > | filter_vector_t |
Private Member Functions | |
const ChannelInfo & | dbget (int ch) const |
std::vector< int > | parse_channels (const Json::Value &jchannels) |
shared_filter_t | make_filter (std::complex< float > defval=std::complex< float >(1, 0)) |
shared_filter_t | default_filter () |
shared_filter_t | parse_freqmasks (Json::Value jfm) |
shared_filter_t | parse_rcrc (Json::Value jrcrc, int nrc) |
double | parse_gain (Json::Value jreconfig) |
shared_filter_t | parse_reconfig (Json::Value jreconfig) |
shared_filter_t | get_reconfig (double from_gain, double from_shaping, double to_gain, double to_shaping) |
shared_filter_t | parse_response (Json::Value jreconfig) |
void | update_channels (Json::Value cfg) |
ChannelInfo & | get_ci (int chid) |
Private Attributes | |
double | m_tick |
int | m_nsamples |
IAnodePlane::pointer | m_anode |
IFieldResponse::pointer | m_fr |
int | m_rc_layers |
std::unordered_map< int, ChannelInfo > | m_db |
std::vector< channel_group_t > | m_channel_groups |
channel_group_t | m_bad_channels |
channel_group_t | m_miscfg_channels |
std::unordered_map< int, shared_filter_t > | m_rcrc_cache |
std::unordered_map< int, shared_filter_t > | m_reconfig_cache |
std::unordered_map< int, shared_filter_t > | m_waveform_cache |
std::unordered_map< int, shared_filter_t > | m_response_cache |
Log::logptr_t | log |
Additional Inherited Members | |
Public Types inherited from WireCell::IChannelNoiseDatabase | |
typedef WireCell::Waveform::compseq_t | filter_t |
The data type for all frequency-space, multiplicative filters. More... | |
typedef std::vector< int > | channel_group_t |
Public Types inherited from WireCell::IComponent< IChannelNoiseDatabase > | |
typedef std::shared_ptr< IChannelNoiseDatabase > | pointer |
Access subclass facet by pointer. More... | |
typedef std::vector< pointer > | vector |
Vector of shared pointers. More... | |
Public Types inherited from WireCell::Interface | |
typedef std::shared_ptr< Interface > | pointer |
Public Types inherited from WireCell::IComponent< IConfigurable > | |
typedef std::shared_ptr< IConfigurable > | pointer |
Access subclass facet by pointer. More... | |
typedef std::vector< pointer > | vector |
Vector of shared pointers. More... | |
Definition at line 24 of file OmniChannelNoiseDB.h.
Definition at line 108 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 107 of file OmniChannelNoiseDB.h.
OmniChannelNoiseDB::OmniChannelNoiseDB | ( | ) |
Create a configurable channel noise DB for digitized waveforms with the given size and number of samples. Default is for microphone.
Definition at line 14 of file OmniChannelNoiseDB.cxx.
|
virtual |
Definition at line 21 of file OmniChannelNoiseDB.cxx.
|
inlinevirtual |
Return channels which are considered a'priori "bad".
Reimplemented from WireCell::IChannelNoiseDatabase.
Reimplemented in wcls::ChannelSelectorDB.
Definition at line 68 of file OmniChannelNoiseDB.h.
|
inlinevirtual |
Return channel grouping for coherent noise subtraction.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 65 of file OmniChannelNoiseDB.h.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 701 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 691 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 686 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 696 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 711 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 706 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 716 of file OmniChannelNoiseDB.cxx.
|
virtual |
Return the filter to correct any wrongly configured channels.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 731 of file OmniChannelNoiseDB.cxx.
|
virtual |
Accept a configuration.
Implements WireCell::IConfigurable.
Reimplemented in wcls::ChannelNoiseDB, and wcls::ChannelSelectorDB.
Definition at line 590 of file OmniChannelNoiseDB.cxx.
|
inlineprivate |
Definition at line 138 of file OmniChannelNoiseDB.h.
|
virtual |
Optional, override to return a hard-coded default configuration.
These must be provided
Reimplemented from WireCell::IConfigurable.
Definition at line 55 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 148 of file OmniChannelNoiseDB.cxx.
|
virtual |
Return simple gain correction (a multiplicative, unitless scaling) to apply to a given channel.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 656 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 369 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 239 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 144 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 671 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 666 of file OmniChannelNoiseDB.cxx.
|
inlinevirtual |
Return channels which are considered a'priori "misconfigured".
Reimplemented from WireCell::IChannelNoiseDatabase.
Reimplemented in wcls::ChannelSelectorDB.
Definition at line 71 of file OmniChannelNoiseDB.h.
|
virtual |
Return the filter to attenuate noise.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 741 of file OmniChannelNoiseDB.cxx.
|
virtual |
Return a nominal baseline correction (additive offset)
Implements WireCell::IChannelNoiseDatabase.
Definition at line 651 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 681 of file OmniChannelNoiseDB.cxx.
|
virtual |
Implements WireCell::IChannelNoiseDatabase.
Definition at line 676 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 96 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 154 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 214 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 173 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 225 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 313 of file OmniChannelNoiseDB.cxx.
|
virtual |
Return the filter for the RC+RC coupling response function.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 721 of file OmniChannelNoiseDB.cxx.
|
virtual |
A nominal detector response spectrum for a given channel.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 751 of file OmniChannelNoiseDB.cxx.
|
virtual |
Return a time offset associated with the response().
Implements WireCell::IChannelNoiseDatabase.
Definition at line 661 of file OmniChannelNoiseDB.cxx.
|
virtual |
FIXME: how to handle state changes?
Return the time-domain sample period (time in system of units) which is was used in producing the filter response spectral functions (filter_t).
Warning: take care that the number of frequency samples (filter_t::size()) is fixed and may not match the number of ticks in your waveform.
Implements WireCell::IChannelNoiseDatabase.
Definition at line 644 of file OmniChannelNoiseDB.cxx.
|
inlineprotectedvirtual |
Definition at line 85 of file OmniChannelNoiseDB.h.
|
protectedvirtual |
Definition at line 292 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 386 of file OmniChannelNoiseDB.cxx.
|
private |
Definition at line 182 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 103 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 152 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 151 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 136 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 104 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 153 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 102 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 105 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 174 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 176 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 180 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 101 of file OmniChannelNoiseDB.h.
|
private |
Definition at line 178 of file OmniChannelNoiseDB.h.