cgarling / StarFormationHistories.jl

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

Add masking #20

Open cgarling opened 1 year ago

cgarling commented 1 year ago

Would like to support masking of the Hess diagrams (models, data) in the basic functions in src/fitting/fitting_base.jl to support situations like masking the horizontal branch. Adding masking to composite! hurts performance but we could probably do it in the loglikelihood calculations more performantly.

cgarling commented 10 months ago

I think the most flexible way to do this is to actually do it at the script/science level rather than implement it at the library level. I.e., if the user makes a boolean mask mask and constructs model templates templates and a data Hess diagram data, then instead of passing templates and data into a fitting method like fit_templates, they could pass in [mask .* T for T in templates] and data .* mask. This is all an internal method or keyword argument would do anyway. We could provide utilities around constructing masks (currently have a few, probably need improvement) an example implementation.