Source.save_all_fits_cutouts loops over the indices of Source.measurements. Inside the loop it calls Source.save_fits_cutout with each index, which is ultimately passed to a call along the lines of cutout_data.iloc[index]. Therefore, the function throws an error if Source.measurements and the provided cutout_data dataframe are not of the same length.
I think the function should instead loop over the indices of cutout_data (if it is provided).
Source.save_all_fits_cutouts
loops over the indices ofSource.measurements
. Inside the loop it callsSource.save_fits_cutout
with each index, which is ultimately passed to a call along the lines ofcutout_data.iloc[index]
. Therefore, the function throws an error ifSource.measurements
and the providedcutout_data
dataframe are not of the same length.I think the function should instead loop over the indices of cutout_data (if it is provided).