askap-vast / vast-tools

A collection of tools that are useful for the VAST project and for exploration of results from the VAST Pipeline.
https://vast-survey.org/vast-tools/
MIT License
8 stars 0 forks source link

Source.save_all_fits_cutouts breaks if cutout_data and measurements dataframe are different lengths #443

Closed ddobie closed 1 year ago

ddobie commented 1 year ago

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).