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
7e217f4d
Commit
7e217f4d
authored
2 years ago
by
Alexander Kutkin
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
3a02a1bc
Branches
dev
No related tags found
No related merge requests found
Pipeline
#51172
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cluster.py
+3
-4
3 additions, 4 deletions
cluster.py
imcal.py
+5
-5
5 additions, 5 deletions
imcal.py
imcal.yml
+1
-1
1 addition, 1 deletion
imcal.yml
with
9 additions
and
10 deletions
cluster.py
+
3
−
4
View file @
7e217f4d
...
...
@@ -634,7 +634,7 @@ def voronoi_clustering(fig, ax, df, wcs, resid_data, nbright, nclusters,
else
:
clusters_centers
.
append
([
ra
,
dec
])
clusters
.
append
(
c
)
print
(
ra
,
dec
)
logging
.
info
(
'
Cluster at %s %s
'
,
ra
,
dec
)
if
(
isinstance
(
nclusters
,
int
))
and
(
len
(
clusters_centers
)
>=
nclusters
):
logging
.
debug
(
'
Max cluster number reached. Breaking...
'
)
...
...
@@ -957,7 +957,6 @@ def main(img, resid, model, clustering_method='Voronoi', add_manual=False, nclus
fig
.
savefig
(
imgbase
+
'
-clustering.png
'
)
return
output
### if __name__ == "__main__":
if
__name__
==
"
__main__
"
:
main
(
img
,
resid
,
model
,
clustering_method
=
'
Voronoi
'
,
nclusters
=
6
)
# main(img, resid, model, clustering_method='Voronoi', nclusters=6)
pass
This diff is collapsed.
Click to expand it.
imcal.py
+
5
−
5
View file @
7e217f4d
...
...
@@ -22,7 +22,7 @@ import yaml
import
argparse
# from astropy.coordinates import SkyCoord
#
from astropy.time import Time
from
astropy.time
import
Time
import
astropy.units
as
u
from
astropy.io
import
fits
...
...
@@ -699,7 +699,7 @@ if __name__ == "__main__":
logging
.
info
(
'
Starting logger for {}
'
.
format
(
__name__
))
logger
=
logging
.
getLogger
(
__name__
)
#
t0 = Time.now()
t0
=
Time
.
now
()
parser
=
argparse
.
ArgumentParser
(
description
=
'
DDCal Inputs
'
)
parser
.
add_argument
(
'
msin
'
,
help
=
'
MS file to process
'
)
parser
.
add_argument
(
'
-c
'
,
'
--config
'
,
action
=
'
store
'
,
...
...
@@ -711,7 +711,7 @@ if __name__ == "__main__":
args
=
parser
.
parse_args
()
configfile
=
args
.
configfile
or
\
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'
imcal.yml
'
)
# msin = args.msin
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))
extime
=
Time
.
now
()
-
t0
print
(
"
Execution time: {:.1f} hr
"
.
format
(
extime
.
to
(
"
hour
"
).
value
))
This diff is collapsed.
Click to expand it.
imcal.yml
+
1
−
1
View file @
7e217f4d
...
...
@@ -101,7 +101,7 @@ cluster:
cluster_radius
:
5
# arcmin
cluster_overlap
:
1.6
# if lower than 2 clusters can intersect
clustering_method
:
voronoi
# can also be auto or manual
voronoi_search_artifacts
:
False
#
set True to
search for artifacts around bright sources
voronoi_search_artifacts
:
False
# search for artifacts around bright sources
add_manual
:
False
######################## DD CALIBRATION #######################
...
...
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