Open dani753 opened 2 years ago
This issue has appeared to me when trying to create a dataset to train a model. The data I'm using is correctly formated as long as I could create the dataset and train a model with a subset of my dataset, but not with the whole dataset.
IndexError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_11500\2521651956.py in
1 ds = stella.FlareDataSet(fn_dir="data_from_solardeamon/lightcurves_elonged/", catalog="catalog_solar_flares/catalog.txt"\
----> 2 , cadences=38, frac_balance=0.2)
c:\users\dania\appdata\local\programs\python\python37\lib\site-packages\stella\preprocessing_flares.py in init(self, fn_dir, catalog, downloadSet, cadences, frac_balance, training, validation) 74 self.frac_balance = frac_balance 75 self.load_files() ---> 76 self.reformat_data() 77 78 misc = split_data(self.labels, self.training_matrix,
c:\users\dania\appdata\local\programs\python\python37\lib\site-packages\stella\preprocessing_flares.py in reformat_data(self, random_seed) 219 220 nontime, nonflux, nonerr = break_rest(time_removed, flux_removed, --> 221 flux_err_removed, self.cadences) 222 for j in range(len(nonflux)): 223 if x >= ss:
c:\users\dania\appdata\local\programs\python\python37\lib\site-packages\stella\utils.py in break_rest(time, flux, flux_err, cadences) 134 if j == 0: 135 start = 0 --> 136 end = breaking_points[j] 137 elif j < len(breaking_points): 138 start = breaking_points[j-1]
IndexError: index 0 is out of bounds for axis 0 with size 0