You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I checked the FAQ and my question has not been addressed.
Instrument
NIRSpec (Stages 1-3)
What happened?
Stage 3 crashes when 'src_pos_type' is set to 'gaussian' for NIRSpec. It works fine if an integer is given instead.
Error traceback output
Traceback (most recent call last):
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/source_pos.py", line 162, in source_pos
src_ypos, src_ywidth = source_pos_gauss(flux, meta, m, n, plot)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/source_pos.py", line 416, in source_pos_gauss
popt, _ = curve_fit(gauss, y_pixels, med_row, p0, maxfev=10000)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py", line 925, in curve_fit
ydata = np.asarray_chkfinite(ydata, float)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/numpy/lib/function_base.py", line 627, in asarray_chkfinite
raise ValueError(
ValueError: array must not contain infs or NaNs
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/mnt/data/spatel/DataAnalysis/g395h/input/demos/run_eureka.py", line 29, in <module>
spec, meta = s3.reduce(eventlabel, ecf_path=ecf_path)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/s3_reduce.py", line 418, in reduce
source_pos.source_pos_wrapper(data, meta, log,
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/source_pos.py", line 89, in source_pos_wrapper
job.get()
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/source_pos.py", line 162, in source_pos
src_ypos, src_ywidth = source_pos_gauss(flux, meta, m, n, plot)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/eureka/S3_data_reduction/source_pos.py", line 416, in source_pos_gauss
popt, _ = curve_fit(gauss, y_pixels, med_row, p0, maxfev=10000)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py", line 925, in curve_fit
ydata = np.asarray_chkfinite(ydata, float)
File "/home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/numpy/lib/function_base.py", line 627, in asarray_chkfinite
raise ValueError(
ValueError: array must not contain infs or NaNs
2024-12-25 01:19:28,658 - stpipe - WARNING - /home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/numpy/core/shape_base.py:65: UserWarning: Warning: converting a masked element to nan.
ary = asanyarray(ary)
2024-12-25 01:19:28,665 - stpipe - WARNING - /home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/numpy/core/shape_base.py:65: UserWarning: Warning: converting a masked element to nan.
ary = asanyarray(ary)
2024-12-25 01:19:28,668 - stpipe - WARNING - /home/spatel/anaconda3/envs/eurekav1_1/lib/python3.10/site-packages/numpy/core/shape_base.py:65: UserWarning: Warning: converting a masked element to nan.
ary = asanyarray(ary)
Sorry for the late reply; one thing I wanted to share is that I didn't face this error when I ran it with the previous version of Eureka (v0.9, I believe). However, after I installed v1.1 (by creating a new environment), I faced this issue.
A lot has changed between v0.9 and v1.1, including the loss of backwards compatibility, so using the same settings will not lead to the same result.
Try comparing outputs between runs to see what has changed. Also, compare your ECFs to those in the demos folder to make sure you're not missing something important.
@sarthakpatel7, are you still dealing with this issue? If so, please first check if there are any updates needed to your ECFs by looking at the newer templates here, and also look at any output figures you get.
If none of that works, please copy-paste the contents your Stage 3 ECF file so that we can troubleshoot this further.
FAQ check
Instrument
NIRSpec (Stages 1-3)
What happened?
Stage 3 crashes when 'src_pos_type' is set to 'gaussian' for NIRSpec. It works fine if an integer is given instead.
Error traceback output
What operating system are you using?
KDE Neon
What version of Python are you running?
Python 3.10.14
What Python packages do you have installed?
Code of Conduct
The text was updated successfully, but these errors were encountered: