PolnCalExtFreqIntegrate.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2019 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/PolnCalExtFreqIntegrate.h
10 
11 #ifndef __Pulsar_PolnCalExtFreqIntegrate_h
12 #define __Pulsar_PolnCalExtFreqIntegrate_h
13 
14 #include "Pulsar/Integrate.h"
15 #include "Pulsar/EvenlySpaced.h"
16 #include "Pulsar/EvenlyWeighted.h"
17 #include "Pulsar/PolnCalibratorExtension.h"
18 
19 namespace Pulsar {
20 
22  class PolnCalExtFreqIntegrate : public Integrate<PolnCalibratorExtension>
23  {
24 
25  public:
26 
29 
31  void transform (PolnCalibratorExtension*);
32 
34  class EvenlySpaced;
35 
37  class EvenlyWeighted;
38 
39  };
40 
41  class PolnCalExtFreqIntegrate::EvenlySpaced :
42  public Integrate<PolnCalibratorExtension>::EvenlySpaced
43  {
44  unsigned get_size (const PolnCalibratorExtension* sub)
45  { return sub->get_nchan(); }
46  };
47 
48  class PolnCalExtFreqIntegrate::EvenlyWeighted :
49  public Integrate<PolnCalibratorExtension>::EvenlyWeighted
50  {
51  unsigned get_size (const PolnCalibratorExtension* sub)
52  { return sub->get_nchan(); }
53 
54  double get_weight (const PolnCalibratorExtension* sub, unsigned ichan)
55  { return sub->get_weight (ichan); }
56  };
57 
58 }
59 
60 #endif
unsigned get_nparam() const
Get the number of parameters describing each transformation.
Definition: PolnCalibratorExtension.C:128
Transformation * get_transformation(unsigned c)
Get the transformation for the specified frequency channel.
Definition: PolnCalibratorExtension.C:157
Compute the weighted mean frequency.
Definition: WeightedFrequency.h:26
void fscrunch(unsigned factor=0)
Definition: PolnCalExtFreqIntegrate.C:133
virtual unsigned get_nchan() const
Get the number of frequency channels.
Definition: CalibratorExtension.C:83
Integrates frequency channels in a polarization calibration extension.
Definition: PolnCalExtFreqIntegrate.h:27
void set_nchan(unsigned nchan)
Set the number of frequency channels.
Definition: PolnCalibratorExtension.C:80
void transform(PolnCalibratorExtension *)
The frequency integration operation.
Definition: PolnCalExtFreqIntegrate.C:47
Estimate< double > get_Estimate(unsigned) const
Get the value and variance of the specified model parameter.
Definition: PolnCalibratorExtension.C:310
Stores PolnCalibrator parameters in an Archive instance.
Definition: PolnCalibratorExtension.h:28
virtual void set_centre_frequency(unsigned ichan, double frequency)
Set the centre frequency of the specified channel.
Definition: CalibratorExtension.C:107
bool get_valid(unsigned ichan) const
Return true if the transformation for the specified channel is valid.
Definition: PolnCalibratorExtension.C:110
PolnCalExtFreqIntegrate()
Default constructor.
Definition: PolnCalExtFreqIntegrate.C:17
void set_Estimate(unsigned, const Estimate< double > &)
Set the value and variance of the specified model parameter.
Definition: PolnCalibratorExtension.C:316
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void set_range_policy(RangePolicy *rp)
Set the range division policy.
Definition: Integrate.h:57

Generated using doxygen 1.8.17