ChannelZapMedian.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2005 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/ChannelZapMedian.h
10
11#ifndef _Pulsar_ChannelZapMedian_H
12#define _Pulsar_ChannelZapMedian_H
13
14#include "Pulsar/ChannelWeight.h"
15#include "TextInterface.h"
16
17namespace Pulsar {
18
19 class Statistics;
20 class ProfileStatistic;
21
24 {
25
26 public:
27
30
33
34 // Text interface to the ChannelZapMedian class
35 class Interface : public TextInterface::To<ChannelZapMedian>
36 {
37 public:
38 Interface (ChannelZapMedian* = 0);
39 };
40
42 void operator () (Archive*);
43
45 void weight (Integration* integration);
46
48 void set_window_size (unsigned size) { window_size = size; }
49
51 unsigned get_window_size () const { return window_size; }
52
54 void set_rms_threshold (float t);
55
57 float get_rms_threshold () const;
58
60 void set_madm_threshold (float t);
61
63 float get_madm_threshold () const;
64
66 void set_iqr_threshold (float t);
67
69 float get_iqr_threshold () const;
70
72 void set_bybin (bool t) { bybin = t; }
73
75 bool get_bybin () const { return bybin; }
76
78 void set_paz_report (bool t) { paz_report = t; }
79
81 bool get_paz_report () const { return paz_report; }
82
84 void set_from_total (bool t) { from_total = t; }
85
87 bool get_from_total () const { return from_total; }
88
90 void set_expression (const std::string& exp) { expression = exp; }
91
93 std::string get_expression () const { return expression; }
94
96 void set_statistic (const std::string&);
97
99 std::string get_statistic () const;
100
101 protected:
102
104 unsigned window_size;
105
108
111
114
116 bool bybin;
117
120
123
125 std::vector<bool> single_mask;
126
128 std::string expression;
129
133
136
137 };
138
139}
140
141#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
Algorithms that set the weights of frequency channels.
Definition ChannelWeight.h:21
bool bybin
Median smooth the spectra of each bin.
Definition ChannelZapMedian.h:116
void set_window_size(unsigned size)
Set the size of the window over which median will be computed.
Definition ChannelZapMedian.h:48
void weight(Integration *integration)
Set integration weights.
Definition ChannelZapMedian.C:192
float rms_threshold
Threshold as a multiple of the standard deviation.
Definition ChannelZapMedian.h:107
Reference::To< ProfileStatistic > statistic
The statistic to be derived from each profile.
Definition ChannelZapMedian.h:135
unsigned window_size
The size of the window over which median will be computed.
Definition ChannelZapMedian.h:104
void set_rms_threshold(float t)
Set the threshold as multiple of the standard deviation.
Definition ChannelZapMedian.C:35
Reference::To< Statistics > stats
The Statistics estimator used to evaluate the expression.
Definition ChannelZapMedian.h:131
unsigned get_window_size() const
Get the size of the window over which median will be computed.
Definition ChannelZapMedian.h:51
bool get_from_total() const
Compute a single zap mask from the total.
Definition ChannelZapMedian.h:87
float get_rms_threshold() const
Get the threshold as multiple of the standard deviation.
Definition ChannelZapMedian.C:42
void set_bybin(bool t)
Run the algorithm on the spectra of each bin.
Definition ChannelZapMedian.h:72
std::vector< bool > single_mask
The single mask to apply to every sub-integration.
Definition ChannelZapMedian.h:125
void set_from_total(bool t)
Compute a single zap mask from the total.
Definition ChannelZapMedian.h:84
void set_madm_threshold(float t)
Set the threshold as multiple of the median absolute deviation from the median.
Definition ChannelZapMedian.C:47
void set_expression(const std::string &exp)
Set the mathematical expression.
Definition ChannelZapMedian.h:90
float get_iqr_threshold() const
Get the threshold as multiple of the inter-quartile range.
Definition ChannelZapMedian.C:66
float iqr_threshold
Threshold as a multiple of the inter-quartile range.
Definition ChannelZapMedian.h:113
float get_madm_threshold() const
Get the threshold as multiple of the median absolute deviation from the median.
Definition ChannelZapMedian.C:54
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition ChannelZapMedian.C:139
bool get_bybin() const
Run the algorithm on the spectra of each bin.
Definition ChannelZapMedian.h:75
ChannelZapMedian()
Default constructor.
Definition ChannelZapMedian.C:23
void set_paz_report(bool t)
Print equivalent paz command on cout.
Definition ChannelZapMedian.h:78
void set_statistic(const std::string &)
Set the profile statistic.
Definition ChannelZapMedian.C:71
std::string expression
Set the expression to evaluate in each channel (as in psrstat)
Definition ChannelZapMedian.h:128
bool get_paz_report() const
Print equivalent paz command on cout.
Definition ChannelZapMedian.h:81
void operator()(Archive *)
Set up attributes that apply to the whole archive.
Definition ChannelZapMedian.C:84
void set_iqr_threshold(float t)
Set the threshold as multiple of the inter-quartile range.
Definition ChannelZapMedian.C:59
bool paz_report
Print the verbose message used by paz.
Definition ChannelZapMedian.h:119
std::string get_expression() const
Get the mathematical expression.
Definition ChannelZapMedian.h:93
float madm_threshold
Threshold as a multiple of the median absolute deviation from the median.
Definition ChannelZapMedian.h:110
std::string get_statistic() const
Get the profile statistic.
Definition ChannelZapMedian.C:76
bool from_total
Compute the zap mask from the tscrunched total.
Definition ChannelZapMedian.h:122
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Commmon statistics that can be derived from a pulse profile.
Definition ProfileStatistic.h:22
Interface to a variety of useful statistics.
Definition Statistics.h:26
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0