From 4db3a8d951176f1631c7c4a90c386b235539302a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 13 Dec 2016 10:03:50 +0800 Subject: Import modules (with Numba JIT) just before usage Thus, the usage information can be printed out quickly :) --- bin/healpix2hpx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/healpix2hpx') diff --git a/bin/healpix2hpx b/bin/healpix2hpx index fda9627..ed4b66e 100755 --- a/bin/healpix2hpx +++ b/bin/healpix2hpx @@ -13,12 +13,9 @@ import sys import argparse import logging -from astropy.io import fits - import fg21sim from fg21sim.configs import configs from fg21sim.utils import setup_logging -from fg21sim.utils.healpix import healpix2hpx def main(): @@ -70,6 +67,9 @@ def main(): else: raise OSError("Output file already exists: %s" % args.outfile) + logger.info("Importing modules + Numba JIT, waiting ...") + from astropy.io import fits + from fg21sim.utils.healpix import healpix2hpx hpx_data, hpx_header = healpix2hpx(args.infile, append_history=history, append_comment=comments) -- cgit v1.2.2