Spherical harmonics functions

Sort of slow progress here but in my team we identified and are using the SHTns library

for doing fast transforms (uses FFTW internally). When using this library though, there’s a bit of set up involved, e.g. creating the config struct and the grid for transform. What is the appropriate way to do this inside a Stan function? Should it just set up and tear down on each function call?

1 Like