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
a3b37e2f
Commit
a3b37e2f
authored
3 years ago
by
AK
Browse files
Options
Downloads
Patches
Plain Diff
some changes
parent
36a08c7e
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
imcal.py
+17
-12
17 additions, 12 deletions
imcal.py
imcal.yml
+8
-11
8 additions, 11 deletions
imcal.yml
with
25 additions
and
23 deletions
imcal.py
+
17
−
12
View file @
a3b37e2f
...
@@ -28,11 +28,11 @@ import astropy.units as u
...
@@ -28,11 +28,11 @@ import astropy.units as u
from
astropy.io
import
fits
from
astropy.io
import
fits
# the executables:
# the executables:
dppp_bin
=
distutils
.
spawn
.
find_executable
(
'
DPPP
'
)
or
'
/home/offringa/Software/DP3/build/DP3
'
dppp_bin
=
distutils
.
spawn
.
find_executable
(
'
DPPP
'
)
wsclean_bin
=
distutils
.
spawn
.
find_executable
(
'
wsclean
'
)
or
'
/home/offringa/Software/wsclean/build/wsclean
'
wsclean_bin
=
distutils
.
spawn
.
find_executable
(
'
wsclean
'
)
makesourcedb_bin
=
distutils
.
spawn
.
find_executable
(
'
makesourcedb
'
)
or
'
/home/offringa/Software/DP3/build/makesourcedb
'
makesourcedb_bin
=
distutils
.
spawn
.
find_executable
(
'
makesourcedb
'
)
bbs2model_bin
=
distutils
.
spawn
.
find_executable
(
'
bbs2model
'
)
or
'
/home/offringa/Software/lofartools/build/bbs2model
'
bbs2model_bin
=
distutils
.
spawn
.
find_executable
(
'
bbs2model
'
)
render_bin
=
distutils
.
spawn
.
find_executable
(
'
render
'
)
or
'
/home/offringa/Software/lofartools/build/render
'
render_bin
=
distutils
.
spawn
.
find_executable
(
'
render
'
)
# Tom's masking code
# Tom's masking code
makeMaskFits
=
'
/home/kutkin/rapthor/makeMaskFits
'
makeMaskFits
=
'
/home/kutkin/rapthor/makeMaskFits
'
...
@@ -53,10 +53,10 @@ def modify_filename(fname, string, ext=None):
...
@@ -53,10 +53,10 @@ def modify_filename(fname, string, ext=None):
return
fbase
+
string
+
fext
return
fbase
+
string
+
fext
def
wsclean
(
msin
,
outname
=
None
,
pixelsize
=
3
,
mgain
=
0.8
,
imagesize
=
3072
,
multifreq
=
8
,
autothresh
=
0.3
,
def
wsclean
(
msin
,
outname
=
None
,
pixelsize
=
3
,
imagesize
=
3072
,
mgain
=
0.8
,
multifreq
=
0
,
autothresh
=
0.3
,
automask
=
3
,
niter
=
1000000
,
multiscale
=
False
,
save_source_list
=
Tru
e
,
automask
=
3
,
niter
=
1000000
,
multiscale
=
False
,
save_source_list
=
Fals
e
,
usefitsmask
=
False
,
fitsmaskname
=
'
mask.fits
'
,
clearfiles
=
True
,
kwstring
=
''
):
fitsmask
=
None
,
kwstring
=
''
):
"""
"""
wsclean
wsclean
"""
"""
...
@@ -69,14 +69,14 @@ def wsclean(msin, outname=None, pixelsize=3, mgain=0.8, imagesize=3072, multifre
...
@@ -69,14 +69,14 @@ def wsclean(msin, outname=None, pixelsize=3, mgain=0.8, imagesize=3072, multifre
kwstring
+=
f
'
-auto-threshold
{
autothresh
}
'
kwstring
+=
f
'
-auto-threshold
{
autothresh
}
'
if
automask
is
not
None
:
if
automask
is
not
None
:
kwstring
+=
f
'
-auto-mask
{
automask
}
'
kwstring
+=
f
'
-auto-mask
{
automask
}
'
if
mgain
is
not
None
:
if
mgain
:
kwstring
+=
f
'
-mgain
{
mgain
}
'
kwstring
+=
f
'
-mgain
{
mgain
}
'
if
save_source_list
:
if
save_source_list
:
kwstring
+=
'
-save-source-list
'
kwstring
+=
'
-save-source-list
'
if
multifreq
:
if
multifreq
:
kwstring
+=
f
'
-join-channels -channels-out
{
multifreq
}
-fit-spectral-pol 2
'
kwstring
+=
f
'
-join-channels -channels-out
{
multifreq
}
-fit-spectral-pol 2
'
if
use
fitsmask
:
if
fitsmask
:
kwstring
+=
f
'
-fits-mask
{
fitsmask
name
}
'
kwstring
+=
f
'
-fits-mask
{
fitsmask
}
'
cmd
=
f
'
{
wsclean_bin
}
-name
{
outname
}
-size
{
imagesize
}
{
imagesize
}
-scale
{
pixelsize
}
asec -niter
{
niter
}
\
cmd
=
f
'
{
wsclean_bin
}
-name
{
outname
}
-size
{
imagesize
}
{
imagesize
}
-scale
{
pixelsize
}
asec -niter
{
niter
}
\
{
kwstring
}
{
msin
}
'
{
kwstring
}
{
msin
}
'
...
@@ -87,6 +87,11 @@ def wsclean(msin, outname=None, pixelsize=3, mgain=0.8, imagesize=3072, multifre
...
@@ -87,6 +87,11 @@ def wsclean(msin, outname=None, pixelsize=3, mgain=0.8, imagesize=3072, multifre
for
fname
in
glob
.
glob
(
outname
+
'
*.fits
'
):
for
fname
in
glob
.
glob
(
outname
+
'
*.fits
'
):
newname
=
fname
.
replace
(
'
MFS-
'
,
''
)
newname
=
fname
.
replace
(
'
MFS-
'
,
''
)
os
.
rename
(
fname
,
newname
)
os
.
rename
(
fname
,
newname
)
if
clearfiles
:
todelete
=
glob
.
glob
(
f
'
{
outname
}
-000[0-9]-*.fits
'
)
# multifreq images
for
f
in
todelete
:
os
.
remove
(
f
)
return
0
return
0
...
...
This diff is collapsed.
Click to expand it.
imcal.yml
+
8
−
11
View file @
a3b37e2f
#:===========================================================================
#:===========================================================================
# Settings for imcal
# Settings for imcal
#:===========================================================================
#:===========================================================================
#######################
DICAL
IMAGING #######################
####################### IMAGING #######################
#global:
#global:
# dppp_bin: 'DPPP' # on blizzard
# dppp_bin: 'DPPP' # on blizzard
...
@@ -22,10 +22,10 @@ clean1: # wsclean setup
...
@@ -22,10 +22,10 @@ clean1: # wsclean setup
imagesize
:
3072
imagesize
:
3072
pixelsize
:
3
pixelsize
:
3
multifreq
:
0
multifreq
:
0
mgain
:
0
automask
:
20
automask
:
20
autothresh
:
5
autothresh
:
5
usefitsmask
:
True
fitsmask
:
'
mask0.fits'
fitsmaskname
:
'
mask0.fits'
multiscale
:
False
multiscale
:
False
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400'
# use this for additional wsclean options, e.g. '-weight uniform -use-idg'
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400'
# use this for additional wsclean options, e.g. '-weight uniform -use-idg'
...
@@ -41,8 +41,7 @@ clean2:
...
@@ -41,8 +41,7 @@ clean2:
multifreq
:
8
multifreq
:
8
automask
:
10
automask
:
10
autothresh
:
5
autothresh
:
5
usefitsmask
:
True
fitsmask
:
'
mask0.fits'
fitsmaskname
:
'
mask0.fits'
multiscale
:
True
multiscale
:
True
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3'
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3'
...
@@ -58,8 +57,7 @@ clean3:
...
@@ -58,8 +57,7 @@ clean3:
multifreq
:
8
multifreq
:
8
automask
:
7
automask
:
7
autothresh
:
3.5
autothresh
:
3.5
usefitsmask
:
True
fitsmask
:
'
mask1.fits'
fitsmaskname
:
'
mask1.fits'
multiscale
:
True
multiscale
:
True
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3'
kwstring
:
'
-use-wgridder
-parallel-deconvolution
1400
-parallel-gridding
8
-deconvolution-channels
3'
...
@@ -67,7 +65,7 @@ dical3:
...
@@ -67,7 +65,7 @@ dical3:
solint
:
800
solint
:
800
mode
:
'
diagonal'
mode
:
'
diagonal'
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
uvlambdamin
:
500
# Ignore baselines / channels with UV < uvlambdamin wavelengths.
cal_nchan
:
3
1
# number of chans with the same solutions
cal_nchan
:
3
0
# number of chans with the same solutions
clean4
:
clean4
:
imagesize
:
3072
imagesize
:
3072
...
@@ -76,9 +74,8 @@ clean4:
...
@@ -76,9 +74,8 @@ clean4:
automask
:
4.5
automask
:
4.5
autothresh
:
0.5
autothresh
:
0.5
multiscale
:
True
multiscale
:
True
usefitsmask
:
True
fitsmask
:
'
mask2.fits'
fitsmaskname
:
'
mask2.fits'
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.0'
### END
### 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