11#ifndef __Pulsar_PolnCalibratorExtensionUtils_h
12#define __Pulsar_PolnCalibratorExtensionUtils_h
14#include "Pulsar/PolnCalibratorExtension.h"
15#include "Pulsar/PolnCalibrator.h"
20 MEAL::Complex2* new_transformation (
const Pulsar::PolnCalibratorExtension*,
unsigned ichan);
23 void handle_parameter_names (MEAL::Complex2* to,
const Pulsar::PolnCalibratorExtension::Transformation* from);
26 void handle_parameter_names (Pulsar::PolnCalibratorExtension::Transformation* to,
const MEAL::Complex2* from);
29 template<
class T,
class F>
30 void copy (T* to,
const F* from)
32 if (to->get_nparam() != from->get_nparam())
34 throw Error (InvalidParam,
"Calibration::copy<To,From>",
35 "to nparam=%d != from nparam=%d",
36 to->get_nparam(), from->get_nparam());
39 for (
unsigned i=0; i<to->get_nparam(); i++)
40 to->set_Estimate(i, from->get_Estimate(i));
42 handle_parameter_names (to, from);