FluxCalManager.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/Polarimetry/Pulsar/FluxCalManager.h
10
11#ifndef __Calibration_FluxCalManager_H
12#define __Calibration_FluxCalManager_H
13
14#include "Pulsar/SourceDeltaEstimate.h"
15#include "Pulsar/BackendEstimate.h"
16#include "Pulsar/SignalPath.h"
17
18namespace Calibration
19{
21
39
40 typedef std::vector< Reference::To<FluxCalObservation> > FluxCalObsVector;
41
43
51
53 {
54 public:
55
58
61
64
66 void integrate (Signal::Source type, const MEAL::Complex2*);
67
69 void integrate (const Jones< Estimate<double> >& correct, const SourceObservation& data);
70
71 void submit (CoherencyMeasurementSet&, const SourceObservation&);
72
74 unsigned get_nstate_on () const;
75
77 const SourceEstimate* get_source_on (unsigned istate) const;
78
80 unsigned get_nstate_off () const;
81
83 const SourceEstimate* get_source_off (unsigned istate) const;
84
86 void update ();
87
89 bool is_constrained () const;
90
92 const std::string& why_not_constrained () const { return not_constrained_reason; }
93
94 void allow_StokesV_to_vary (bool flag = true);
95 void model_multiple_source_states (bool flag = true);
96 void model_on_minus_off (bool flag = true);
97
98 protected:
99
102
105
108
111
114
116 FluxCalObsVector on_observations;
117
119 FluxCalObsVector off_observations;
120
122
124
126 FluxCalObsVector& get_observations (Signal::Source source_type);
127
129 void set_StokesV_infit (FluxCalObsVector&);
130
133
134 private:
135
136 bool multiple_source_states = false;
137 bool subtract_off_from_on = false;
138 bool StokesV_may_vary = false;
139
140 mutable std::string not_constrained_reason;
141 };
142
143}
144
145#endif
A CoherencyMeasurement set and their coordinates.
Definition CoherencyMeasurementSet.h:22
void add_observation(Signal::Source type)
Add a new observation.
Definition FluxCalManager.C:75
void integrate(Signal::Source type, const MEAL::Complex2 *)
Integrate an estimate of the backend.
Definition FluxCalManager.C:234
FluxCalObsVector off_observations
The set of off-source flux calibrator observations.
Definition FluxCalManager.h:119
Reference::To< SourceDeltaEstimate > standard_candle
The difference between on-source and off-source calibrator observations.
Definition FluxCalManager.h:123
Reference::To< MEAL::ProductRule< MEAL::Complex2 > > frontend
The frontend component of the instrument.
Definition FluxCalManager.h:110
FluxCalManager(SignalPath *composite)
Default constructor.
Definition FluxCalManager.C:20
FluxCalObsVector on_observations
The set of on-source flux calibrator observations.
Definition FluxCalManager.h:116
Reference::To< SignalPath > composite
The SignalPath manager into which signal paths are added.
Definition FluxCalManager.h:113
void set_backend(const MEAL::Complex2 *)
Set the backend transformation to be cloned for each flux calibrator.
bool is_constrained() const
Return true if at least one complete flux calibrator observation.
Definition FluxCalManager.C:58
const SourceEstimate * get_source_off(unsigned istate) const
Return the Source estimate for the ith state.
Definition FluxCalManager.C:310
FluxCalObsVector & get_observations(Signal::Source source_type)
Returns a reference to on_observations or off_observations.
Definition FluxCalManager.C:115
const SourceEstimate * get_source_on(unsigned istate) const
Return the Source estimate for the ith state.
Definition FluxCalManager.C:303
unsigned get_nstate_off() const
Get the number of independent FluxCalOff source states.
Definition FluxCalManager.C:317
SourceEstimate * create_SourceEstimate(Signal::Source)
Create a new SourceEstimate of the required type.
Definition FluxCalManager.C:137
unsigned get_nstate_on() const
Get the number of independent FluxCalOn source states.
Definition FluxCalManager.C:294
void add_source(FluxCalObservation *)
Add a new source to the model.
Definition FluxCalManager.C:126
void set_StokesV_infit(FluxCalObsVector &)
Set the fit flag for Stokes V in each source state.
Definition FluxCalManager.C:221
void add_backend(FluxCalObservation *)
Add a new backend to the model.
Definition FluxCalManager.C:92
void update()
Update all backend models with current best estimate.
Definition FluxCalManager.C:325
Reference::To< MEAL::Complex2 > backend
The backend transformation to be cloned for each flux calibrator.
Definition FluxCalManager.h:107
const std::string & why_not_constrained() const
Explain why if not constrained.
Definition FluxCalManager.h:92
Manages flux calibrator source state and backend transformation.
Definition FluxCalManager.h:23
Reference::To< SourceEstimate > source
Model of source and its first guess/best estimate.
Definition FluxCalManager.h:37
Reference::To< BackendEstimate > backend
Backend transformation for this observation.
Definition FluxCalManager.h:34
Signal::Source source_type
Source code (FluxCalOn or FluxCalOff)
Definition FluxCalManager.h:29
Manages multiple signal path transformations in a reception model.
Definition SignalPath.h:49
Manages a single source and its current best estimate (first guess)
Definition SourceEstimate.h:26

Generated using doxygen 1.14.0