vortex-exoplanet / VIP

VIP is a python package/library for angular, reference star and spectral differential imaging for exoplanet/disk detection through high-contrast imaging.
http://vip.readthedocs.io/
MIT License
70 stars 58 forks source link

Problem with bad pixels correction #603

Closed greencarite closed 1 year ago

greencarite commented 1 year ago

Hello there! I have the VIP version 1.3.4 and numba numba-0.57.0 and the bad_pixel routine is having a problem:

cube_sigcorr, bpm_mask = cube_fix_badpix_isolated(cube1, sigma_clip=5, num_neig=9, size=9, ...: frame_by_frame=False, mad=True, verbose=True, ...: full_output=True) ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― Starting time: 2023-06-14 10:43:26 ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

TypingError Traceback (most recent call last)

in ----> 1 cube_sigcorr, bpm_mask = cube_fix_badpix_isolated(cube1, sigma_clip=5, num_neig=9, size=9, 2 frame_by_frame=False, mad=True, verbose=True, 3 full_output=True) ~/opt/anaconda3/lib/python3.9/site-packages/vip_hci/preproc/badpixremoval.py in cube_fix_badpix_isolated(array, bpm_mask, correct_only, sigma_clip, num_neig, size, frame_by_frame, protect_mask, cxy, mad, ignore_nan, verbose, full_output) 284 if bpm_mask is None or not correct_only: 285 ori_nan_mask = np.where(np.isnan(np.nanmean(array, axis=0))) --> 286 ind = clip_array(np.nanmean(array, axis=0), sigma_clip, sigma_clip, 287 bpm_mask, neighbor=neigh, num_neighbor=num_neig, 288 mad=mad) ~/opt/anaconda3/lib/python3.9/site-packages/vip_hci/stats/clip_sigma.py in clip_array(array, lower_sigma, upper_sigma, bpm_mask_ori, out_good, neighbor, num_neighbor, mad, half_res_y) 378 else: 379 _clip_array_numba = njit(_clip_array) --> 380 return _clip_array_numba(array, lower_sigma, upper_sigma, bpm_mask_ori, 381 out_good=out_good, neighbor=neighbor, 382 num_neighbor=num_neighbor, mad=mad, ~/opt/anaconda3/lib/python3.9/site-packages/numba/core/dispatcher.py in _compile_for_args(self, *args, **kws) 466 e.patch_message(msg) 467 --> 468 error_rewrite(e, 'typing') 469 except errors.UnsupportedError as e: 470 # Something unsupported is present in the user code, add help info ~/opt/anaconda3/lib/python3.9/site-packages/numba/core/dispatcher.py in error_rewrite(e, issue_type) 407 raise e 408 else: --> 409 raise e.with_traceback(None) 410 411 argtypes = [] TypingError: Failed in nopython mode pipeline (step: nopython frontend) NameError: name 'unsafe_empty_inferred' is not defined Do you know what's happening? Thanks! Alice
VChristiaens commented 1 year ago

Hi @greencarite, Since there've been significant improvements to the bad pixel correction algorithms around v1.4.0, let's make sure this has not been dealt with since v1.3.4. Would you mind checking whether your issue persists with the latest release of VIP (1.4.2)?

greencarite commented 1 year ago

It worked! Thank you!