RFIMitigation.h
1 /***************************************************************************
2  *
3  * Copyright (C) 2003 by Aidan Hotan
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 
8 #include <vector>
9 
10 namespace Pulsar {
11 
12  class Archive;
13  class Integration;
14 
15  class RFIMitigation {
16 
17  public:
18 
19  // Null constructor
20  RFIMitigation () { init(); }
21 
22  // Destructor
23  ~RFIMitigation ();
24 
25  // Run through an archive, setting the weights arrays in each subint
26  // according to an automated bad point detection algorithm
27  void zap_chans (Pulsar::Archive* arch);
28 
29  // Manually set specific channel weights to zero
30  void zap_specific (Pulsar::Archive* arch, std::vector<float> mask);
31 
32  // Manually set specific channel weights in specific subints to zero
33  void zap_very_specific (Pulsar::Archive* arch, std::vector<float> mask,
34  std::vector<unsigned> subs);
35 
36  private:
37 
38  // Set the weights array in a Pulsar::Integration to zap strong birdies
39  std::vector<float> zap_mask (Pulsar::Integration* integ);
40 
41  // Apply a zap mask to a Pulsar::Integration
42  void apply_mask (Pulsar::Integration* integ, std::vector<float> mask);
43 
44  // Initialise the class
45  void init ();
46 
47  };
48 
49 }
50 
Application with basic command line options.
Definition: Application.h:30
double mean(float phase, float duty_cycle=default_duty_cycle) const
Convenience interface to stats, returns only the mean.
Definition: Profile_stats.C:121
virtual unsigned get_npol() const =0
Get the number of polarization measurements.
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
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
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
virtual unsigned get_nbin() const =0
Get the number of bins in each profile.
void shift(unsigned npts, float *arr, double shift)
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
Standard interpreter command line options.
Definition: StandardOptions.h:26
virtual void add(Item *)
virtual unsigned get_nchan() const =0
Get the number of chans.
virtual Archive * clone() const =0
Return a new copy constructed instance equal to this.
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void set_weight(float)
set the weight of the profile
Definition: Profile.C:185
Profile * get_Profile(unsigned ipol, unsigned ichan)
Returns a pointer to the Profile given by the specified indeces.
Definition: Integration.C:306
Unload interpreter command line options.
Definition: UnloadOptions.h:26

Generated using doxygen 1.8.17