RobustMower.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2012 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/RFIMitigation/Pulsar/RobustMower.h
10 
11 #ifndef __Pulsar_RobustMower_h
12 #define __Pulsar_RobustMower_h
13 
14 #include "Pulsar/Mower.h"
15 
16 namespace Pulsar {
17 
19  class RobustMower : public Mower
20  {
21 
22  protected:
23 
25  void compute (PhaseWeight* mask, const Profile* difference);
26 
27  };
28 
29 }
30 
31 #endif
double evaluate(std::vector< double > *grad=0) const
void bscrunch(Container *, const ScrunchFactor &)
Integrate phase bins.
Definition: ScrunchFactor.h:116
Solver * get_solver()
Get the algorithm used to solve the measurement equation.
Definition: ReceptionModel.C:53
double get_centre() const
void fit(const Pulsar::Parameters *model, std::vector< toa > &data, Pulsar::Parameters *postfit=NULL, bool track=false, Tempo::toa::State min_state=Tempo::toa::Normal)
void add_observation(Calibration::CoherencyMeasurementSet &, const PolnProfile *)
Add the specified observation to the measurement set.
Definition: PolnProfileFit.C:372
double mean(float phase, float duty_cycle=default_duty_cycle) const
Convenience interface to stats, returns only the mean.
Definition: Profile_stats.C:121
double get_width() const
virtual double get_rotation_measure() const =0
Get the rotation measure (in )
void refine()
Refine the rotation measure estimate.
Definition: DeltaRM.C:85
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Estimate< double > get_shift() const
Return the shift estimate.
Definition: ComponentModel.C:130
void set_standard(const PolnProfile *standard)
Set the standard to which observations will be fit.
Definition: PolnProfileFit.C:148
unsigned get_nparam() const
double get_centre_frequency(unsigned ichan) const
Get the Profile centre frequency attribute of the given channel.
Definition: Integration.C:359
void set_amps(const T *data)
set the amplitudes array equal to the contents of the data array
Definition: ProfileAmps.h:89
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
float find_min_phase(float duty_cycle=default_duty_cycle) const
Returns the phase of the centre of the region with minimum mean.
Definition: Profile_find_minmax_phase.C:21
Faraday rotation transformation.
Definition: Faraday.h:26
float snr() const
Returns the signal to noise ratio of the profile.
Definition: Profile_snr.C:15
void set_rotation_measure(const Estimate< double > &rotation_measure)
Set the rotation measure.
Definition: Faraday.C:35
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
Plots a single pulse profile.
Definition: StokesCylindrical.h:28
static Archive * load(const std::string &name)
Factory returns a new instance loaded from filename.
Definition: Archive_load.C:28
void set_centre(double centre)
static void set_verbosity(unsigned level)
Set the verbosity level (0 to 3)
Definition: Archive_verbose.C:19
void set_transformation(MEAL::Complex2 *xform)
Set the transformation between the standard and observation.
Definition: PolnProfileFit.C:270
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
void set_frequency(double MHz)
Set the frequency in MHz.
Definition: Faraday.C:72
Value get_Value(const Type &value)
const ScalarMath pow(const ScalarMath &x, const ScalarMath &y)
U get_error() const
const ScalarMath sqrt(const ScalarMath &x)
void set_error(const U &u)
void compute(PhaseWeight *mask, const Profile *difference)
Find the spikes in median smoothed difference and flag them in mask.
Definition: RobustMower.C:16
void set_observation(const Profile *p)
Set the profile from which the shift will be estimated.
Definition: ProfileShiftEstimator.h:36
unsigned get_nharmonic() const
Get the number of harmonics to be included in fit.
Definition: PolnProfileFit.h:83
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
Calibration::ReceptionModel * get_equation()
Get the measurement equation used to model the fit.
Definition: PolnProfileFit.C:516
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
virtual bool get_faraday_corrected() const =0
Data has been corrected for ISM faraday rotation.
void set_height(double height)
double get_rotation() const
Get the Faraday rotation angle.
Definition: Faraday.C:122
void add_model(T *model)
static bool verbose
void set_exclude(const std::vector< unsigned > &bins)
Set the phase bins to be excluded from the computation.
Definition: DeltaRM.C:73
void set_value(const T &t)
void set_reference_frequency(double MHz)
Set the reference frequency in MHz.
Definition: Faraday.C:59
void set_include(const std::vector< unsigned > &bins)
Set the phase bins to be included in the computation.
Definition: DeltaRM.C:67
Profile * get_Profile(unsigned subint, unsigned pol, unsigned chan)
Return pointer to the specified profile.
Definition: Archive.C:270
Estimate< double > get_rotation_measure() const
Get the rotation measure.
Definition: Faraday.C:41
Estimate< double > get_gain() const
T get_value() const
Estimate< double > get_rotation_measure() const
Get the rotation measure.
Definition: DeltaRM.h:44
bool verbose
Definition: timer++.C:25
unsigned get_used_bins()
Get the number of phase bins used in last call to refine.
Definition: DeltaRM.h:48
void set_maximum_harmonic(unsigned max)
Set the maximum number of harmonics to include in fit.
Definition: PolnProfileFit.C:115
void set_data(Archive *)
Set the archive from which to derive the refined rotation measure.
Definition: DeltaRM.C:37
Computes polarimetric pulse profile statistics.
Definition: PolnProfileStats.h:27
virtual void set_abscissa(double value)
Estimate< double > get_phase() const
Get the phase offset between the standard and the observation.
Definition: PolnProfileFit.C:535
Models a pulse profile using multiple components.
Definition: ComponentModel.h:34
double get_height() const
std::string get_filename() const
Get the name of the file to which the archive will be unloaded.
Definition: Archive.h:108
void stats(double *mean, double *variance=0, double *varmean=0, int bin_start=0, int bin_end=0) const
Calculates the mean, variance, and variance of the mean.
Definition: Profile_stats.C:27
void set_policy(FrequencyIntegrate::Divided *)
Set the policy used to integrate frequency channels.
Definition: DeltaRM.C:79
virtual Archive * clone() const =0
Return a new copy constructed instance equal to this.
float get_chisq() const
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_threshold(float t)
Set the cutoff threshold in units of the baseline noise.
Definition: DeltaRM.h:57
void solve()
Fit all observations to the standard.
Definition: PolnProfileFit.C:486
void set_argument(unsigned dimension, Argument *axis)
virtual unsigned get_nbin() const =0
Get the number of pulsar phase bins used.
double get_reference_frequency() const
Get the reference frequency in MHz.
Definition: Faraday.C:65
The matrix template matching algorithm.
Definition: PolnProfileFit.h:50
PolnProfile * new_PolnProfile(unsigned ichan)
Returns a pointer to a new PolnProfile instance.
Definition: Integration_new_PolnProfile.C:16
Estimate< double > get_Estimate(unsigned index) const
unsigned get_nfree() const
void set_width(double width)
Definition: SingleAxis.h:27
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition: DeltaRM.h:61
Refines an RM estimate using two halves of the band.
Definition: DeltaRM.h:29
void set_reference_wavelength(double metres)
Set the reference wavelength in metres.
Definition: Faraday.C:84

Generated using doxygen 1.8.17