jveitchmichaelis / rascal

RAnsac Assisted Spectral CALibration
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

Calibrator.fit() does not work in example #1

Closed cylammarco closed 5 years ago

cylammarco commented 5 years ago

When trying to use the calibration_test_sprat.py (after fixing the path and file name issues with spectrum and atlas)

`

IndexError Traceback (most recent call last)

in () ----> 1 best_p = c.fit(3) 2 final_p = c.match_peaks_to_atlas(best_p, 0.25) 3 4 print(atlas) 5 print(final_p) /Users/marcolam/git/rascal/calibrator.pyc in fit(self, top_n) 43 def fit(self, top_n=5): 44 ---> 45 self.accumulator = self._hough_points(self.pairs[:,0], self.pairs[:,1]) 46 47 h, lines = self._get_top_lines(self.accumulator, bins=100, top_n=top_n) IndexError: too many indices for array `
cylammarco commented 5 years ago

The bug is in the reading the csv file of arc lines. It is not a bug in the Calibrator.fit(), but in the example script/arc line text file. calibration_test.py is "fixed", not fixed in the other example cases (see the Jupyter Notebook example). Calibrator.fit() can now execute to give results, but the fit is far from useable. Still require a lot of fine-tuning.