From 8717b6b2fa9edc8ac290b4bfb6f4335b075e2ef5 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 13 Aug 2017 11:22:58 +0800 Subject: bin/get-healpix-patch: Postpone modules import with JIT Signed-off-by: Aaron LI --- bin/get-healpix-patch | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'bin/get-healpix-patch') diff --git a/bin/get-healpix-patch b/bin/get-healpix-patch index 879067d..a837ad4 100755 --- a/bin/get-healpix-patch +++ b/bin/get-healpix-patch @@ -14,15 +14,8 @@ import sys import argparse import logging -import scipy.ndimage -import healpy as hp -from reproject import reproject_from_healpix - from fg21sim.share import CONFIGS -from fg21sim.sky import SkyPatch from fg21sim.utils import setup_logging -from fg21sim.utils.io import read_fits_healpix -from fg21sim.utils.units import UnitConversions as AUC def main(): @@ -54,6 +47,15 @@ def main(): logger = logging.getLogger(tool) logger.info("COMMAND: {0}".format(" ".join(sys.argv))) + logger.info("Importing necessary modules + Numba JIT, waiting ...") + import scipy.ndimage + import healpy as hp + from reproject import reproject_from_healpix + # + from fg21sim.sky import SkyPatch + from fg21sim.utils.io import read_fits_healpix + from fg21sim.utils.units import UnitConversions as AUC + if args.config: CONFIGS.read_userconfig(args.config) center = (CONFIGS.getn("sky/patch/xcenter"), -- cgit v1.2.2