Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calcos crashes in ALGNCORR step when background regions are too close to proftab data edge #46

Open
stscirij opened this issue Oct 25, 2018 · 0 comments
Labels

Comments

@stscirij
Copy link
Contributor

This is an issue for the new cenwave 800 reference files.

Traceback:
Input Reference centroid = 431.459575, row_0 = 254
Background region #2 truncated
Reguested region: 359 to 389
Using 359 to 359, with weight 0.032258
/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/trace.py:542: RuntimeWarning: Mean of empty slice.
dtype=np.float64)[goodcolumns].mean(dtype=np.float64)
/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/numpy/core/_methods.py:78: RuntimeWarning: invalid value encountered in true_divide
ret, rcount, out=ret, casting='unsafe', subok=False)
Adopted background regions for reference profile:
Rows 309 to 339, and rows 359 to 359
&&&
Error is here, profile ref file only has 359 rows so row with index 359 doesn't exist
&&&
Background = nan
Measured reference centroid = nan
Input Reference centroid = nan, row_0 = 254
Traceback (most recent call last):
File "/user/rij/anaconda3/envs/calcos_dev/bin/calcos", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/user/rij/hst/cos/ssbgit/calcos/lib/calcos/calcos", line 7, in
calcos.main(sys.argv[1:])
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/calcos.py", line 211, in main
burstfile=burstfile)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/calcos.py", line 434, in calcos
sci_status = cal.allScience()
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/calcos.py", line 2850, in allScience
obs.info, obs.switches, obs.reffiles)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/calcos.py", line 2729, in basicCal
self.wavecal_info)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/timetag.py", line 317, in timetagBasicCalibration
tracemask, traceprofile, gti)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/timetag.py", line 3814, in doProfileAlignmentCorr
tracemask)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/trace.py", line 173, in doProfileAlignment
regions)
File "/user/rij/anaconda3/envs/calcos_dev/lib/python3.6/site-packages/calcos/trace.py", line 587, in getReferenceCentroid
offset = int(round(profcenter - regions['center']))
ValueError: cannot convert float NaN to integer
(calcos_dev)

stscirij added a commit to stscirij/calcos that referenced this issue Oct 25, 2018
Index of last row of data is 1 less than size of data in that dimension
@stscirij stscirij added the bug label Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant