I've done the brutal fixing for the problem concerning the redundancy of the flux field. I think of two way to do that better :
1) If there is a different field on the cosmos cat that could be used in the single component part of the function, using it instead of the same as the one used in the 2 component fit.
2) Include a if statement (maybe with a new hyperparameter nb_component ?) to add only once the flux, with the correct definition depending on the number of component.
I've done the brutal fixing for the problem concerning the redundancy of the flux field. I think of two way to do that better :
1) If there is a different field on the cosmos cat that could be used in the single component part of the function, using it instead of the same as the one used in the 2 component fit.
2) Include a if statement (maybe with a new hyperparameter nb_component ?) to add only once the flux, with the correct definition depending on the number of component.