Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DP3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
ResearchAndDevelopment
DP3
Commits
7bb7ba8a
Commit
7bb7ba8a
authored
7 years ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Task #11551: add write function
parent
e62de247
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
DPPP_SageCal/include/DPPP_SageCal/SageCal.h
+2
-0
2 additions, 0 deletions
DPPP_SageCal/include/DPPP_SageCal/SageCal.h
DPPP_SageCal/src/SageCal.cc
+30
-1
30 additions, 1 deletion
DPPP_SageCal/src/SageCal.cc
with
32 additions
and
1 deletion
DPPP_SageCal/include/DPPP_SageCal/SageCal.h
+
2
−
0
View file @
7bb7ba8a
...
...
@@ -80,6 +80,8 @@ namespace LOFAR {
void
loadData
(
const
DPBuffer
&
,
Data
::
IOData
&
,
double
*
);
void
writeData
(
DPBuffer
&
,
const
Data
::
IOData
&
);
//# Data members.
DPInput
*
_input
;
DPBuffer
_buffer
;
...
...
This diff is collapsed.
Click to expand it.
DPPP_SageCal/src/SageCal.cc
+
30
−
1
View file @
7bb7ba8a
...
...
@@ -67,7 +67,16 @@ namespace LOFAR {
}
SageCal
::~
SageCal
()
{}
{
delete
[]
_iodata
.
u
;
delete
[]
_iodata
.
v
;
delete
[]
_iodata
.
w
;
delete
[]
_iodata
.
x
;
delete
[]
_iodata
.
xo
;
delete
[]
_iodata
.
freqs
;
delete
[]
_iodata
.
flag
;
delete
[]
_iodata
.
NchanMS
;
}
DPStep
::
ShPtr
SageCal
::
makeStep
(
DPInput
*
input
,
const
ParameterSet
&
parset
,
...
...
@@ -89,6 +98,7 @@ namespace LOFAR {
_iodata
.
dec0
=
ref_dir
.
getValue
().
get
()[
1
];
_iodata
.
Nms
=
1
;
_iodata
.
Nchan
=
info
().
nchan
();
try
{
_iodata
.
u
=
new
double
[
_iodata
.
Nbase
*
_iodata
.
tilesz
];
_iodata
.
v
=
new
double
[
_iodata
.
Nbase
*
_iodata
.
tilesz
];
...
...
@@ -210,12 +220,29 @@ namespace LOFAR {
}
// For now, we just let sagecal believe all timeslots are good
countgood
++
;
row0
++
;
}
}
*
fratio
=
(
double
)
countbad
/
(
double
)(
countgood
+
countbad
);
}
void
SageCal
::
writeData
(
DPBuffer
&
buffer
,
const
Data
::
IOData
&
iodata
)
{
uint
row0
=
0
;
for
(
int
time
=
0
;
time
<
1
;
time
++
)
{
// Todo: handle tilesz
for
(
int
bl
=
0
;
bl
<
iodata
.
Nbase
;
++
bl
)
{
uint
ant1
=
info
().
getAnt1
()[
bl
];
uint
ant2
=
info
().
getAnt2
()[
bl
];
if
(
ant1
==
ant2
)
{
continue
;
}
std
::
complex
<
float
>
*
data
=
&
(
buffer
.
getData
().
data
()[
time
*
info
().
nbaselines
()
*
4
*
info
().
nchan
()
+
bl
*
4
*
info
().
nchan
()]);
}
}
}
bool
SageCal
::
process
(
const
DPBuffer
&
bufin
)
{
_timer
.
start
();
...
...
@@ -233,6 +260,8 @@ namespace LOFAR {
_iodata
.
deltaf
,
_iodata
.
deltat
,
_iodata
.
dec0
,
Data
::
Nt
,
Data
::
DoSim
);
//writeData(_buffer, _iodata);
_timer
.
stop
();
getNextStep
()
->
process
(
_buffer
);
return
false
;
...
...
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