From 7e217f4dabba82d4979f04930bfa7848f403722a Mon Sep 17 00:00:00 2001 From: AK <kutkin@gmail.com> Date: Wed, 7 Jun 2023 12:29:38 +0000 Subject: [PATCH] . --- cluster.py | 7 +++---- imcal.py | 10 +++++----- imcal.yml | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cluster.py b/cluster.py index 9da0885..702bd14 100755 --- a/cluster.py +++ b/cluster.py @@ -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 diff --git a/imcal.py b/imcal.py index f048ba3..0fd02d6 100755 --- a/imcal.py +++ b/imcal.py @@ -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)) diff --git a/imcal.yml b/imcal.yml index a22cbe2..bc36e81 100644 --- a/imcal.yml +++ b/imcal.yml @@ -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 ####################### -- GitLab