Skip to content
GitLab
Explore
Sign in
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Kutkin
apipeline
Commits
8c2c51ba
Commit
8c2c51ba
authored
2 years ago
by
Alexander Kutkin
Browse files
Options
Downloads
Patches
Plain Diff
removed last CLEAN, as it produces artifacts
parent
fc7087b4
No related branches found
No related tags found
No related merge requests found
Pipeline
#33691
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
imcal.py
+16
-16
16 additions, 16 deletions
imcal.py
with
16 additions
and
16 deletions
imcal.py
+
16
−
16
View file @
8c2c51ba
...
...
@@ -131,9 +131,8 @@ def wsclean(msin, wsclean_bin='wsclean', datacolumn='DATA', outname=None, pixels
"""
wsclean
"""
msbase
=
os
.
path
.
splitext
(
msin
)[
0
]
if
outname
is
None
:
outname
=
msbase
outname
=
os
.
path
.
splitext
(
msin
)[
0
]
if
multiscale
:
kwstring
+=
'
-multiscale
'
if
autothresh
is
not
None
:
...
...
@@ -665,19 +664,20 @@ def main(msin, steps='all', outbase=None, cfgfile='imcal.yml', force=False):
render
(
img_ddsub_1
+
'
-image.fits
'
,
aomodel
,
out
=
img_ddcal_1
+
'
-image.fits
'
)
smoothImage
(
img_ddcal_1
+
'
-image.fits
'
)
i1
=
makeNoiseImage
(
img_ddcal_1
+
'
-image.fits
'
,
img_ddsub_1
+
'
-residual.fits
'
,
)
i2
=
makeNoiseImage
(
img_ddcal_1
+
'
-image-smooth.fits
'
,
img_ddsub_1
+
'
-residual.fits
'
,
low
=
True
,
)
makeCombMask
(
i1
,
i2
,
clip1
=
3.5
,
clip2
=
5
,
outname
=
mask4
,)
# This part produces some artifacts. First need to figure out the reason
# smoothImage(img_ddcal_1+'-image.fits')
# i1 = makeNoiseImage(img_ddcal_1 +'-image.fits', img_ddsub_1 +'-residual.fits', )
# i2 = makeNoiseImage(img_ddcal_1 +'-image-smooth.fits', img_ddsub_1 +'-residual.fits',low=True, )
# makeCombMask(i1, i2, clip1=3.5, clip2=5, outname=mask4,)
if
not
force
and
os
.
path
.
exists
(
img_ddsub_2
+
'
-image.fits
'
):
pass
else
:
wsclean
(
ddsub
,
fitsmask
=
mask4
,
outname
=
img_ddsub_2
,
**
cfg
[
'
clean5
'
])
#TAO wsclean(ddsub,outname=img_ddsub, **cfg['clean5'])
#
if not force and os.path.exists(img_ddsub_2+'-image.fits'):
#
pass
#
else:
#
wsclean(ddsub, fitsmask=mask4, outname=img_ddsub_2, **cfg['clean5'])
#
#TAO wsclean(ddsub,outname=img_ddsub, **cfg['clean5'])
aomodel
=
bbs2model
(
img_dical
+
'
-sources.txt
'
,
img_dical
+
'
-model.ao
'
,
)
render
(
img_ddsub_2
+
'
-image.fits
'
,
aomodel
,
out
=
img_ddcal_2
+
'
-image.fits
'
,
)
#
aomodel = bbs2model(img_dical+'-sources.txt', img_dical+'-model.ao', )
#
render(img_ddsub_2+'-image.fits', aomodel, out=img_ddcal_2+'-image.fits', )
# test facet imaging:
if
'
facet
'
in
steps
:
...
...
@@ -685,8 +685,9 @@ def main(msin, steps='all', outbase=None, cfgfile='imcal.yml', force=False):
ddvis
=
outbase
+
'
_ddvis.MS
'
h5_ddvis
=
'
ddsols.h5
'
clustered_sdb
=
img_dical
+
'
-clustered.sourcedb
'
# ddvis = ddecal(dical3, clustered_sdb, msout=ddvis, subtract=False, h5out=h5_ddvis, **cfg['ddcal'])
# write_ds9(ds9_file, h5_ddvis, img_ddcal_2+'-image.fits')
if
not
os
.
path
.
exists
(
ddvis
):
ddvis
=
ddecal
(
dical3
,
clustered_sdb
,
msout
=
ddvis
,
subtract
=
False
,
h5out
=
h5_ddvis
,
**
cfg
[
'
ddcal
'
])
write_ds9
(
ds9_file
,
h5_ddvis
,
img_ddcal_2
+
'
-image.fits
'
)
wsclean
(
ddvis
,
fitsmask
=
mask3
,
save_source_list
=
False
,
outname
=
'
img-facet
'
,
**
cfg
[
'
facet_clean
'
],)
...
...
@@ -714,4 +715,3 @@ if __name__ == "__main__":
main
(
args
.
msin
,
outbase
=
args
.
outbase
,
steps
=
args
.
steps
,
cfgfile
=
configfile
,
force
=
args
.
force
)
# extime = Time.now() - t0
# print("Execution time: {:.1f} min".format(extime.to("minute").value))
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