Commit 63b47b0a authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Implementation de toutes de les fonctions de lecture des donnees et de fit de...

Implementation de toutes de les fonctions de lecture des donnees et de fit de trkacfit.cc ds trkfit.h .cc , Reza 16/02/2019
parent ae86d4b8
This diff is collapsed.
......@@ -3,13 +3,23 @@
using satellites and celestial sources tracks
R. Ansari, Fevrier 2019 */
#ifndef TRKFIT_H_SEEN
#define TRKFIT_H_SEEN
#include <string>
#include <vector>
#include <iostream>
#include <complex>
#include "slininterp.h"
#include "skymap.h"
#include "histats.h"
using namespace std;
using namespace SOPHYA;
void TrkFit_SetPrintLevel(int lev=0);
//-------------------------------------------------------------------------
//------------------- TrkInputDataSet -------------------------------------
//----- Class describing the input data set list
......@@ -34,3 +44,107 @@ public:
inline ostream& operator << (ostream& s, TrkInputDataSet const & trk)
{ trk.Print(s); return(s); }
//-------------------------------------------------------------------------
//------------------------ ACxDataSet -------------------------------------
//--- Class containing the Auto and Cross-correlation data for a track set
class AcxDataSet {
public:
AcxDataSet() : tot_npoints(0),zenang(0.),theta_0(0.),phi_0(0.) { }
AcxDataSet(AcxDataSet const & a);
AcxDataSet(TrkInputDataSet & tkds);
size_t ReadData(TrkInputDataSet & tkds);
AcxDataSet & operator = (AcxDataSet const & a);
inline size_t getTotNPoints() const { return tot_npoints; }
inline size_t NbTrk() const { return v_time_data.size(); }
static inline size_t getNbAutoCor() { return 4; }
static inline size_t getNbCrossCor() { return 6; }
vector< vector<double> > v_time_data;
vector< vector< vector<double> > > vv_data;
vector< vector< vector<double> > > vv_err;
vector< vector<double> > v_min_data;
vector< vector<double> > v_max_data;
vector< vector< vector< complex<double> > > > vv_cxdata;
vector< vector< vector<double> > > vv_cxerr;
vector< vector<double> > v_min_cxdata;
vector< vector<double> > v_max_cxdata;
size_t tot_npoints;
vector<double> v_freqs;
double zenang; // zenith angle = shift with declination, used for initial value of fitted angles
double theta_0, phi_0; // Theta, phi angles corresponding
};
//-----------------------------------------------------------------------
//-------------------------- TrackSet -----------------------------------
//----- Class containing a set of tracks
class TrackSet {
public:
TrackSet() { }
TrackSet(TrackSet const & a);
TrackSet(TrkInputDataSet & tkds);
size_t ReadData(TrkInputDataSet & tkds);
TrackSet & operator = (TrackSet const & a);
inline size_t NbTrk() const { return v_time_sat.size(); }
static inline size_t getNbAutoCor() { return 4; }
static inline size_t getNbCrossCor() { return 6; }
vector< vector<double> > v_time_sat;
vector< vector<double> > v_sat_elev;
vector< vector<double> > v_sat_azim;
vector< SLinInterp1D > v_interp_elev;
vector< SLinInterp1D > v_interp_sazim;
};
//-----------------------------------------------------------------------
//-------------------------- ACxSetFitter -------------------------------
//-- Class for fitting a poitings (AutoCorrelation) and phases
//-- on cross-correlations - 6 phases, each of the 6 cross-corr independtly
class ACxSetFitter {
public:
ACxSetFitter(AcxDataSet & data, TrackSet & tks);
int doACfit(string outfilename); // outfilename : fit results
int doCxfit(string outfilenamecx, string outcheckfilenamecx, bool useAac=true); // outfilename : fit results
int saveExpectedAC(string outcheckfilename); // outfilename PPF (or fits ?) file with the expected signals
inline void setD_dish(double D=5.) { D_dish=D; }
inline void setGaussianBeam(bool fg=true) { fggaussbeam_=fg; }
bool fggaussbeam_;
double D_dish;
AcxDataSet & acxd_;
TrackSet & tks_;
vector<int> v_RcFit_ac;
vector<double> v_xi2red_ac;
vector<double> v_Ddish;
vector<double> v_thetaant, v_phiant;
vector< vector<double> > v_A, v_B;
vector<double> v_err_Ddish;
vector<double> v_err_thetaant, v_err_phiant;
vector< vector<double> > v_err_A, v_err_B;
vector<double> v_phase;
vector< vector<double> > v_Acx;
vector<int> v_RcFit_cx;
vector<double> v_xi2red_cx;
vector<double> v_err_phase;
vector< vector<double> > v_err_Acx;
};
//-----------------------------------------------------------------------
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment