From d35d7fbe863ebe0630ba104790e76d9adc159342 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Sat, 22 Jul 2023 21:51:18 +0100 Subject: [PATCH] fix circular import --- py/desispec/image_model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py/desispec/image_model.py b/py/desispec/image_model.py index a5900b74c..127336af7 100644 --- a/py/desispec/image_model.py +++ b/py/desispec/image_model.py @@ -22,7 +22,6 @@ from desispec.qproc.qextract import qproc_boxcar_extraction from desispec.qproc.qsky import qproc_sky_subtraction from desispec.qproc.qfiberflat import qproc_apply_fiberflat -from desispec.trace_shifts import compute_dx_from_cross_dispersion_profiles @numba.jit def numba_proj(image,x,sigma,flux) : @@ -75,6 +74,9 @@ def compute_image_model(image,xytraceset,fiberflat=None,fibermap=None,with_spect log=get_logger() + # this is done here to avoid circular import + from desispec.trace_shifts import compute_dx_from_cross_dispersion_profiles + if fit_x_shift : t0=time.time() log.info("fitting dx ...")