SourceEstimate.h
1 //-*-C++-*-
2 
3 /***************************************************************************
4  *
5  * Copyright (C) 2003 - 2012 by Willem van Straten
6  * Licensed under the Academic Free License version 2.1
7  *
8  ***************************************************************************/
9 
10 // psrchive/More/Polarimetry/Pulsar/SourceEstimate.h
11 
12 #ifndef __Pulsar_SourceEstimate_H
13 #define __Pulsar_SourceEstimate_H
14 
15 #include "Pulsar/MeanCoherency.h"
16 #include "Pulsar/ReceptionModel.h"
17 #include "MEAL/Coherency.h"
18 
19 #include "Types.h"
20 #include "MJD.h"
21 
22 namespace Calibration
23 {
25  class SourceEstimate : public Reference::Able
26  {
27  public:
28 
30  SourceEstimate (int ibin = -1);
31 
33  virtual void create_source (ReceptionModel* equation);
34 
36  void update ();
37 
40 
43 
45  bool valid;
46 
48  int phase_bin;
49 
51  unsigned input_index;
52 
54  unsigned add_data_attempts;
55 
57  unsigned add_data_failures;
58 
59  unsigned get_input_index() const { return input_index; }
60 
62  bool is_constrained () const;
63 
65  void report_input_failed (std::ostream&) const;
66 
67  protected:
68 
70  virtual void update_work ();
71  };
72 
73  class SourceObservation
74  {
75  public:
76 
78  std::string name;
79 
81  Signal::Source source;
82 
84  MJD epoch;
85 
86  void set_epoch (const MJD& mjd) { epoch = mjd; }
87  const MJD& get_epoch () const { return epoch; }
88 
90  unsigned ichan;
91 
93  std::string identifier;
94 
95  void set_identifier (const std::string& mjd) { identifier = mjd; }
96  const std::string& get_identifier () const { return identifier; }
97 
99  Stokes< Estimate<double> > observation;
100 
102  Stokes< Estimate<double> > baseline;
103 
105  Jones< Estimate<double> > response;
106 
109 
110  };
111 
112 }
113 
114 #endif
unsigned add_data_attempts
Count attempts to add data for this state.
Definition: SourceEstimate.h:64
void report_input_failed(std::ostream &) const
Report the input data fail rate.
Definition: SourceEstimate.C:40
unsigned add_data_failures
Count failures to add data for this state.
Definition: SourceEstimate.h:67
Definition: Archive.h:26
bool is_constrained() const
Return true if the last/top source estimate has data to constrain it.
Definition: SourceEstimate.C:35
virtual void update_work()
does the work for update method, which does some generic extra bits
Definition: SourceEstimate.C:69
Models a set of transformations and source polarizations.
Definition: ReceptionModel.h:32
static unsigned verbose
Verbosity level.
Definition: Calibrator.h:40
int phase_bin
Phase bin from which pulsar polarization is derived.
Definition: SourceEstimate.h:58
unsigned get_num_input() const
Get the number of input states.
Definition: MeasurementEquation.C:43
SourceEstimate(int ibin=-1)
Construct with the specified bin from Archive.
Definition: SourceEstimate.C:15
bool valid
Validity flag for this estimate.
Definition: SourceEstimate.h:55
unsigned input_index
The index of the source in the model.
Definition: SourceEstimate.h:61
A weighted mean of coherency matrix estimates.
Definition: MeanCoherency.h:26
virtual void create_source(ReceptionModel *equation)
Create the source and add it to the measurement equation.
Definition: SourceEstimate.C:25
void update()
Update source with the estimate.
Definition: SourceEstimate.C:51
MeanCoherency estimate
Best estimate (first guess) of Stokes parameters.
Definition: SourceEstimate.h:52
Reference::To< MEAL::Coherency > source
Model of Stokes parameters.
Definition: SourceEstimate.h:49
virtual void add_input(Complex2 *state=0)
Add an input, , where = get_num_input.
Definition: MeasurementEquation.C:33

Generated using doxygen 1.8.17