Commit 0444f010 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Ajout fichier exemple datacard et implementation application de correction de...

Ajout fichier exemple datacard et implementation application de correction de phase ds visiavg.cc , Reza 15/01/2018
parent f76ee08a
#############################################################################
# ------------ Soft BAORadio/PAON4 (2018) --------------
# Exemple de datacard pour les parametres du programme d'analyse PAON4
#############################################################################
#### Definition donnees visibilites a lire
@in5 /Raid/bao5/Paon4/CygA_M31_5oct17
@in6 /Raid/bao5/Paon4/CygA_M31_5oct17
inrange 0 300 1
@inall
## Selection intervalle de temps
inseltm date_timeTU duration_minutes
### Taille de fenetre pour VisiP4WindowReader
### @inwsz WindowSize
inwsz 10
### Frequency reordering (firmware FFT)
reorderfreq
#### Correction gains (g(nu) , G(t) ) et correction de phase
gnu GnuFileName
vgf GainVarParamFileName
bff BlindFiltTimeValPPFName
phcor PhaseCorrParamFileName
#### Fichiers de sortie
@outfile myout.ppf
@outfitsfile myout.fits
#### Time - frequency maps
## @tfm TFM_TimeBin TFM_FreqBin
@tfm 10 4
#### PrintLevel
# @prtlev PrintLevel PrintModulo
@prtlev 1 20
#### Definition de bandes de frequence, une carte par bande
## @freqband CentralFreqMHz BandWidthMHz
@freqband 1390. 1
@freqband 1420.4 0.25
......@@ -41,6 +41,7 @@
#include "visp4winreader.h"
#include "p4gnugain.h"
#include "p4gvcor.h"
#include "p4phcor.h"
#include "fitsioserver.h"
#include "fiosinit.h"
......@@ -119,11 +120,24 @@ int main(int narg, const char* arg[])
P4gnuGain * p4g = NULL ;
try {
p4g = new P4gnuGain(params.gain_gnu_file_);
} catch (PException& exc) {
}
catch (PException& exc) {
cerr << " visiavg.cc catched PException " << exc.Msg() << endl;
cerr << " on continue quand meme "<<endl ;
cerr << " .... Continuing execution ... " << endl;
p4g = NULL ;
}
P4PhaseCor * p4phc = NULL;
if (params.phase_corr_param_file_.length() > 0) {
try {
p4phc = new P4PhaseCor(params.phase_corr_param_file_);
}
catch (PException& exc) {
cerr << " visiavg.cc catched PException when reading Phase Correction parameter file: " << params.phase_corr_param_file_ << endl;
cerr << " Exception message: " << exc.Msg() << endl;
cerr << " .... Continuing execution ... " << endl;
p4phc = NULL;
}
}
try {
ResourceUsage resu;
......@@ -207,11 +221,14 @@ int main(int narg, const char* arg[])
// Apply gain g(nu)
if (p4g != NULL )
p4g->applyGain(vismtx);
// Apply time dependent (/ temperature) gain G(t)
if (p4gvf != NULL)
p4gvf->applyGain(vismtx,cfdate);
if (cnt==0) { //resizing matrices for sum of auto-correlations and sum of 6 cross-correlations
// Apply phase correction
if (p4phc != NULL)
p4phc->applyPhase(vismtx);
if (cnt==0) { //resizing matrices for sum of auto-correlations and sum of 6 cross-correlations
acsum.SetSize(8, vismtx.NCols());
acsum_sq.SetSize(8, vismtx.NCols());
cxsum.SetSize(6, vismtx.NCols());
......
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