spacetelescope / drizzlepac

AstroDrizzle for HST images.
https://drizzlepac.readthedocs.io
BSD 3-Clause "New" or "Revised" License
53 stars 38 forks source link

TypeError in run_mvm_processing #1052

Closed stscijgbot-hstdp closed 3 years ago

stscijgbot-hstdp commented 3 years ago

Issue HLA-577 was created on JIRA by Robert Swaters:

Trailer file written to:  hst_skycell-p0797x13y05_acs_wfc_f814w_fine-all-all_trl.log
^G^G^G
Traceback (most recent call last):
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/hapmultisequencer.py", line 245, in run_mvm_processing
    driz_list = create_drizzle_products(total_obj_list)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/hapmultisequencer.py", line 105, in create_drizzle_products
    filt_obj.wcs_drizzle_product(meta_wcs)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/haputils/product.py", line 997, in wcs_drizzle_product
    **drizzle_pars)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/astrodrizzle.py", line 119, in AstroDrizzle
    run(configObj, wcsmap=wcsmap)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/util.py", line 244, in wrapper
    raise errorobj
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/util.py", line 230, in wrapper
    result = func(*args, **kwargs)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/astrodrizzle.py", line 211, in run
    sky.subtractSky(imgObjList, configobj, procSteps=procSteps)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/sky.py", line 197, in subtractSky
    _skymatch(imageObjList, paramDict, inmemory, clean, log)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/sky.py", line 307, in _skymatch
    fi.mask_images[k], fi.maskext[k], in_memory)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/sky.py", line 414, in _buildStaticDQUserMask
    mask = img.buildMask(img[ext]._chip,bits=sky_bits)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/imageObject.py", line 706, in buildMask
    dqmask = buildmask.buildMask(dqarr,bits)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/drizzlepac/buildmask.py", line 85, in buildMask
    dtype=np.uint8)
  File "/ifs/pipeline/dms/rhel7/pkgs/miniconda3/envs/caldp_master/lib/python3.7/site-packages/stsci/tools/bitmask.py", line 430, in bitfield_to_boolean_mask
    casting='unsafe')
TypeError: The `dtype` and `signature` arguments to ufuncs only select the general DType and not details such as the byte order or time unit (with rare exceptions see release notes).  To avoid this warning please use the scalar types `np.float64`, or string notation.
In rare cases where the time unit was preserved, either cast the inputs or provide an output array. In the future NumPy may transition to allow providing `dtype=` to denote the outputs `dtype` as well
2021174181814 INFO src=drizzlepac.hapmultisequencer- Processing completed at 2021-06-23 18:18:14.899506
2021174181814 INFO src=drizzlepac.hapmultisequencer- Total processing time: 215.798508 sec
2021174181814 INFO src=drizzlepac.hapmultisequencer- Return exit code for use by calling Condor/OWL workflow code: 0 (zero) for success, 1 for error
2021174181814 INFO src=drizzlepac.hapmultisequencer- Return condition 1

Full logs in e.g.: /ifs/archive/dev/hst/info/rswaters/test/test_rswaters_20210623_01/regr_08130_02/output/hap_mvm_pre_skycell-p0797x13y05_rswaters_1624470824.616897 /ifs/archive/dev/hst/info/rswaters/test/test_rswaters_20210623_01/regr_08130_02/output/hap_mvm_pre_skycell-p2381x05y09_rswaters_1624470824.297923

stscijgbot-hstdp commented 3 years ago

Comment by Warren Hack on JIRA:

Limiting the version of numpy to less than 1.21 resolves this incompatibility problem. This has been done as part of Drizzlepac PR #⁠1051. When this PR gets merged, this issue will be resolved as demonstrated by successfully passing the tests associated with the PR which originally demonstrated this same error.

stscijgbot-hstdp commented 3 years ago

Comment by Michele De La Pena on JIRA:

Git PR#⁠1051 has been merged onto master and is available for use by Team Violet.  This error was the same problem which was encountered when trying to validate new changes for drizzlepac.  This error caused the PyTests to fail.

stscijgbot-hstdp commented 3 years ago

Comment by Robert Swaters on JIRA:

With that fix, the datasets in my tests process successfully!

mcara commented 3 years ago

The real fix is in https://github.com/spacetelescope/stsci.tools/pull/136 and once a new stsci.tools is released, the limitation on the numpy version can be removed.