When trying to run all of the example notebooks to test the functionality of the package, I encountered a crash when trying to run the last cell of the pixel_centroid_mnemonics.ipynb notebook and was also not able to reproduce the figure output in the second-to-last cell.
UFuncTypeError Traceback (most recent call last)
Cell In[13], line 2
1 filename = './event1_2079_xmean.gif'
----> 2 spk.flux_spatial_timelapse_animation(spk.fg_array[52000:53000], spk.fg_flux[52000:53000], filename=filename)
File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/spelunker/spelunker.py:2232, in load.flux_spatial_timelapse_animation(self, fg_array, fg_time, fg_flux, start, stop, interval, filename)
2229 im = ax1.imshow(short_fg_array[idx], animated=True)
2230 im.set_clim(vmin=min, vmax=max)
-> 2232 im3 = ax2.vlines(i, np.min(short_fg_flux), np.max(short_fg_flux), animated=True, color='red')
2233 ims.append([im, im2, im3])
2235 fig.suptitle('Guidestar spatial timeseries animation')
File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/numpy/core/fromnumeric.py:2953, in min(a, axis, out, keepdims, initial, where)
2836 @array_function_dispatch(_min_dispatcher)
2837 def min(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
2838 where=np._NoValue):
2839 """
2840 Return the minimum of an array or minimum along an axis.
2841
(...)
2951 6
2952 """
-> 2953 return _wrapreduction(a, np.minimum, 'min', axis, None, out,
2954 keepdims=keepdims, initial=initial, where=where)
File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/numpy/core/fromnumeric.py:88, in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
85 else:
86 return reduction(axis=axis, out=out, **passkwargs)
---> 88 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
UFuncTypeError: ufunc 'minimum' did not contain a loop with signature matching types (dtype('<U4'), dtype('<U4')) -> None
Also, note that the version of the notebook on GitHub is not exactly consistent with that on readthedocs, and note that the pid2079_observation04_visit1.dat
file isn't uploaded to GitHub which requires that users run the spk.gauss2d_fit
function which isn't described in the notebook.