SystemCalibrator.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 - 2016 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/SystemCalibrator.h
10 
11 #ifndef __Pulsar_SystemCalibrator_H
12 #define __Pulsar_SystemCalibrator_H
13 
14 #include "Pulsar/PolnCalibrator.h"
15 
16 #include "Pulsar/ReceptionModelSolver.h"
17 #include "Pulsar/SignalPath.h"
18 
19 #include "Pulsar/CoherencyMeasurementSet.h"
20 #include "Pulsar/SourceEstimate.h"
21 #include "Pulsar/Processor.h"
22 
23 #include "BatchQueue.h"
24 
25 namespace Pulsar
26 {
27  class ReferenceCalibrator;
28  class FluxCalibrator;
29  class CalibratorStokes;
30  class VariableTransformation;
31 
33 
38  class SystemCalibrator : public PolnCalibrator
39  {
40 
41  public:
42 
44 
46  class StepFinder;
47 
49  SystemCalibrator (Archive* archive = 0);
50 
53 
55  virtual ~SystemCalibrator ();
56 
58  Calibrator::Info* get_Info () const;
59 
61  MJD get_epoch () const;
62 
64  unsigned get_nchan () const;
65 
67  unsigned get_ndata (unsigned ichan) const;
68 
70  virtual unsigned get_nstate () const;
71 
73  virtual unsigned get_nstate_pulsar () const;
74 
76  virtual unsigned get_state_is_pulsar (unsigned istate) const;
77 
79  virtual bool has_cal () const { return calibrator_estimate.size(); }
80 
82  virtual Calibrator::Info* new_info_pulsar (unsigned istate) const;
83 
85  void set_refcal_through_frontend (bool flag = true);
86 
88  void set_flux_calibrator (const FluxCalibrator* fluxcal);
89 
91  void set_calibrators (const std::vector<std::string>& filenames);
92 
95 
97  virtual void set_calibrator (const Archive*);
98 
100  virtual void set_response( MEAL::Complex2* );
101 
104 
106  void set_response_fixed (const std::vector<unsigned>&);
107 
109  virtual void set_response_variation ( unsigned iparam,
111 
113  virtual void set_impurity( MEAL::Real4* );
114 
116  virtual void set_projection( VariableTransformation* );
117 
119  virtual void set_ionospheric_rotation_measure (double rm);
120 
122  virtual void set_gain( MEAL::Univariate<MEAL::Scalar>* );
123 
126 
129 
131  virtual void add_gain_step (const MJD&);
132 
134  virtual void add_diff_gain_step (const MJD&);
135 
137  virtual void add_diff_phase_step (const MJD&);
138 
140  virtual void add_step (const MJD&, Calibration::VariableBackend*);
141 
143  void set_step_after_cal (bool val = true) { step_after_cal = val; }
144  bool get_step_after_cal () const { return step_after_cal; }
145 
148  virtual void set_foreach_calibrator( const MEAL::Complex2* );
149 
152 
154  virtual void preprocess (Archive* data);
155 
157  virtual void add_observation (const Archive* data);
158 
160  virtual void set_normalize_by_invariant (bool flag = true);
161 
163  virtual void add_pulsar (const Archive* data);
164 
166  virtual void add_calibrator (const Archive* data);
167 
169  virtual void add_calibrator (const ReferenceCalibrator* polncal);
170 
172  virtual bool calibrator_match (const Archive*, std::string& reason_for_not_matching);
173 
175  virtual void add_epoch (const MJD& epoch);
176 
178  MJD get_start_epoch () const { return start_epoch; }
179 
181  MJD get_end_epoch () const { return end_epoch; }
182 
184  virtual void set_nthread (unsigned nthread);
185 
187  virtual void set_equation_configuration (const std::vector<std::string>&);
188 
190  virtual bool has_solver () const;
191 
193  virtual const Solver* get_solver (unsigned ichan) const;
194 
196  virtual void set_solver (Solver*);
197 
199  virtual Solver* get_solver ();
200 
202  virtual void set_retry_reduced_chisq (float);
203 
205  virtual void set_invalid_reduced_chisq (float);
206 
208  virtual void set_report_projection (bool);
209 
211  virtual void set_report_initial_state (bool flag = true);
212 
214  virtual void set_report_input_data (bool flag = true);
215 
217  virtual void set_report_input_failed (bool flag = true);
218 
220  void set_cal_outlier_threshold (float f) { cal_outlier_threshold = f; }
221 
223  float get_cal_outlier_threshold () const { return cal_outlier_threshold; }
224 
227 
229  float get_cal_intensity_threshold () const { return cal_intensity_threshold; }
230 
233 
236 
238  void set_step_finder (StepFinder*);
239 
241  StepFinder* get_step_finder ();
242 
244  virtual void solve ();
245 
247  virtual void reset ();
248 
250  virtual bool get_solved () const;
251 
253  virtual bool has_valid () const;
254 
256  float get_reduced_chisq (unsigned ichan) const;
257 
259  virtual void precalibrate (Archive* archive);
260 
262  virtual MEAL::Complex2* get_transformation (const Archive* data,
263  unsigned isub, unsigned ichan);
264 
266  virtual Archive* new_solution (const std::string& archive_class) const;
267 
269  virtual const CalibratorStokes* get_CalibratorStokes () const;
270 
272  virtual const Calibration::SignalPath* get_model (unsigned ichan) const;
273 
275  class Unloader;
276 
277  protected:
278 
279  friend class SystemCalibratorPlotter;
280  friend class MatrixTemplateMatching;
281 
283  virtual void prepare (const Archive* data);
284 
286  virtual void calculate_transformation ();
287 
289  void create_model ();
290 
293 
295  std::vector<std::string> equation_configuration;
296 
299 
302 
305 
308 
311 
314 
316  std::vector<unsigned> response_fixed;
317 
320 
322 
324  std::map< unsigned, Reference::To<UniScalar> > response_variation;
325 
328 
331 
334 
335  std::vector<MJD> gain_steps;
336  std::vector<MJD> diff_gain_steps;
337  std::vector<MJD> diff_phase_steps;
338 
341 
344 
346  virtual void init_model (unsigned ichan);
347 
349  virtual void init_estimates ( std::vector<Calibration::SourceEstimate>&,
350  unsigned ibin = 0 );
351 
353  virtual void print_input_failed (const std::vector<Calibration::SourceEstimate>&);
354  std::vector<std::ofstream*> input_failed;
355  virtual void close_input_failed ();
356 
359 
361  virtual void create_calibrator_estimate ();
362 
364  bool data_submitted;
365 
367  std::vector< std::vector<Calibration::SourceObservation> > calibrator_data;
368 
369  // submit all calibrator data
370  virtual void submit_calibrator_data ();
371 
372  virtual void submit_calibrator_data (Calibration::CoherencyMeasurementSet&,
373  const Calibration::SourceObservation&);
374 
375  virtual void integrate_calibrator_data (const Calibration::SourceObservation&);
376 
377  virtual void integrate_calibrator_solution (const Calibration::SourceObservation&);
378 
380  virtual void load_calibrators ();
381 
382  Reference::To<StepFinder> step_finder;
383 
385  virtual void match (const Archive*);
386 
388  std::vector< std::vector<Calibration::CoherencyMeasurementSet> > pulsar_data;
389 
391  virtual void add_pulsar (const Archive* data, unsigned isub);
392 
394 
396  const Integration*, unsigned ichan) = 0;
397 
399  virtual void integrate_pulsar_data
401 
403  virtual void submit_pulsar_data ();
404 
407 
409  std::vector<std::string> calibrator_filenames;
412 
414  std::vector<Calibration::SourceEstimate> calibrator_estimate;
415 
418 
420  MJD end_epoch;
421 
423  bool step_after_cal;
424 
427 
430 
433 
436 
438  bool set_initial_guess;
439 
442 
444  float retry_chisq;
445 
447  float invalid_chisq;
448 
450  bool report_projection;
451 
454 
456  bool report_input_data;
457 
459  bool report_input_failed;
460 
462  double cal_outlier_threshold;
463 
466 
469 
471  virtual void solve_prepare ();
472 
474  void configure ( MEAL::Function* equation );
475 
477  virtual void export_prepare () const = 0;
478 
481 
483  bool get_prepared () const;
484 
486  Solver* get_solver (unsigned ichan);
487 
489  void resolve (unsigned ichan);
490 
492  void check_ichan (const char* name, unsigned ichan) const;
493 
494  unsigned get_data_fail;
495  unsigned get_data_call;
496 
500 
502  bool has_pulsar;
503 
504  private:
505 
506  std::vector<bool> epoch_added;
507 
508  Jones<double> invert_basis;
509 
511  bool is_solved;
512 
514  bool is_prepared;
515 
516  };
517 
518 }
519 
520 #endif
521 
Jones< double > evaluate(std::vector< Jones< double > > *grad=0) const
Solver * get_solver()
Get the algorithm used to solve the measurement equation.
Definition: ReceptionModel.C:53
void set_calibrators(const std::vector< std::string > &filenames)
Set the calibrator observations to be loaded after first pulsar.
Definition: SystemCalibrator.C:629
void set_transformation_index(unsigned index)
Set the transformation index, .
Definition: MeasurementEquation.C:128
virtual void set_retry_reduced_chisq(float)
Set the reduced chisq above which the solution will be retried.
Definition: SystemCalibrator.C:2222
virtual void add_diff_phase_step(const MJD &)
Add a step to the differential phase variations.
Definition: SystemCalibrator.C:330
virtual void print_input_failed(const std::vector< Calibration::SourceEstimate > &)
Report on input data failure rates.
Definition: SystemCalibrator.C:1600
virtual void set_report_projection(bool)
Report on the projection correction used in add_pulsar method.
Definition: SystemCalibrator.C:2232
virtual void set_impurity(MEAL::Real4 *)
Set the impurity transformation.
Definition: SystemCalibrator.C:290
virtual unsigned get_npol() const =0
Get the number of polarizations.
bool step_after_cal
Apply time step after rather than before cals.
Definition: SystemCalibrator.h:428
virtual Solver * get_solver()
Get the algorithm used to solve the measurement equation.
Definition: SystemCalibrator.C:151
Supplements a SystemCalibrator with a SingleAxisCalibrator.
Definition: HybridCalibrator.h:26
void covariance(Scalar *function, unsigned index, std::vector< unsigned > &imap, std::vector< std::vector< double > > &covar)
virtual void set_nthread(unsigned nthread)
Set the number of channels that may be simultaneously solved.
Definition: SystemCalibrator.C:1557
Calibrator::Info * get_Info() const
Return the Calibrator information.
Definition: SystemCalibrator.C:182
virtual void set_solver(Solver *)
Set the algorithm used to solve the measurement equation.
Definition: SystemCalibrator.C:146
Reference::To< const CalibratorStokes > calibrator_stokes
The CalibratorStokesExtension of the Archive passed during construction.
Definition: SystemCalibrator.h:315
virtual void set_invalid_reduced_chisq(float)
Set the reduced chisq above which a solution will be flagged invalid.
Definition: SystemCalibrator.C:2227
virtual double get_rotation_measure() const =0
Get the rotation measure (in )
std::map< unsigned, Reference::To< UniScalar > > response_variation
Temporal variation of response parameters.
Definition: SystemCalibrator.h:329
virtual Signal::Source get_type() const =0
Get the observation type (psr, cal)
bool data_submitted
Flag set when data have been integrated with measurement equation.
Definition: SystemCalibrator.h:369
virtual void precalibrate(Archive *archive)
Pre-calibrate the polarization of the given archive.
Definition: SystemCalibrator.C:1998
std::vector< unsigned > response_fixed
Indeces of response parameters to be held fixed.
Definition: SystemCalibrator.h:321
virtual std::string get_source() const =0
Get the source name.
virtual bool calibrator_match(const Archive *, std::string &reason_for_not_matching)
Return true if this calibrator can be applied to the data.
Definition: SystemCalibrator.C:1992
void set_refcal_through_frontend(bool flag=true)
True if noise diode illuminates feed; false if coupled after OMT.
Definition: SystemCalibrator.C:189
Reference::Vector< Calibration::SignalPath > model
The standard calibration model as a function of frequency.
Definition: SystemCalibrator.h:297
Expert * expert()
Provide access to the expert interface.
Definition: Integration.C:162
std::vector< Calibration::SourceEstimate > calibrator_estimate
Uncalibrated estimate of calibrator polarization.
Definition: SystemCalibrator.h:419
virtual void set_equation_configuration(const std::vector< std::string > &)
Set the measurement equation configuration options.
Definition: SystemCalibrator.C:1563
Reference::To< const Calibration::VariableBackend > stepeach_calibrator
Step in backend response at each calibrator observation.
Definition: SystemCalibrator.h:348
MJD end_epoch
Epoch of the last observation.
Definition: SystemCalibrator.h:425
virtual MJD get_epoch() const =0
Get the epoch of the rising edge of bin zero.
Reference::To< const FluxCalibrator > flux_calibrator
The FluxCalibrator solution.
Definition: SystemCalibrator.h:306
double cal_outlier_threshold
Threshold used to reject outliers when computing CAL levels.
Definition: SystemCalibrator.h:467
void set_cal_outlier_threshold(float f)
Set the threshold used to reject outliers when computing CAL levels.
Definition: SystemCalibrator.h:225
virtual void set_gain(MEAL::Univariate< MEAL::Scalar > *)
Set the time variation of absolute gain.
Definition: SystemCalibrator.C:305
float get_cal_intensity_threshold() const
Get the threshold used to reject CAL observations with no signal.
Definition: SystemCalibrator.h:234
virtual void add_epoch(const MJD &epoch)
Add an observational epoch.
Definition: SystemCalibrator.C:200
double get_centre_frequency(unsigned ichan) const
Get the Profile centre frequency attribute of the given channel.
Definition: Integration.C:359
float get_cal_outlier_threshold() const
Get the threshold used to reject outliers when computing CAL levels.
Definition: SystemCalibrator.h:228
PolnCalibrator with estimated calibrator Stokes parameters.
Definition: SystemCalibrator.h:43
void transform(const Jones< float > &response)
Perform the congruence transformation on each polarimetric profile.
Definition: IntegrationExpert.h:110
MJD get_start_epoch() const
Get the epoch of the first observation.
Definition: SystemCalibrator.h:183
bool get_prepared() const
Get the state of the prepared flag.
Definition: SystemCalibrator.C:1943
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
void check_ichan(const char *name, unsigned ichan) const
ensure that ichan < model.size()
Definition: SystemCalibrator.C:2252
const Archive * get_Archive() const
Return a const reference to the calibrator archive.
Definition: Calibrator.C:125
BatchQueue queue
Controls the number of channels that may be simultaneously solved.
Definition: SystemCalibrator.h:485
Faraday rotation transformation.
Definition: Faraday.h:26
virtual void solve()
Solve equation for each frequency.
Definition: SystemCalibrator.C:1728
virtual ReferenceCalibrator * clone() const =0
Clone operator.
ErrorCode get_code() const
virtual void set_response(MEAL::Complex2 *)
Set the response (pure Jones) transformation.
Definition: SystemCalibrator.C:274
Reference::To< UniScalar > diff_phase_variation
Time variation of differential phase.
Definition: SystemCalibrator.h:338
virtual void add_calibrator(const Archive *data)
Add the calibrator observation to the set of constraints.
Definition: SystemCalibrator.C:745
The primary interface to pulsar observational data.
Definition: Archive.h:45
std::vector< std::string > calibrator_filenames
The calibrators to be loaded after first pulsar observation.
Definition: SystemCalibrator.h:414
Contains information about the receiver and receiver platform.
Definition: Receiver.h:28
void add_prefit_report(Report *)
Add a report to be executed before solving the measurement equation.
Definition: ReceptionModel.C:66
virtual bool has_valid() const
Returns true if at least one channel returns get_valid == true.
Definition: SystemCalibrator.C:1953
void set_name(const std::string &val)
Set the name.
Definition: CoherencyMeasurementSet.h:61
VariableBackend * clone() const
Clone operator.
Definition: VariableBackend.C:52
Models a set of transformations and source polarizations.
Definition: ReceptionModel.h:32
bool get_solved() const
Reference::To< UniScalar > gain_variation
Time variation of absolute gain.
Definition: SystemCalibrator.h:332
U get_error() const
float get_cal_polarization_threshold() const
Get the minimum degree of polarization of CAL observations.
Definition: SystemCalibrator.h:240
Report on the reception model paramters.
Definition: InputDataReport.h:24
unsigned get_ndata(unsigned ichan) const
Get the number of data points in the given frequency channel.
Definition: SystemCalibrator.C:266
const ScalarMath sqrt(const ScalarMath &x)
Receiver * clone() const
Clone method.
Definition: Receiver.h:56
Stores the Stokes parameters of the reference source.
Definition: CalibratorStokes.h:28
MEAL::Transformation< Complex2 > * get_transformation()
Get the current transformation.
Definition: MeasurementEquation.C:112
static Solver * new_default_Solver()
Returns a new instance of the default Solver algorithm.
Definition: ReceptionModel.C:25
IndexedProduct * get_cal_response()
Get the response for calibrator observations.
Definition: VariableBackendEstimate.h:94
Type * get() const
bool get_auxiliary_birefringence_corrected() const
Auxiliary inter-channel birefringence has been removed.
Definition: Integration.C:570
virtual MEAL::Complex2 * get_transformation(const Archive *data, unsigned isub, unsigned ichan)
Return the transformation to be used for precalibration.
Definition: SystemCalibrator.C:2125
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
virtual unsigned get_nstate() const
Get the total number of input polarization states (pulsar and cal)
Definition: SystemCalibrator.C:209
Reference::To< const MEAL::Complex2 > foreach_calibrator
Transformation cloned for each calibrator observation.
Definition: SystemCalibrator.h:345
std::vector< std::string > equation_configuration
Meausrement equation configuration options.
Definition: SystemCalibrator.h:300
virtual void export_prepare() const =0
Prepare to export the solution in current state; e.g. for plotting.
ReferenceFluxDensity
virtual Complex2 * get_transformation()
void configure(MEAL::Function *equation)
Configure a measurement equation.
Definition: SystemCalibrator.C:1568
Solve the measurement equation by non-linear least squares minimization.
Definition: ReceptionModelSolver.h:26
void set_step_finder(StepFinder *)
Set the algorithm used to automatically insert steps in response.
Definition: SystemCalibrator.C:170
Correct the backend convention.
Definition: BasisCorrection.h:28
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
virtual void set_poln_calibrated(bool done=true)=0
Set the value to be returned by get_poln_calibrated.
virtual Signal::State get_state() const =0
Get the state of the profile data.
bool set_initial_guess
Set the initial guess in solve_prepare.
Definition: SystemCalibrator.h:443
double get_rotation_measure() const
Get the auxiliary rotation measure.
Definition: AuxColdPlasmaMeasures.C:41
float get_weight(unsigned ichan) const
Get the Profile weight attribute of the given channel.
Definition: Integration.C:388
bool required(const Archive *) const
Return true if the operation is required.
Definition: BackendCorrection.C:47
void set_flux_calibrator(const FluxCalibrator *fluxcal)
Set the flux calibrator solution used to estimate calibrator Stokes.
Definition: SystemCalibrator.C:634
Reference::To< VariableTransformation > projection
The projection transformation (overrides ProjectionCorrection)
Definition: SystemCalibrator.h:309
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
virtual void set_ionospheric_rotation_measure(double rm)
Set the ionospheric rotation measure applied to all observations.
Definition: SystemCalibrator.C:113
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
void set_projection_corrected(bool val)
Set true when receptor projection onto sky has been corrected.
Definition: Receiver.h:172
float invalid_chisq
The maximum reduced chisq before a fit will be flagged invalid.
Definition: SystemCalibrator.h:452
void set_identifier(const std::string &val)
Set the identifier.
Definition: CoherencyMeasurementSet.h:55
void set_cal_polarization_threshold(float f)
Set the minimum degree of polarization of CAL observations.
Definition: SystemCalibrator.h:237
std::vector< std::string > filenames
Filenames of Pulsar::Archives from which instance was created.
Definition: Calibrator.h:126
virtual void prepare(const Archive *data)
Prepare the model.
Definition: SystemCalibrator.C:417
void set_step_after_cal(bool val=true)
Apply time steps afer cals.
Definition: SystemCalibrator.h:148
virtual bool has_cal() const
Return true if calibrator (e.g. noise diode) data are incorporated.
Definition: SystemCalibrator.h:84
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
Represents the system as a polar decomposition.
Definition: PolarCalibrator.h:25
double cal_intensity_threshold
Threshold used to reject CAL observations with no signal.
Definition: SystemCalibrator.h:470
virtual void set_report_input_data(bool flag=true)
Report on the data included as constraints before fitting.
Definition: SystemCalibrator.C:2242
virtual bool get_solved() const
Get the status of the model.
Definition: SystemCalibrator.C:1948
virtual void set_foreach_calibrator(const MEAL::Complex2 *)
Prepare the data for inclusion in the model Set the transformation to be cloned for each calibrator.
Definition: SystemCalibrator.C:295
Definition: Calibrator.h:152
A CoherencyMeasurement set and their coordinates.
Definition: CoherencyMeasurementSet.h:26
virtual void add_observation(const Archive *data)
Add the observation to the set of constraints.
Definition: SystemCalibrator.C:373
virtual void set_stepeach_calibrator(const Calibration::VariableBackend *)
Set the VariableBackend step to be cloned for each calibrator.
Definition: SystemCalibrator.C:300
float get_reduced_chisq(unsigned ichan) const
Get the reduced chisq of the best fit in the specified channel.
Definition: SystemCalibrator.C:1713
bool report_initial_state
Report the initial state of model before fitting.
Definition: SystemCalibrator.h:458
virtual unsigned get_state_is_pulsar(unsigned istate) const
Return true if the state index is a pulsar.
Definition: SystemCalibrator.C:220
Stores PolnCalibrator parameters in an Archive instance.
Definition: PolnCalibratorExtension.h:28
void set_previous_solution(const PolnCalibrator *)
Set the response to a previous solution (for the first guess)
Definition: SystemCalibrator.C:639
virtual void add_step(const MJD &, Calibration::VariableBackend *)
Add a VariableBackend step at the specified MJD.
Definition: SystemCalibrator.C:336
StepFinder * get_step_finder()
Get the algorithm used to automatically insert steps in response.
Definition: SystemCalibrator.C:176
Calibrators derived from reference source observations.
Definition: ReferenceCalibrator.h:31
std::vector< std::vector< Calibration::CoherencyMeasurementSet > > pulsar_data
Pulsar data loaded but not submitted or integrated.
Definition: SystemCalibrator.h:393
bool guess_physical_calibrator_stokes
Ensure that first guess of calibrator Stokes parameters is physical.
Definition: SystemCalibrator.h:446
void create_model()
Create the model array.
Definition: SystemCalibrator.C:1399
virtual void submit_pulsar_data()
add all pulsar data constraints to measurement equation
Definition: SystemCalibrator.C:1065
virtual void set_report_input_failed(bool flag=true)
Report on the number of failed attempts to add data.
Definition: SystemCalibrator.C:2247
bool normalize_by_invariant
Normalize pulsar Stokes parameters by the invariant interval.
Definition: SystemCalibrator.h:431
Reference::To< MEAL::Real4 > impurity
Impurity transformation.
Definition: SystemCalibrator.h:324
void set_weight(unsigned ichan, float weight)
Set the Profile weight attributes of the given channel.
Definition: Integration.C:401
virtual void set_response_variation(unsigned iparam, MEAL::Univariate< MEAL::Scalar > *)
Set the temporal variation function of a specified response parameter.
Definition: SystemCalibrator.C:284
void resolve(unsigned ichan)
Solve the specified channel after copying a good solution from another.
Definition: SystemCalibrator.C:1865
virtual void set_normalize_by_invariant(bool flag=true)
Normalize each pulsar Stokes vector by the mean on-pulse invariant.
Definition: SystemCalibrator.C:118
T get_value() const
void set_basis_corrected(bool)
Set true when receptor basis has been corrected.
Definition: Receiver.C:174
void set_calibrator_preprocessor(Processor *)
Set the calibrator preprocessor.
Definition: SystemCalibrator.C:649
double ionospheric_rotation_measure
The ionospheric rotation measure applied to all observations.
Definition: SystemCalibrator.h:312
Reference::To< MEAL::Complex2 > response
Response transformation.
Definition: SystemCalibrator.h:318
virtual void set_calibrator(const Archive *)
Set the calibrator.
Definition: SystemCalibrator.C:97
MJD get_epoch() const
Return the reference epoch of the calibration experiment.
Definition: SystemCalibrator.C:195
virtual void set_diff_phase(MEAL::Univariate< MEAL::Scalar > *)
Set the time variation of differential phase.
Definition: SystemCalibrator.C:315
Reference::To< const PolnCalibrator > previous
A previous solution, if availabe.
Definition: SystemCalibrator.h:503
virtual Calibrator::Info * new_info_pulsar(unsigned istate) const
Return a new plot information interface for the specified pulsar state.
Definition: SystemCalibrator.C:236
SystemCalibrator(Archive *archive=0)
Construct with optional processed calibrator Archive.
Definition: SystemCalibrator.C:53
virtual const CalibratorStokes * get_CalibratorStokes() const
Return the CalibratorStokesExtension.
Definition: SystemCalibrator.C:1353
virtual ~SystemCalibrator()
Destructor.
Definition: SystemCalibrator.C:165
const MJD & get_epoch() const
Get the epoch.
Definition: CoherencyMeasurementSet.h:76
MEAL::Complex2 * new_transformation(const PolnCalibratorExtension *, unsigned ichan)
Create a new transformation instance described by the extension.
Definition: PolnCalibratorExt.C:126
virtual Archive * new_solution(const std::string &archive_class) const
Return a Calibrator::new_solution with a CalibratorStokesExtension.
Definition: SystemCalibrator.C:2176
Reference::To< Solver > solver
The algorithm used to solve the measurement equation.
Definition: SystemCalibrator.h:303
virtual void add_pulsar(const Archive *data)
Add the pulsar observation to the set of constraints.
Definition: SystemCalibrator.C:389
unsigned get_iterations() const
Polarimetric calibrators.
Definition: PolnCalibrator.h:41
Unpublished polar decomposition.
Definition: CalibratorTypes.h:109
Interface to any object that processes data in an Archive.
Definition: Processor.h:27
bool report_projection
Report on the projection transformation used in add_pulsar.
Definition: SystemCalibrator.h:455
void add_coordinate(MEAL::Argument::Value *abscissa)
Add an independent variable.
Definition: CoherencyMeasurementSet.C:36
std::string get_filename() const
Get the name of the file to which the archive will be unloaded.
Definition: Archive.h:108
virtual void preprocess(Archive *data)
Prepare the data for inclusion in the model.
Definition: SystemCalibrator.C:347
Correct the backend convention.
Definition: BackendCorrection.h:28
virtual void load_calibrators()
Load any postponed calibrators and those set by set_calibrators.
Definition: SystemCalibrator.C:654
virtual void prepare_calibrator_estimate(Signal::Source)
Prepare any calibrator estimates.
Definition: SystemCalibrator.C:1193
Calibrates flux using standard candles and artificial sources.
Definition: FluxCalibrator.h:29
bool refcal_through_frontend
True if noise diode illuminates feed; false if coupled after OMT.
Definition: SystemCalibrator.h:440
float retry_chisq
The maximum reduced chisq before another fit will be attempted.
Definition: SystemCalibrator.h:449
virtual void add_diff_gain_step(const MJD &)
Add a step to the differential gain variations.
Definition: SystemCalibrator.C:325
void set_response_fixed(const std::vector< unsigned > &)
Set the response parameters to be held fixed.
Definition: SystemCalibrator.C:644
A coherency matrix measurement and its estimated error.
Definition: CoherencyMeasurement.h:32
virtual unsigned get_nchan() const =0
Get the number of chans.
unsigned get_nchan() const
Get the number of frequency channels.
Definition: SystemCalibrator.C:242
float get_chisq() const
virtual void set_projection(VariableTransformation *)
Set the projection transformation.
Definition: SystemCalibrator.C:108
const std::string get_message() const
virtual void integrate_pulsar_data(const Calibration::CoherencyMeasurementSet &)
add pulsar data to mean estimate used as initial guess
Definition: SystemCalibrator.h:405
virtual void init_estimates(std::vector< Calibration::SourceEstimate > &, unsigned ibin=0)
Initialize a vector of SourceEstimate instances.
Definition: SystemCalibrator.C:1158
bool correct_interstellar_Faraday_rotation
Include a correction for Faraday rotation in the ISM.
Definition: SystemCalibrator.h:437
Calibrator::Type * new_CalibratorType(const MEAL::Complex2 *xform)
Create a new Calibrator::Type instance according to the transformation.
Definition: CalibratorType_factory.C:61
bool get_singular() const
virtual const Calibration::SignalPath * get_model(unsigned ichan) const
Return the SignalPath for the specified channel.
Definition: SystemCalibrator.C:1551
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void set_diff_gain(MEAL::Univariate< MEAL::Scalar > *)
Set the time variation of differential gain.
Definition: SystemCalibrator.C:310
Physical parameterization of the instrumental response.
Definition: VariableBackend.h:35
unsigned get_ichan() const
Get the channel index.
Definition: CoherencyMeasurementSet.h:82
virtual void add_gain_step(const MJD &)
Add a step to the gain variations.
Definition: SystemCalibrator.C:320
Represents the system as a Calibration::SingleAxis.
Definition: SingleAxisCalibrator.h:26
Stores parameters used to correct auxiliary dispersion and birefringence.
Definition: AuxColdPlasmaMeasures.h:24
virtual void calculate_transformation()
Initialize the PolnCalibration::transformation attribute.
Definition: SystemCalibrator.C:1975
virtual void reset()
Reset the response in each frequency to its initial value.
Definition: SystemCalibrator.C:1964
bool report_input_failed
Report the number of input failures.
Definition: SystemCalibrator.h:464
virtual void init_model(unsigned ichan)
Initialize the SignalPath of the specified channel.
Definition: SystemCalibrator.C:1470
unsigned get_maximum_iterations() const
Reference::To< UniScalar > diff_gain_variation
Time variation of differential gain.
Definition: SystemCalibrator.h:335
Report on the reception model paramters.
Definition: ModelParametersReport.h:24
void set_ichan(unsigned val)
Set the channel index.
Definition: CoherencyMeasurementSet.h:79
void set_transformation_index(unsigned index)
Set the transformation through which the measurements are made.
Definition: CoherencyMeasurementSet.C:24
Analysis of the impact of instrumental boost on phase shift estimate.
Definition: VariableTransformation.h:22
MJD start_epoch
Epoch of the first observation.
Definition: SystemCalibrator.h:422
std::string get_summary() const
Return a summary of parameters that produce non-identity terms.
Definition: BasisCorrection.C:123
virtual bool has_solver() const
Return true if least squares minimization solvers are available.
Definition: SystemCalibrator.C:124
bool solve_in_reverse_channel_order
Solve measurement equations in reverse channel order.
Definition: SystemCalibrator.h:434
virtual void match(const Archive *)
Ensure that the pulsar observation can be added to the data set.
Definition: SystemCalibrator.C:613
virtual void solve_prepare()
Prepare the measurement equations for fitting.
Definition: SystemCalibrator.C:1622
bool has_pulsar
Flag set after the first pulsar observation is added.
Definition: SystemCalibrator.h:507
MJD get_end_epoch() const
Get the epoch of the last observation.
Definition: SystemCalibrator.h:186
unsigned get_nfree() const
virtual void set_scale(Signal::Scale scale)=0
Set the scale in which flux density is measured.
Manages a variable backend and its best estimate.
Definition: VariableBackendEstimate.h:46
virtual void create_calibrator_estimate()
Create the calibrator estimate.
Definition: SystemCalibrator.C:1202
Adapts a VariableTransformation to a ProjectionCorrection.
Definition: VariableProjectionCorrection.h:23
double cal_polarization_threshold
Minimum degree of polarization of CAL observations.
Definition: SystemCalibrator.h:473
Reference::To< Processor > calibrator_preprocessor
The calibrator pre-processor.
Definition: SystemCalibrator.h:416
void set_epoch(const MJD &val)
Set the epoch.
Definition: CoherencyMeasurementSet.h:73
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
void set_cal_intensity_threshold(float f)
Set the threshold used to reject CAL observations with no signal.
Definition: SystemCalibrator.h:231
virtual unsigned get_nstate_pulsar() const
Get the number of pulsar polarization states in the model.
Definition: SystemCalibrator.C:229
IndexedProduct * get_psr_response()
Get the response for pulsar observations.
Definition: VariableBackendEstimate.h:91
static const Jones & identity()
std::vector< std::vector< Calibration::SourceObservation > > calibrator_data
Calibrator data loaded but not submitted or integrated.
Definition: SystemCalibrator.h:372
bool report_input_data
Report on the data included as constraints.
Definition: SystemCalibrator.h:461
virtual void set_report_initial_state(bool flag=true)
Report on the initial state of the model before fitting.
Definition: SystemCalibrator.C:2237

Generated using doxygen 1.8.17