gausspyplus icon indicating copy to clipboard operation
gausspyplus copied to clipboard

Crash in step 6

Open lpagani91 opened this issue 3 years ago • 4 comments

Though I could run the demo version of gausspy+-0.2dev0 under py3.8.7, scipy1.6.0, numpy1.19.5 and lmfit1.0.1, on a Mac OS10.12.6 (Sierra), when I applied it to my own dataset (13CO 1-0 spectra of a single cloud), it crashed in step 6. It is difficult to report the problem because the iterations are written upward on the screen, erasing all the initial information. I kill the job before the iterations start to get the initial information but the end is more problematic to collect.

OTF>python step_6_13co_10_spatial_refit2--grs.py

=========================== Spatial refitting - Phase 2

Flagging:

  • Blended components: True
  • Negative residual features: True
  • Broad components: True flagged if FWHM of broadest component in spectrum is:

    = 2.0 times the FWHM of second broadest component or = 2.0 times any FWHM in >= 50% of its neigbors

  • High reduced chi2 values (> None): False
  • Non-Gaussian distributed residuals: True
  • Differing number of components: True

threshold for required components: 0.833

Flags:

  • 759 spectra w/ blended components
  • 92 spectra w/ negative residual feature
  • 1434 spectra w/ broad feature (info: 16 spectra w/ a FWHM > 57 channels)
  • 0 spectra w/ high rchi2 value
  • 1081 spectra w/ residual not passing normality test
  • 121 spectra w/ differing number of components

check which spectra require refitting...

determine neighbors for all spectra... 12537it [00:10, 1165.48it/s]

start refit iteration #1... Using 6 of 8 cpus 6%|âââ | 721/12.5k [00:00<00:07, 1.51kit/s]

then it starts writing upwards... (not very convenient !): [...] 46%|ââââââââââââââââââ | 5.72k/12.5k [03:02<05:06, 22.2it/s] 43%|âââââââââââââââââ | 5.42k/12.5k [02:47<03:03, 38.8it/s] 43%|âââââââââââââââââ | 5.40k/12.5k [02:47<04:07, 28.9it/s] 41%|ââââââââââââââââ | 5.09k/12.5k [02:36<02:08, 57.7it/s] 41%|ââââââââââââââââ | 5.08k/12.5k [02:35<01:29, 82.9it/s] 41%|ââââââââââââââââ | 5.05k/12.5k [02:35<02:00, 62.0it/s] 38%|âââââââââââââââ | 4.77k/12.5k [02:27<01:44, 74.3it/s] 38%|âââââââââââââââ | 4.76k/12.5k [02:27<01:57, 66.3it/s] [...] and finally :

100%|ââââââââââââââââââââââââââââââââââââââ| 12.5k/12.5k [07:06<00:00, 29.4it/s] 12534it [00:00, 427489.74it/s] ââââââââââââ| 12.1k/12.5k [07:02<00:00, 1.08kit/s] SUCCESS ââââââââââââââââââââââââââââââââââ | 11.3k/12.5k [07:01<00:03, 331it/s]

it seems to have finished with these iterations. The output is mixed with the iteration report and in the end we get (I boldface the useful part, to separate from the iteration leftovers):

check which spectra require refitting... | 8.71k/12.5k [06:19<03:41, 17.3it/s] Traceback (most recent call last): | 8.70k/12.5k [06:18<02:47, 22.9it/s] File "step_6_13co_10_spatial_refit2--grs.py", line 86, in 3, 24.9it/s] main() File "step_6_13co_10_spatial_refit2--grs.py", line 53, in main sp.spatial_fitting(continuity=True) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gausspyplus-0.2.dev0-py3.8.egg/gausspyplus/spatial_fitting.py", line 323, in spatial_fitting self.check_continuity() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gausspyplus-0.2.dev0-py3.8.egg/gausspyplus/spatial_fitting.py", line 2633, in check_continuity self.refitting() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gausspyplus-0.2.dev0-py3.8.egg/gausspyplus/spatial_fitting.py", line 886, in refitting self.check_continuity() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gausspyplus-0.2.dev0-py3.8.egg/gausspyplus/spatial_fitting.py", line 2632, in check_continuity self.check_indices_refit() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gausspyplus-0.2.dev0-py3.8.egg/gausspyplus/spatial_fitting.py", line 2615, in check_indices_refit self.indices_refit = np.delete(self.indices_all.copy(), indices_remove) File "<array_function internals>", line 5, in delete File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/lib/function_base.py", line 4406, in delete keep[obj,] = False IndexError: index 12568 is out of bounds for axis 0 with size 12537

so its index goes too far by a relatively large amount...

lpagani91 avatar Feb 11 '21 10:02 lpagani91