Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
b23cd3c4
Commit
b23cd3c4
authored
Apr 27, 2010
by
Chris Broekema
Browse files
Options
Downloads
Patches
Plain Diff
Bug #1011: Add the used parset and some identifying information to the MS.
parent
4687e8fe
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
RTCP/Storage/include/Storage/MeasurementSetFormat.h
+1
-0
1 addition, 0 deletions
RTCP/Storage/include/Storage/MeasurementSetFormat.h
RTCP/Storage/src/MeasurementSetFormat.cc
+34
-1
34 additions, 1 deletion
RTCP/Storage/src/MeasurementSetFormat.cc
with
35 additions
and
1 deletion
RTCP/Storage/include/Storage/MeasurementSetFormat.h
+
1
−
0
View file @
b23cd3c4
...
@@ -71,6 +71,7 @@ class MeasurementSetFormat : public Format
...
@@ -71,6 +71,7 @@ class MeasurementSetFormat : public Format
void
fillDataDesc
();
void
fillDataDesc
();
void
fillSpecWindow
(
unsigned
subband
);
void
fillSpecWindow
(
unsigned
subband
);
void
fillObs
();
void
fillObs
();
void
fillHistory
();
};
};
}
//RTCP
}
//RTCP
...
...
This diff is collapsed.
Click to expand it.
RTCP/Storage/src/MeasurementSetFormat.cc
+
34
−
1
View file @
b23cd3c4
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include
<lofar_config.h>
#include
<lofar_config.h>
#include
<Storage/MeasurementSetFormat.h>
#include
<Storage/MeasurementSetFormat.h>
#include
<Storage/Package__Version.h>
#include
<AMCBase/Epoch.h>
#include
<AMCBase/Epoch.h>
...
@@ -52,7 +53,6 @@
...
@@ -52,7 +53,6 @@
#include
<boost/thread/mutex.hpp>
#include
<boost/thread/mutex.hpp>
using
namespace
casa
;
using
namespace
casa
;
namespace
LOFAR
{
namespace
LOFAR
{
...
@@ -150,6 +150,7 @@ void MeasurementSetFormat::createMSTables(unsigned subband)
...
@@ -150,6 +150,7 @@ void MeasurementSetFormat::createMSTables(unsigned subband)
fillDataDesc
();
fillDataDesc
();
fillSpecWindow
(
subband
);
fillSpecWindow
(
subband
);
fillObs
();
fillObs
();
fillHistory
();
}
catch
(
AipsError
x
)
{
}
catch
(
AipsError
x
)
{
THROW
(
StorageException
,
"AIPS/CASA error: "
<<
x
.
getMesg
());
THROW
(
StorageException
,
"AIPS/CASA error: "
<<
x
.
getMesg
());
...
@@ -357,6 +358,38 @@ void MeasurementSetFormat::fillSpecWindow(unsigned subband) {
...
@@ -357,6 +358,38 @@ void MeasurementSetFormat::fillSpecWindow(unsigned subband) {
msspw
.
flush
();
msspw
.
flush
();
}
}
void
MeasurementSetFormat
::
fillHistory
()
{
Table
histtab
(
itsMS
->
keywordSet
().
asTable
(
"HISTORY"
));
histtab
.
reopenRW
();
ScalarColumn
<
double
>
time
(
histtab
,
"TIME"
);
ScalarColumn
<
int
>
obsId
(
histtab
,
"OBSERVATION_ID"
);
ScalarColumn
<
String
>
message
(
histtab
,
"MESSAGE"
);
ScalarColumn
<
String
>
application
(
histtab
,
"APPLICATION"
);
ScalarColumn
<
String
>
priority
(
histtab
,
"PRIORITY"
);
ScalarColumn
<
String
>
origin
(
histtab
,
"ORIGIN"
);
ArrayColumn
<
String
>
parms
(
histtab
,
"APP_PARAMS"
);
ArrayColumn
<
String
>
cli
(
histtab
,
"CLI_COMMAND"
);
// Put all parset entries in a Vector<String>.
casa
::
Vector
<
String
>
appvec
;
casa
::
Vector
<
String
>
clivec
;
appvec
.
resize
(
itsPS
->
size
());
casa
::
Array
<
String
>::
contiter
viter
=
appvec
.
cbegin
();
for
(
ParameterSet
::
const_iterator
iter
=
itsPS
->
begin
();
iter
!=
itsPS
->
end
();
++
iter
,
++
viter
)
{
*
viter
=
iter
->
first
+
'='
+
iter
->
second
.
get
();
}
uint
rownr
=
histtab
.
nrow
();
histtab
.
addRow
();
time
.
put
(
rownr
,
Time
().
modifiedJulianDay
()
*
24.
*
3600.
);
obsId
.
put
(
rownr
,
0
);
message
.
put
(
rownr
,
"parameters"
);
application
.
put
(
rownr
,
"OLAP"
);
priority
.
put
(
rownr
,
"NORMAL"
);
origin
.
put
(
rownr
,
Version
::
getInfo
<
StorageVersion
>
(
"Storage"
,
"full"
));
parms
.
put
(
rownr
,
appvec
);
cli
.
put
(
rownr
,
clivec
);
}
void
MeasurementSetFormat
::
createMSMetaFile
(
unsigned
subband
)
void
MeasurementSetFormat
::
createMSMetaFile
(
unsigned
subband
)
{
{
Block
<
Int
>
ant1
(
itsPS
->
nrBaselines
());
Block
<
Int
>
ant1
(
itsPS
->
nrBaselines
());
...
...
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