Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
cbee2728
Commit
cbee2728
authored
6 years ago
by
Thomas Jürges
Browse files
Options
Downloads
Patches
Plain Diff
SW-546
: When necessary add one spectral sample to the offset in spectral mode
parent
88a26638
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
+44
-0
44 additions, 0 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
with
44 additions
and
0 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
+
44
−
0
View file @
cbee2728
...
...
@@ -469,6 +469,50 @@ namespace LOFAR
<<
sliceNr
<<
", "
<<
itsDumpInfo
.
itsSliceNr0
);
/**
* Now check for even/odd seconds. Why? Because
* sampling frequency / (N * 1024) does not result in an integer without
* rest. So one 1024 slice has to be moved to either ever odd or to
* every even second:
*
* slice #195312 slice #195313 slice #0
* | | |
* v v v
* 1024 ---------|--------- 1024 --------- |--------- 1024
* ^
* |
* A new odd second begins here.
*
* slice #195312 slice #0 slice #1
* | | |
* v v v
* 1024 ---------|--------- 1024 --------- |--------- 1024
* ^
* |
* A new even second begins here.
*
* What does this all mean?
* ------------------------
* If the time-stamp of the second of the first frame is even then
* the last frame had slice numbers up to #195313.
* The following slice numbers for the next second will only go up to
* #195312.
* - Check if the frame #0's second is even, then
* - check if the second of the current frame is odd.
* - Both yes: means that we have to add one sample to the offset.
*/
if
((
itsDumpInfo
.
itsTime0
%
2
==
0
)
&&
(
frame
.
header
.
time
%
2
==
1
))
{
offset
+=
1
;
LOG_INFO_STR
(
"TBB: Added one sample to the offset because t0 is "
"even and t_now is odd: itsDumpInfo.itsTime0 = "
<<
itsDumpInfo
.
itsTime0
<<
", frame.header.time = "
<<
frame
.
header
.
time
<<
", offset = "
<<
offset
);
}
/**
* Flag lost frame(s) (assumes no out-of-order).
* Assumes all frames (except maybe the last) have the same nr of samples (fine).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment