Skip to content
Snippets Groups Projects
Commit 7e217f4d authored by Alexander Kutkin's avatar Alexander Kutkin
Browse files

.

parent 3a02a1bc
Branches dev
No related tags found
No related merge requests found
Pipeline #51172 passed
......@@ -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
......@@ -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))
......@@ -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 #######################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment