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
49c6e4d6
Commit
49c6e4d6
authored
6 years ago
by
Thomas Jürges
Browse files
Options
Downloads
Patches
Plain Diff
SW-546
: Lazy init of sub-band earlier
parent
a54771bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+79
-74
79 additions, 74 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
with
79 additions
and
74 deletions
RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc
+
79
−
74
View file @
49c6e4d6
...
...
@@ -362,6 +362,85 @@ namespace LOFAR
"this frame."
);
return
;
}
/**
* Lazily initialize last part of the book keeping map from the 1st
* frame that is received for a sub-band.
* subBandBookKeeping[bandNr].isInitialised is set to false when
* TBB_Dipole::init gets called and sets up the book keeping map.
*
* Also create a new TBB_SubbandDataset in the DipoleGroup
*/
else
if
(
currentSubBand
.
isInitialised
==
false
)
{
currentSubBand
.
time0
=
frame
.
header
.
time
;
currentSubBand
.
slice0
=
sliceNr
;
currentSubBand
.
dataSet
.
reset
(
new
dal
::
TBB_SubbandDataset
(
itsDipoleGroup
()
->
subband
(
bandNr
)));
// Store the data in the hdf5 file. Do not provide a file name!
currentSubBand
.
dataSet
->
create1D
(
currentSubBand
.
totalSizeInSamples
,
currentSubBand
.
totalSizeInSamples
,
""
,
currentSubBand
.
dataSet
->
LITTLE
);
currentSubBand
.
dataSet
->
groupType
().
value
=
"SubbandDataset"
;
currentSubBand
.
dataSet
->
time
().
value
=
currentSubBand
.
time0
;
currentSubBand
.
dataSet
->
bandNumber
().
value
=
bandNr
;
currentSubBand
.
dataSet
->
sliceNumber
().
value
=
sliceNr
;
currentSubBand
.
dataSet
->
samplesPerFrame
().
value
=
-
1
;
currentSubBand
.
dataSet
->
centralFrequency
().
value
=
currentSubBand
.
centralFrequency
;
currentSubBand
.
dataSet
->
centralFrequencyUnit
().
value
=
"Hz"
;
currentSubBand
.
dataSet
->
timeResolution
().
value
=
SPECTRAL_TRANSFORM_SIZE
/
(
frame
.
header
.
sampleFreq
*
1000000.0
);
currentSubBand
.
dataSet
->
timeResolutionUnit
().
value
=
"s"
;
// Filled in when the sub-band is complete:
currentSubBand
.
dataSet
->
dataLength
().
value
=
0
;
/**
* ATTENTION!
* Storing this value makes no sense. Only if all frames of a
* sub-band contain the same number of samples then this value
* is representing something real.
* But obviously this is only true if all n frames of a
* sub-band, 0 < n < infinity, contain exactly the same number
* of samples.
*
* A simple example that is pretty general where this does not
* hold:
* - Every sub-band that has a last frame with less than 480
* samples would have two values: 480 and the number of
* samples in the last frame.
*/
currentSubBand
.
dataSet
->
samplesPerFrame
().
value
=
frame
.
header
.
nOfSamplesPerFrame
;
// TODO
currentSubBand
.
dataSet
->
bandwidth
().
value
=
0
;
currentSubBand
.
dataSet
->
bandwidthUnit
().
value
=
"not filled in"
;
currentSubBand
.
isInitialised
=
true
;
LOG_INFO_STR
(
"TBB: Band #"
<<
currentSubBand
.
bandNr
<<
" initialised with the following data: time0 = "
<<
currentSubBand
.
time0
<<
", slice0 = "
<<
currentSubBand
.
slice0
<<
", HDF5 SubbandDataset name = "
<<
currentSubBand
.
dataSet
->
name
()
<<
" , dipole = "
<<
itsDipoleGroup
()
->
name
()
<<
", station id = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
stationID
)
<<
", rsp = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
rspID
)
<<
", rcu = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
rcuID
));
}
}
else
{
...
...
@@ -371,80 +450,6 @@ namespace LOFAR
return
;
}
/**
* Lazily initialize last part of the book keeping map from the 1st
* frame that is received for a sub-band.
* subBandBookKeeping[bandNr].isInitialised is set to false when
* TBB_Dipole::init gets called and sets up the book keeping map.
*
* Also create a new TBB_SubbandDataset in the DipoleGroup
*/
const
uint32_t
sliceNr
{
getSpectralModeSliceNr
(
frame
.
header
)};
if
(
currentSubBand
.
isInitialised
==
false
)
{
currentSubBand
.
time0
=
frame
.
header
.
time
;
currentSubBand
.
slice0
=
sliceNr
;
currentSubBand
.
dataSet
.
reset
(
new
dal
::
TBB_SubbandDataset
(
itsDipoleGroup
()
->
subband
(
bandNr
)));
// Store the data in the hdf5 file. Do not provide a file name!
currentSubBand
.
dataSet
->
create1D
(
currentSubBand
.
totalSizeInSamples
,
currentSubBand
.
totalSizeInSamples
,
""
,
currentSubBand
.
dataSet
->
LITTLE
);
currentSubBand
.
dataSet
->
groupType
().
value
=
"SubbandDataset"
;
currentSubBand
.
dataSet
->
time
().
value
=
currentSubBand
.
time0
;
currentSubBand
.
dataSet
->
bandNumber
().
value
=
bandNr
;
currentSubBand
.
dataSet
->
sliceNumber
().
value
=
sliceNr
;
currentSubBand
.
dataSet
->
samplesPerFrame
().
value
=
-
1
;
// Filled in when the sub-band is complete.
currentSubBand
.
dataSet
->
dataLength
().
value
=
0
;
/**
* ATTENTION!
* Storing this value makes no sense. Only if all frames of a
* sub-band contain the same number of samples then this value is
* representing something real.
* But obviously this is only true if all n frames of a sub-band,
* 0 < n < infinity, contain exactly the same number of samples.
*
* A simple example that is pretty general where this does not hold:
* - Every sub-band that has a last frame with less than 480
* samples would have two values: 480 and the number of samples
* in the last frame.
*/
currentSubBand
.
dataSet
->
samplesPerFrame
().
value
=
frame
.
header
.
nOfSamplesPerFrame
;
// TODO
currentSubBand
.
dataSet
->
centralFrequency
().
value
=
0
;
currentSubBand
.
dataSet
->
centralFrequencyUnit
().
value
=
"not filled in"
;
currentSubBand
.
dataSet
->
bandwidth
().
value
=
0
;
currentSubBand
.
dataSet
->
bandwidthUnit
().
value
=
"not filled in"
;
currentSubBand
.
dataSet
->
timeResolution
().
value
=
1
;
currentSubBand
.
dataSet
->
timeResolutionUnit
().
value
=
"not filled in"
;
currentSubBand
.
isInitialised
=
true
;
LOG_INFO_STR
(
"TBB: Band #"
<<
currentSubBand
.
bandNr
<<
" initialised with the following data: time0 = "
<<
currentSubBand
.
time0
<<
", slice0 = "
<<
currentSubBand
.
slice0
<<
", HDF5 SubbandDataset name = "
<<
currentSubBand
.
dataSet
->
name
()
<<
" , dipole = "
<<
itsDipoleGroup
()
->
name
()
<<
", station id = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
stationID
)
<<
", rsp = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
rspID
)
<<
", rcu = "
<<
static_cast
<
uint32_t
>
(
frame
.
header
.
rcuID
));
}
/**
* Out-of-order frame arrival has not been seen for Dutch stations.
* TBB from int'l stations is not (yet) dumped to CEP.
...
...
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