We have one TOI dataset that has only g-band data available. After optimization, ta.plot_fit('de') failed because the figure axes expect single index instead of a tuple, it seems. May be a work around is to flatten the axes when there is only a single band to plot. Same error occurs for other plotting methods such as ta.plot_final_fit()
--------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-19-99f3968dcbc5> in <module>
----> 1 fig = ta.plot_fit('de');
~/github/MuSCAT2_transit_pipeline/muscat2ta/tfopanalysis.py in plot_fit(self, model, figsize, save, plot_priors)
295
296 def plot_fit(self, model: str = 'de', figsize: tuple = (13, 8), save=False, plot_priors=True):
--> 297 fig, axs = self.lpf.plot_light_curves(model=model, figsize=figsize)
298 npb = self.lpf.npb
299 if plot_priors:
~/github/MuSCAT2_transit_pipeline/muscat2ta/m2lpf.py in plot_light_curves(self, model, figsize, fig, gridspec, ylim_transit, ylim_residuals, bin_width)
653 for i, sl in enumerate(self.lcslices):
654 t = self.timea[sl]
--> 655 axs[1, i].plot(t, self.ofluxa[sl], '.', alpha=0.5)
656 axs[1, i].plot(t, fm[0][sl], 'k', lw=2)
657 axs[2, i].plot(t, self.ofluxa[sl] / bl[0][sl], '.', alpha=0.5)
IndexError: too many indices for array
Hi Hannu,
We have one TOI dataset that has only g-band data available. After optimization, ta.plot_fit('de') failed because the figure axes expect single index instead of a tuple, it seems. May be a work around is to flatten the axes when there is only a single band to plot. Same error occurs for other plotting methods such as ta.plot_final_fit()