ACCarnall / bagpipes

Bagpipes is a state of the art code for generating realistic model galaxy spectra and fitting these to spectroscopic and photometric observations. Users should install with pip, not by cloning the repository.
http://bagpipes.readthedocs.io
GNU General Public License v3.0
71 stars 37 forks source link

Iyer SFH Modeling #73

Closed MohammadRih closed 1 week ago

MohammadRih commented 2 weeks ago

Hi,

I'm trying to use iyer sfh for my project but I have issues to do this. After 5 seconds, the fitting process is completed, but it does not provide us with any useful output. Even no error is given except a series of warnings. I will be very happy if you have any solution. some line of warnings are provided at bellow.

{RuntimeWarning: divide by zero encountered in log10 self.stellar_mass = np.log10(np.sum(self.live_frac_grid*self.ceh.grid)) RuntimeWarning: divide by zero encountered in log10 self.formed_mass = np.log10(np.sum(self.ceh.grid))}

Thanks

jacqdanso commented 2 weeks ago

Hi! I encountered a similar issue with the Iyer SFH. It turns out it needs to be passed as fit_instructions["iyer2019"] = iyer and not fit_instructions["iyer"] = iyer, as it's been hardcoded as the former in the source code. This worked for me, so hopefully it helps!

ACCarnall commented 1 week ago

Please could you let me know which version of bagpipes and which version of dense basis you're using? The fit_instructions dictionary you're trying to use would also be very helpful.

MohammadRih commented 1 week ago

Hi again, First of all, Sorry for the delay in replying, and thank you very much Jacqueline for your kind advice. I went ahead with your instruction and it works well. And thank you Adam for the follow-up, I was able to run the code according to the Jacqueline comment, but I'm still a little confused in determining the physics of tx prior. Can you provide me some context that mentions that prior?

Thanks

ACCarnall commented 1 week ago

Ah ok brilliant, glad you managed to get it working. For further info of this kind I would recommend having a look at Kartheik Iyer's 2019 (and later) papers, he's really better qualified to explain this stuff than I am, I just implemented his work into the code.

MohammadRih commented 5 days ago

Thanks Ok, I'll look at these ref and try to understand it.