11#ifndef __Pulsar_RobustStepFinder_H
12#define __Pulsar_RobustStepFinder_H
14#include "Pulsar/SystemCalibratorStepFinder.h"
18 class RobustStepFinder :
public SystemCalibrator::StepFinder
27 SystemCalibrator* calibrator;
30 std::vector<unsigned> psr_before;
33 std::vector<unsigned> psr_after;
36 std::vector<unsigned> cal_before;
39 std::vector<unsigned> cal_after;
42 std::vector<unsigned> compare;
44 template<
typename Container>
45 void count_consistent (
const Container& container,
46 std::vector<unsigned>& before,
47 std::vector<unsigned>& after,
50 template<
typename Container>
51 void remove_inconsistent (Container& container,
52 std::vector<unsigned>& before,
53 std::vector<unsigned>& after);
56 void find_steps (std::vector<unsigned>& steps,
57 const std::vector<unsigned>& before,
58 const std::vector<unsigned>& after);
60 template<
class Container>
61 void add_steps (std::vector<MJD>& steps,
62 std::vector<unsigned>& step_sub,
64 bool align_to_cal = 0);
67 bool align_to_cal (MJD& i_epoch, std::string& i_id,
68 MJD& j_epoch, std::string& j_id);
73 void find_steps_pulsar (std::vector<MJD>& steps);
74 void find_steps_calibrator (std::vector<MJD>& steps);
77 void insert_steps (std::vector<MJD>& steps,
78 Calibration::VariableBackend* xform);
80 void remove_extra_calibrators ();
81 void remove_outliers ();
89 RobustStepFinder (
float threshold = 3.0)
91 step_threshold = threshold;
95 void set_step_threshold (
float val) { step_threshold = val; }
97 void process (SystemCalibrator*);
Defines the PSRCHIVE library.
Definition CalSource.h:17