Commit ca932707 authored by perdereau's avatar perdereau
Browse files

adapt the python viewer to the case where no variances have been

computed
apply the rain in the right (?) way
parent 4700d960
......@@ -19,20 +19,15 @@ names = ['1H','2H','3H','4H','1V','2V','3V','4V','1Hx2H','1Hx3H','1Hx4H','2Hx3H'
'1Vx2V','1Vx3V','1Vx4V','2Vx3V','2Vx4V','3Vx4V','1Hx1V','1Hx2V','1Hx3V','1Hx4V','2Hx1V','2Hx2V','2Hx3V','2Hx4V',
'3Hx1V','3Hx2V','3Hx3V','3Hx4V','4Hx1V','4Hx2V','4Hx3V','4Hx4V']
def viewtfmap(folder,num,mvmin=0.,mvmax=0.,save=False, raplot=False,timeplot=False,mtitle="",clean=True,mod=False,arg=False,noplo=False,verb=False,yrcm=False,cor=[],creal=False,cimag=False):
def viewtfmap(folder,num,mvmin=0.,mvmax=0.,save=False, raplot=False,timeplot=False,mtitle="",clean=True,mod=False,arg=False,noplo=False,verb=False,yrcm=False,cor=[],cimag=False,creal=False,hasvar=True):
print len(cor)
filename = folder
i=2*num
if num>7 :
i= 16 + 4*(num-8)
#print i
#print num
if clean:
plt.close("all")
hdulist = fits.open(folder+'.fits')
if (verb) :
print hdulist[i].header
winwid = (18,8)
......@@ -40,8 +35,20 @@ def viewtfmap(folder,num,mvmin=0.,mvmax=0.,save=False, raplot=False,timeplot=F
ras=hdulist[len(hdulist)-2].data #41 in 43
freqs= hdulist[len(hdulist)-3].data
i=2*num
if num>7 :
i= 16 + 4*(num-8)
if (not hasvar) :
i=num
if num>7 :
i= 8 + 2*(num-8)
if len(hdulist) <8 :
i=num
i=num # devrait etre juste la pour les sorties des voies th et rfi
if (verb) :
print hdulist[i].header
bfreq = [ (np.abs(freqs-rf)).argmin() for rf in rfreq ]
......
......@@ -110,8 +110,10 @@ void P4gvCor::setGtCorrection(string const & param_filename, string const & filt
for (sa_size_t k =0 ; k<filt_vtimes.Size() ; k++){
x.push_back(filt_vtimes(k));
y.push_back(filt_values(k));
cout << " decoding template : t="<<filt_vtimes(k) << " val = "<< filt_values(k) << endl;
}
my_interp_.DefinePoints (x,y);
Gt_corr_param_defined_ = true;
}
......@@ -160,7 +162,9 @@ void P4gvCor::applyGain(TMatrix <complex <float> > & mtx, TimeStamp const & tms
//--- computing gains
double vbl = my_interp_(tmstp.ToDays());
for(size_t k=0; k<visi_norm_.size(); k++) {
for(size_t k=0; k<visi_gains.size(); k++) {
std::pair<sa_size_t , sa_size_t> pij = venc.getFeedPair(k);
sa_size_t i=pij.first;
sa_size_t j=pij.second;
......@@ -171,7 +175,8 @@ void P4gvCor::applyGain(TMatrix <complex <float> > & mtx, TimeStamp const & tms
gg=sqrt(ggi*ggj);
}
if (fgdonorm) gg *= visi_norm_[k];
visi_gains[k]=gg;
visi_gains[k]=1./gg;
}
//--- applying gains ...
......
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