This comes from the code review. It is related to issue #281.
As I was trying out the code I called average_spectra() with an object of the wrong type (class). The first argument to average_spectra() should be a UVSpec object but I passed a PSpecData object. This gave an error:
AttributeError: 'PSpecData' object has no attribute 'antnums_to_blpair'
The error doesn’t indicate that the cause of the problem is passing an object of the wrong type. It appears that average_specta() does not check the type of the input object and provide a more informative error. Do all functions check their inputs?
This comes from the code review. It is related to issue #281.
As I was trying out the code I called average_spectra() with an object of the wrong type (class). The first argument to average_spectra() should be a UVSpec object but I passed a PSpecData object. This gave an error:
AttributeError: 'PSpecData' object has no attribute 'antnums_to_blpair'
The error doesn’t indicate that the cause of the problem is passing an object of the wrong type. It appears that average_specta() does not check the type of the input object and provide a more informative error. Do all functions check their inputs?