cgarling / StarFormationHistories.jl

Fitting astrophysical star formation histories via CMD modelling.
MIT License
3 stars 0 forks source link

Remove cmdpoint.jl and add new implementation for covariant kernels #30

Closed cgarling closed 2 months ago

cgarling commented 4 months ago

In the Gaussian2D-partials branch I have some code that uses the properly covariant kernels in the case that the filter that appears on the y axis also appears in the color on the x axis of the CMD. The implementation was poor and it didn't make much of a difference to the results at the time, so only some of that code is still in the main branch. Main problem was that you had to manually specify what type of covariance was to be used, which was annoying.

We can deal with this another way by keeping the current partial_cmd_smooth (which does not include covariance) but adding a new method that requires passing a table/dictionary/dataframe etc. and then the entries in that table that give the x and y axis filters. This is similar to the approach taken in simulate.jl where you have to pass mags, mag_names, and mag_lim_name to determine which magnitude should be used to calculate the limit. In this case you have to pass all the necessary single-band mags (rather than just the x and y coordinates), then we can internally determine if the y axis mag appears in the x axis color or not and use the correct covariant kernel. In the case that it doesn't, we could actually just call to the current partial_cmd_smooth which would be easy.