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
22namespace Calibration
23{
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
49
51 unsigned input_index;
52
55
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
108 Reference::To< const MEAL::Complex2 > xform;
109
110 };
111
112}
113
114#endif
A weighted mean of coherency matrix estimates.
Definition MeanCoherency.h:21
Models a set of transformations and source polarizations.
Definition ReceptionModel.h:28
virtual void update_work()
does the work for update method, which does some generic extra bits
Definition SourceEstimate.C:74
Reference::To< MEAL::Coherency > source
Model of Stokes parameters.
Definition SourceEstimate.h:39
unsigned input_index
The index of the source in the model.
Definition SourceEstimate.h:51
bool valid
Validity flag for this estimate.
Definition SourceEstimate.h:45
unsigned add_data_failures
Count failures to add data for this state.
Definition SourceEstimate.h:57
MeanCoherency estimate
Best estimate (first guess) of Stokes parameters.
Definition SourceEstimate.h:42
SourceEstimate(int ibin=-1)
Construct with the specified bin from Archive.
Definition SourceEstimate.C:15
virtual void create_source(ReceptionModel *equation)
Create the source and add it to the measurement equation.
Definition SourceEstimate.C:25
bool is_constrained() const
Return true if the last/top source estimate has data to constrain it.
Definition SourceEstimate.C:40
int phase_bin
Phase bin from which pulsar polarization is derived.
Definition SourceEstimate.h:48
void update()
Update source with the estimate.
Definition SourceEstimate.C:56
void report_input_failed(std::ostream &) const
Report the input data fail rate.
Definition SourceEstimate.C:45
unsigned add_data_attempts
Count attempts to add data for this state.
Definition SourceEstimate.h:54

Generated using doxygen 1.14.0