aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-13 11:22:58 +0800
committerAaron LI <aly@aaronly.me>2017-08-13 11:22:58 +0800
commit8717b6b2fa9edc8ac290b4bfb6f4335b075e2ef5 (patch)
treebf5b28b9b9aabd7dec0efef5c49337d100c78d23 /bin
parent01ad6e91008d3e564861694289fc400311639b98 (diff)
downloadfg21sim-8717b6b2fa9edc8ac290b4bfb6f4335b075e2ef5.tar.bz2
bin/get-healpix-patch: Postpone modules import with JIT
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-healpix-patch16
1 files changed, 9 insertions, 7 deletions
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"),