Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apipeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Kutkin
apipeline
Commits
7060adbf
Commit
7060adbf
authored
Aug 17, 2021
by
Alexander Kutkin
Browse files
Options
Downloads
Patches
Plain Diff
adjust config
parent
2f0905f9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+2
-2
2 additions, 2 deletions
Dockerfile
imcal.py
+9
-8
9 additions, 8 deletions
imcal.py
imcal.yml
+24
-19
24 additions, 19 deletions
imcal.yml
with
35 additions
and
29 deletions
Dockerfile
+
2
−
2
View file @
7060adbf
...
...
@@ -149,7 +149,7 @@ ADD imcal.yml /opt/imcal.yml
RUN
ln
-s
/opt/imcal.py /usr/local/bin/imcal.py
# Clean
RUN
rm
-rf
/software/
*
#
RUN rm -rf /software/*
...
...
This diff is collapsed.
Click to expand it.
imcal.py
+
9
−
8
View file @
7060adbf
...
...
@@ -199,9 +199,9 @@ def dical(msin, srcdb, msout=None, h5out=None, solint=1, startchan=0, split_ncha
check_return_code
(
return_code
)
return
msout
# TODO add minvisratio to te config
def
ddecal
(
msin
,
srcdb
,
msout
=
None
,
h5out
=
None
,
solint
=
120
,
nfreq
=
30
,
startchan
=
0
,
nchan
=
0
,
mode
=
'
diagonal
'
,
uvlambdamin
=
500
,
subtract
=
True
):
startchan
=
0
,
nchan
=
0
,
minvisratio
=
0.6
,
mode
=
'
diagonal
'
,
uvlambdamin
=
500
,
subtract
=
True
):
"""
Perform direction dependent calibration with DPPP
"""
h5out
=
h5out
or
os
.
path
.
split
(
msin
)[
0
]
+
'
/ddcal.h5
'
msbase
=
os
.
path
.
basename
(
msin
).
split
(
'
.
'
)[
0
]
...
...
@@ -218,12 +218,13 @@ def ddecal(msin, srcdb, msout=None, h5out=None, solint=120, nfreq=30,
cal.subtract={subtract}
\
cal.propagatesolutions=true
\
cal.propagateconvergedonly=true
\
cal.minvisratio={minvisratio}
\
cal.nchan={nfreq}
\
cal.uvlambdamin={uvlambdamin}
\
steps=[cal]
\
'
.
format
(
msin
=
msin
,
msout
=
msout
,
startchan
=
startchan
,
nchan
=
nchan
,
mode
=
mode
,
srcdb
=
srcdb
,
solint
=
solint
,
h5out
=
h5out
,
subtract
=
subtract
,
nfreq
=
nfreq
,
uvlambdamin
=
uvlambdamin
)
minvisratio
=
minvisratio
,
uvlambdamin
=
uvlambdamin
)
cmd
=
"
"
.
join
(
cmd
.
split
())
logging
.
debug
(
"
Running command: %s
"
,
cmd
)
subprocess
.
call
(
cmd
,
shell
=
True
)
...
...
@@ -358,12 +359,12 @@ def main(msin, outbase=None, cfgfile='imcal.yml'):
logging
.
info
(
'
The final image exists. Exiting...
'
)
return
0
# TODO check if splitting is needed
if
not
os
.
path
.
exists
(
ms_split
):
ms_split
=
split_ms
(
msin
,
msout_path
=
ms_split
,
**
cfg
[
'
split1
'
])
# Clean + DIcal
if
not
os
.
path
.
exists
(
img0
+
'
-image.fits
'
)
and
(
not
os
.
path
.
exists
(
img0
+
'
-MFS-image.fits
'
)):
img_max
=
get_image_max
(
ms_split
)
threshold
=
img_max
/
cfg
[
'
clean0
'
][
'
max_over_thresh
'
]
...
...
@@ -380,7 +381,7 @@ def main(msin, outbase=None, cfgfile='imcal.yml'):
# dical1
if
not
os
.
path
.
exists
(
dical1
):
dical1
=
dical
(
ms_split
,
model1
,
msout
=
dical1
,
h5out
=
h5_1
,
**
cfg
[
'
dical1
'
])
view_sols
(
h5_1
,
outname
=
'
dical1
'
)
view_sols
(
h5_1
,
outname
=
msbase
+
'
_sols_
dical1
'
)
# clean2
if
(
not
os
.
path
.
exists
(
img2
+
'
-image.fits
'
))
and
(
not
os
.
path
.
exists
(
img2
+
'
-MFS-image.fits
'
)):
wsclean
(
dical1
,
fitsmask
=
mask0
,
outname
=
img2
,
**
cfg
[
'
clean2
'
])
...
...
@@ -392,7 +393,7 @@ def main(msin, outbase=None, cfgfile='imcal.yml'):
# dical2
if
not
os
.
path
.
exists
(
dical2
):
dical2
=
dical
(
dical1
,
model2
,
msout
=
dical2
,
h5out
=
h5_2
,
**
cfg
[
'
dical2
'
])
view_sols
(
h5_2
,
outname
=
'
dical2
'
)
view_sols
(
h5_2
,
outname
=
msbase
+
'
_sols_
dical2
'
)
# clean3
if
(
not
os
.
path
.
exists
(
img3
+
'
-image.fits
'
))
and
(
not
os
.
path
.
exists
(
img3
+
'
-MFS-image.fits
'
)):
wsclean
(
dical2
,
fitsmask
=
mask1
,
outname
=
img3
,
**
cfg
[
'
clean3
'
])
...
...
@@ -404,7 +405,7 @@ def main(msin, outbase=None, cfgfile='imcal.yml'):
# dical3
if
not
os
.
path
.
exists
(
dical3
):
dical3
=
dical
(
dical2
,
model3
,
msout
=
dical3
,
h5out
=
h5_3
,
**
cfg
[
'
dical3
'
])
view_sols
(
h5_3
,
outname
=
'
dical3
'
)
view_sols
(
h5_3
,
outname
=
msbase
+
'
_sols_
dical3
'
)
# clean4
if
(
not
os
.
path
.
exists
(
img_final
+
'
-image.fits
'
))
and
(
not
os
.
path
.
exists
(
img_final
+
'
-MFS-image.fits
'
)):
...
...
@@ -423,7 +424,7 @@ def main(msin, outbase=None, cfgfile='imcal.yml'):
ddsub
,
h5out
=
ddecal
(
dical3
,
clustered_sdb
,
msout
=
ddsub
,
h5out
=
h5_dd
,
**
cfg
[
'
ddcal
'
])
# view the solutions and save figure
view_sols
(
h5_dd
)
view_sols
(
h5_dd
,
outname
=
msbase
+
'
_sols_ddcal
'
)
if
(
not
os
.
path
.
exists
(
img_ddsub
+
'
-image.fits
'
)):
wsclean
(
ddsub
,
outname
=
img_ddsub
,
**
cfg
[
'
clean4
'
])
...
...
This diff is collapsed.
Click to expand it.
imcal.yml
+
24
−
19
View file @
7060adbf
...
...
@@ -11,11 +11,14 @@
####################### IMAGING #######################
split1
:
startchan
:
4
0
# start channel to split from
startchan
:
0
# start channel to split from
nchan
:
0
# 0 means till the end
# TODO: skip
clean0
:
# initial clean
max_over_thresh
:
250
# the threshold for initial CLEAN is set to image_max/max_over_thresh
# TODO add fixed threshold of 100 uJy
clean1
:
# wsclean setup
imagesize
:
3072
...
...
@@ -32,12 +35,13 @@ dical1: # DPPP setup for direction independent calibration
solint
:
20
mode
:
'
phaseonly'
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
cal_nchan
:
30
# number of chans with the same solutions
cal_nchan
:
72
# number of chans with the same solutions
clean2
:
imagesize
:
3072
pixelsize
:
3
multifreq
:
8
mgain
:
0
multifreq
:
6
automask
:
10
autothresh
:
5
multiscale
:
True
...
...
@@ -48,12 +52,12 @@ dical2:
solint
:
1
mode
:
'
phaseonly'
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
cal_nchan
:
30
# number of chans with the same solutions
cal_nchan
:
72
# number of chans with the same solutions
clean3
:
imagesize
:
3072
pixelsize
:
3
multifreq
:
8
multifreq
:
6
automask
:
7
autothresh
:
3.5
multiscale
:
True
...
...
@@ -61,20 +65,20 @@ clean3:
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3'
dical3
:
solint
:
80
0
solint
:
24
0
mode
:
'
diagonal'
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
cal_nchan
:
30
# number of chans with the same solutions.
cal_nchan
:
72
# number of chans with the same solutions.
clean4
:
imagesize
:
3072
pixelsize
:
3
multifreq
:
8
automask
:
4.5
autothresh
:
0.5
multifreq
:
6
automask
:
5.0
autothresh
:
1.0
multiscale
:
True
clip_model_level
:
null
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3
-weight
briggs
0.0
'
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3
-weight
briggs
-1.5
'
####################### CLUSTERING #######################
cluster
:
...
...
@@ -89,10 +93,11 @@ cluster:
######################## DD CALIBRATION #######################
ddcal
:
# see DPPP/DDECal documentation
solint
:
12
0
# Solution interval in timesteps (1 corresponds to 30 seconds for Apertif).
solint
:
6
0
# Solution interval in timesteps (1 corresponds to 30 seconds for Apertif).
mode
:
'
diagonal'
# Type of constraint to apply.
nfreq
:
30
# Number of channels in each channel block, for which the solution is assumed to be constant.
nfreq
:
72
# Number of channels in each channel block, for which the solution is assumed to be constant.
startchan
:
0
minvisratio
:
0.6
nchan
:
0
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
...
...
@@ -100,12 +105,12 @@ clean5:
imagesize
:
3072
pixelsize
:
3
multifreq
:
8
automask
:
4.5
autothresh
:
0.5
automask
:
5.0
autothresh
:
1.0
multiscale
:
True
fitsmask
:
'
mask2.fits'
clip_model_level
:
null
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3
-weight
briggs
0.0
'
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3
-weight
briggs
-1.5
'
### END
...
...
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