aasensio / hazel2

Hazel v2.0: synthesis and inversion of Stokes profiles caused by the joint action of atomic level polarization and the Hanle and Zeeman effects
https://aasensio.github.io/hazel2/index.html
MIT License
21 stars 6 forks source link

Switch on/off Hanle Effect #27

Closed kouui closed 2 years ago

kouui commented 2 years ago

Thank you for this exellent library! I am from Kyoto-Univerity and trying to use HAZEL to calculate the Magnetic field in our observed 10830 stokes profile. In case of active region data, we would like to do the inversion without Hanle effect. Is there an option to switch off Hanle Effect?

Thank you in advance! Huang

aasensio commented 2 years ago

Hi Huang! Thanks for your interest in hazel. No, at the moment this is not allowed. It was part of the original version of hazel, but I took out this option to simplify the configuration. I guess you mean you want to remove all atomic polarization, right? What is the use case of this option? Atomic polarization is always there and doing an inversion neglecting it will produce the wrong results. If you convince me of the use case, I can add an option to turn on/off atomic polarization.

kouui commented 2 years ago

Sorry for the late replay!!

I agree with that "Atomic polarization is always there" so there is no need to do inversion without Hanle effect in general case. Actually we are trying to understand Hanle effect and Zeeman effect better by on/off Hanle effect in the synthesis mode, and also to see how Hanle effect affect the inversion of data in an active region (where Zeeman effect > Hanle effect).

In the fortran code hazel_py.f90, I found the parameter fixed(index)%use_atomic_pol = 1 and I changed this value to -1 to disable to anisotropy (according to SEE.f90 ). Is this the correct way to switch off Atomic polarization?

Thank you so much!

aasensio commented 2 years ago

Yes, you can build a version of hazel2 that does not use atomic polarization if you change this value to zero and recompile the code.