Closed JTerwel closed 2 years ago
Yes, that line is definitely left from debugging. Thanks for pointing this out. Feel free to create a pull request for removing it, or otherwise I can look into in a few days.
All right, I created a pull request to remove it.
I am currently using CompoundSource to simulate light curves of an SN with an additional emission line. I basically use it to combine two TimeSeriesSources into a single object. (1 base SN + 1 Gaussian line). It works as expected, and is straightforward to work with.
I noticed however that when I run survey.get_lightcurves(), it also prints 2 lines per light curve, slowing the process down. the lines state something like the following:
amplitude [5.36861787724543e-16, 5.36861787724543e-16] amplitude [5.36861787724543e-16]
It shows up when setting the free parameters in the components of the CompoundSource. I think I traced it back to this line: https://github.com/ZwickyTransientFacility/simsurvey/blob/192d4b400b4672011ca29452223aa3b19c46c3ef/simsurvey/models.py#L173
It looks to me like it was put in while debugging the code, but not removed afterwards. Or is there a specific reason it was left in? In any case, the only way I can make it not print anything seems to be by removing / commenting out this line.