RadioAstronomySoftwareGroup / pyuvdata

A pythonic interface for radio astronomy interferometry data (uvfits, miriad, others)
https://pyuvdata.readthedocs.io/en/latest/index.html
BSD 2-Clause "Simplified" License
83 stars 27 forks source link

Spline Bug in Interpolation Function #1294

Open nfcarl opened 1 year ago

nfcarl commented 1 year ago

It appears that .interp() function will not adjust to changes made in spline_opts if resuse_spline=True. In order for spline_opts to work, it needs reuse_spline=False, which is not ideal. This should be fixed so that the parameter will reuse the spline unless there are changes made to the spline options.

Thank you!

piyanatk commented 1 year ago

@nfcarl Which version of pyuvdata are you seeing this?

nfcarl commented 1 year ago

The most recent version.

nfcarl commented 1 year ago

To clarify, the main issue is that it should detect a change in spline_opts and perhaps provide an error message, rather than just running the program. If we have reuse_spline=True, then we probably want it to tell you if you are trying to change the spline_opts it won't use the new options.

bhazelton commented 3 months ago

This isn't intrinsically a bug, if the reuse_spline keyword is set, it should reuse the old spline. But the docstrings should be clarified to say that spline_opts is ignored if reuse_spline is True.