naima icon indicating copy to clipboard operation
naima copied to clipboard

Add proton synchrotron computation

Open zblz opened this issue 8 years ago • 6 comments

This is a relatively simple modification that would require an additional argument to the Synchrotron class and setting the particle mass to either m_e or m_p in the gyroradius calculation.

zblz avatar Jan 26 '17 16:01 zblz

Thank you very much for your reply, Zabalza. I modified it, and now I can use the proton synchrotron. Now I can enter the code "radiative.py" from my local path, but I don't know how to put it in the installed Naima path, and enter it from naima. Sorry for your time because of my limit knowledge of python.

XiaonaS avatar Jan 27 '17 08:01 XiaonaS

Hello,

Thanks for the suggestion. I was looking into the Synchrotron class to modify it for proton synchrotron. Apart from modifying the gyroradius calculation, the Synchrotron class also uses _elec and _gam functions from the base class BaseElectron for _spectrum calculation. In this base class also the electron mass appears. So we have to modify the base electron class as well right ? Or just define mec2 = (m_p * c**2).cgs globally in the proton synchrotron code? Please forgive me if I am wrong.

Regards

wrijupan avatar May 23 '17 18:05 wrijupan

@XiaonaS did proton synchrotron work for you by only modifying the Synchrotron class or did you touch the BaseElectron class as well? Your suggestions are much appreciated.

Thank you in advance.

wrijupan avatar May 23 '17 18:05 wrijupan

Yes, I have changed all the m_e to m_p in "radiative.py " when I calculate the proton synchrotron.

Best

XiaonaS avatar May 23 '17 20:05 XiaonaS

Thank you!

Regards

wrijupan avatar May 24 '17 08:05 wrijupan

@XiaonaS
Hello, Apart from the change of the mass, what is the "additional argument to the Synchrotron class" that @zblz mentions in the first message? Kindly Regards

Uxuee avatar Aug 15 '20 23:08 Uxuee