2023-10-16

representation of flexible functions

Emily Griffith (Colorado) and I met today to look at replacing a spline interpolation function deep inside some of our code with a Fourier series. The idea is that we need a flexible function of one variable, and we were using a spline of a set of control points, but (for many reasons) we wanted to change to a sum of sines and cosines. The code work was a mess! The small change hits a lot of places inside our model, which is our K-process data-driven nucleosynthetic model. This same problem appears in the new version of wobble by Matt Daunt (NYU). I love flexible functions, but it's hard to implement them in a properly abstracted way. That is, it is hard to write a model so that you can just swap in a Fourier series or a Gaussian process where you used to have an interpolation of control points.

No comments:

Post a Comment