phoebe-project / phoebe2

PHOEBE - Eclipsing Binary Star Modeling Software
http://phoebe-project.org
GNU General Public License v3.0
76 stars 28 forks source link

DC (and possibly other solvers) do not check ahead of time for data #814

Open aprsa opened 6 months ago

aprsa commented 6 months ago

When running DC on an empty dataset with just compute_times() defined, phoebe fails with an ugly index out of bounds message.

import phoebe
b = phoebe.default_binary()
b.add_dataset('lc', compute_times=phoebe.linspace(0, 1, 51), passband='Johnson:V', dataset='lc01')
b.run_compute()
b.add_solver('differential_corrections', fit_parameters=['incl@orbit'], solver='dc01')
b.run_solver(solver='dc01', solution='dcs01')