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
Open sidebar
BAORadio
AnaPAON4
Commits
c02aecf4
Commit
c02aecf4
authored
Jul 25, 2018
by
perdereau
Browse files
correct logic problem in rdthermrfi : last bin was never filled.
parent
55db3f03
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
rdthermrfi.cc
rdthermrfi.cc
+12
-12
visiavg.cc
visiavg.cc
+2
-1
No files found.
rdthermrfi.cc
View file @
c02aecf4
...
@@ -110,7 +110,8 @@ int main(int narg, const char* arg[])
...
@@ -110,7 +110,8 @@ int main(int narg, const char* arg[])
if
(
!
fgok
)
break
;
if
(
!
fgok
)
break
;
TMatrix
<
complex
<
r_4
>
>
vismtx
=
wreader
.
getAverageVisMtx
(
cfdate
);
TMatrix
<
complex
<
r_4
>
>
vismtx
=
wreader
.
getAverageVisMtx
(
cfdate
);
if
(
cnt
==
0
)
{
//resizing matrices for sum of auto-correlations and sum of 6 cross-correlations
if
(
cnt
==
0
)
{
//resizing matrices for sum of auto-correlations and sum of cross-correlations
visum
=
vismtx
;
meanvismtx
=
vismtx
;
visum
=
vismtx
;
meanvismtx
=
vismtx
;
tfmSX
=
wreader
.
getTotalNbWindows
()
/
deltaIavg
;
tfmSX
=
wreader
.
getTotalNbWindows
()
/
deltaIavg
;
tfmSY
=
vismtx
.
NCols
()
/
TFMfbin
;
tfmSY
=
vismtx
.
NCols
()
/
TFMfbin
;
...
@@ -120,13 +121,15 @@ int main(int narg, const char* arg[])
...
@@ -120,13 +121,15 @@ int main(int narg, const char* arg[])
dateobs
=
cfdate
;
dateobs
=
cfdate
;
// recupere le jour de depart @ 0h
// recupere le jour de depart @ 0h
datestart
=
TimeStamp
(
cfdate
.
DaysPart
(),
0.
);
datestart
=
TimeStamp
(
cfdate
.
DaysPart
(),
0.
);
cnt
++
;
// y avait cnt++ & continue ?
continue
;
}
// end of resizing
else
{
visum
+=
vismtx
;
meanvismtx
+=
vismtx
;
}
}
if
(
I
==
0
)
dateobs
=
cfdate
;
// start filling a new time bin
if
(
I
==
0
)
dateobs
=
cfdate
;
// start filling a new time bin
// Accumulating
// Accumulating
visum
+=
vismtx
;
meanvismtx
+=
vismtx
;
I
++
;
// incrementing DeltaTime counter
I
++
;
// incrementing DeltaTime counter
// we check that our time index did not go beyond the allocated array size (might not be necessary)
// we check that our time index did not go beyond the allocated array size (might not be necessary)
...
@@ -150,7 +153,7 @@ int main(int narg, const char* arg[])
...
@@ -150,7 +153,7 @@ int main(int narg, const char* arg[])
TFMtmidx
++
;
TFMtmidx
++
;
// ... done
// ... done
I
=
0
;
cntnt
++
;
I
=
0
;
cntnt
++
;
visum
=
complex
<
r_4
>
(
0.
,
0.
);
visum
=
complex
<
r_4
>
(
0.
,
0.
);
// RAZ
}
}
cnt
++
;
cnt
++
;
if
((
cnt
>
0
)
&&
(
cntnt
%
10
==
0
)
&&
(
cntnt
>
pcntnt
))
{
if
((
cnt
>
0
)
&&
(
cntnt
%
10
==
0
)
&&
(
cntnt
>
pcntnt
))
{
...
@@ -158,7 +161,7 @@ int main(int narg, const char* arg[])
...
@@ -158,7 +161,7 @@ int main(int narg, const char* arg[])
<<
" /Max="
<<
wreader
.
getTotalNbWindows
()
<<
" DateObs="
<<
dateobs
<<
endl
;
<<
" /Max="
<<
wreader
.
getTotalNbWindows
()
<<
" DateObs="
<<
dateobs
<<
endl
;
pcntnt
=
cntnt
;
pcntnt
=
cntnt
;
}
}
}
// End of re
d
aing visibility matrices loop
}
// End of rea
d
ing visibility matrices loop
cout
<<
"rdthermrfi/Info: count="
<<
cnt
*
wreader
.
getWindowSize
()
<<
" Visibility Matrices read "
<<
endl
;
cout
<<
"rdthermrfi/Info: count="
<<
cnt
*
wreader
.
getWindowSize
()
<<
" Visibility Matrices read "
<<
endl
;
if
(
cnt
>
0
)
{
if
(
cnt
>
0
)
{
...
@@ -207,14 +210,11 @@ int main(int narg, const char* arg[])
...
@@ -207,14 +210,11 @@ int main(int narg, const char* arg[])
cout
<<
" number of objs in fits "
<<
ext_names
.
size
()
<<
endl
;
cout
<<
" number of objs in fits "
<<
ext_names
.
size
()
<<
endl
;
cout
<<
ext_names
<<
endl
;
cout
<<
ext_names
<<
endl
;
delete
(
fos
);
delete
(
fos
);
}
}
}
}
// end if cnt>0
// resu.Update();
// resu.Update();
cout
<<
resu
;
// Update est fait lors du print
cout
<<
resu
;
// Update est fait lors du print
}
}
//end try
catch
(
PException
&
exc
)
{
catch
(
PException
&
exc
)
{
cerr
<<
" rdthermrfi.cc catched PException "
<<
exc
.
Msg
()
<<
endl
;
cerr
<<
" rdthermrfi.cc catched PException "
<<
exc
.
Msg
()
<<
endl
;
rc
=
77
;
rc
=
77
;
...
...
visiavg.cc
View file @
c02aecf4
...
@@ -267,7 +267,8 @@ int main(int narg, const char* arg[])
...
@@ -267,7 +267,8 @@ int main(int narg, const char* arg[])
// recupere le jour de depart @ 0h
// recupere le jour de depart @ 0h
datestart
=
TimeStamp
(
cfdate
.
DaysPart
(),
0.
);
datestart
=
TimeStamp
(
cfdate
.
DaysPart
(),
0.
);
}
}
// end if cnt==0
if
(
I
==
0
)
{
// start filling a new time bin
if
(
I
==
0
)
{
// start filling a new time bin
dateobs
=
cfdate
;
dateobs
=
cfdate
;
if
(
prtlev
>
0
)
if
(
prtlev
>
0
)
...
...
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