diff --git a/cluster.py b/cluster.py index 9da088541f77bb46b4facd2f43a7c62a67ab8397..702bd14bce13aa43f396801838509039d967d2d2 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 f048ba3be25ba55051493d7f1148590e4fc4337b..0fd02d6d58bd8eeedd8461e307b454a923c59bad 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 a22cbe2db9483c11711845a0104ee0c70ef02f2d..bc36e8135ed1294e75360220485210a7a98237d0 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 #######################