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
c9e335da
Commit
c9e335da
authored
6 years ago
by
Thomas Jürges
Browse files
Options
Downloads
Patches
Plain Diff
SW-546
: Add comments describing how the offset is calculated
parent
50d31ceb
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
+26
-3
26 additions, 3 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
with
26 additions
and
3 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
+
26
−
3
View file @
c9e335da
...
@@ -316,14 +316,33 @@ namespace LOFAR
...
@@ -316,14 +316,33 @@ namespace LOFAR
* first received frame.
* first received frame.
*/
*/
uint64_t
offset
=
frame
.
header
.
time
-
itsDumpInfo
.
itsTime0
;
uint64_t
offset
=
frame
.
header
.
time
-
itsDumpInfo
.
itsTime0
;
// Convert the offset in [s] to bytes. sampleFreq is in MHz.
/**
* Convert the offset in [s] to samples containing a complex numbers of
* two 16 bit integers. sampleFreq is in MHz.
*/
offset
*=
(
frame
.
header
.
sampleFreq
*
1000000U
);
offset
*=
(
frame
.
header
.
sampleFreq
*
1000000U
);
/**
/**
* Divide the offset by the size of an FFT block. The result is an index
* Divide the offset, i.e. the number of samples by the size of an FFT
* for the current data frame.
* block. The result is the index of the raw voltage sampling window
* (size 1024 values) that got fed into the FFT. This not a sample within
* the window but just a rough indicator which window we are in!
* [ 1024 ][ 1024 ][ 1024 ]
* ^
* | Start recording
* ^
* | Window number of the 0th TBB data frame
* ^
* | Window number of frame N
* This is also then the index of the TBB frame for this frequency because
* the begin of a voltage window is also the begin of a frequency window.
*/
*/
offset
/=
SPECTRAL_TRANSFORM_SIZE
;
offset
/=
SPECTRAL_TRANSFORM_SIZE
;
/**
* Now try to figure out where in the raw voltage data window our spectral
* frame exactly begins.
*/
/**
/**
* NOTE:
* NOTE:
* untested body: when can I have enough test data from a working
* untested body: when can I have enough test data from a working
...
@@ -343,6 +362,10 @@ namespace LOFAR
...
@@ -343,6 +362,10 @@ namespace LOFAR
* second:
* second:
* 1 extra slice fitted in that second
* 1 extra slice fitted in that second
*/
*/
/**
* TODO
* Is this still needed? Sander/Thomas need to look into this.
*/
offset
+=
1
;
offset
+=
1
;
// avoid duplicate offset compensation next
// avoid duplicate offset compensation next
time0
+=
1
;
time0
+=
1
;
...
...
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