Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
BAORadio
AnaPAON4
Commits
5305e393
Commit
5305e393
authored
Jul 27, 2018
by
Jean-Eric Campagne
Browse files
Merge branch 'master' of gitlab.in2p3.fr:baoradio/AnaPAON4
parents
a253bee2
ca932707
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
Python/viewtfmap.py
Python/viewtfmap.py
+14
-7
p4gvcor.cc
p4gvcor.cc
+11
-6
No files found.
Python/viewtfmap.py
View file @
5305e393
...
...
@@ -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
=
[],
c
real
=
False
,
c
imag
=
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
=
[],
c
imag
=
False
,
c
real
=
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
]
...
...
p4gvcor.cc
View file @
5305e393
...
...
@@ -72,11 +72,11 @@ void P4gvCor::InitNormalisation()
if there are more that 3 parameters on each line (row) , the 4th parameter is considered as the overall normalisation parameter
\param filt_blind_name : filetered blind channel signal PPF filename, signal as a function of time
*/
void
P4gvCor
::
setGtCorrection
(
string
const
&
param_filename
,
string
const
&
filt_blind_name
)
void
P4gvCor
::
setGtCorrection
(
string
const
&
param_filename
,
string
const
&
filt_blind_
file
name
)
{
TArray
<
double
>
arr
;
ifstream
pFile
(
par
ms
filename
_
.
c_str
());
ifstream
pFile
(
par
am_
filename
.
c_str
());
if
(
pFile
.
is_open
())
{
sa_size_t
nr
;
sa_size_t
nc
;
...
...
@@ -99,8 +99,8 @@ void P4gvCor::setGtCorrection(string const & param_filename, string const & filt
throw
IOExc
(
"P4gvCor::setGtCorrection() : NO DATA FILE "
);
}
cout
<<
"P4gvCor::setGtCorrection() - reading PPF fileterd blind channel signal from "
<<
filt_blind_filename
_
<<
endl
;
PInPersist
pinp
(
filt_blind_filename
_
);
cout
<<
"P4gvCor::setGtCorrection() - reading PPF fileterd blind channel signal from "
<<
filt_blind_filename
<<
endl
;
PInPersist
pinp
(
filt_blind_filename
);
pinp
>>
PPFNameTag
(
"TVFilt_Times"
)
>>
filt_vtimes
;
pinp
>>
PPFNameTag
(
"TVFilt_Values"
)
>>
filt_values
;
...
...
@@ -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 ...
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment