Closed gardner-chris closed 3 years ago
I saw lambda_0=656.1 nm (the deuterium value) in your writeup. Does your code use the correct value for a hydrogen neutral?
I saw lambda_0=656.1 nm (the deuterium value) in your writeup. Does your code use the correct value for a hydrogen neutral?
I did not input a new value for the wavelength. The spectrum subroutine has "lambda0" as an input and I used that. I believe the values are set with "line_lambda0 = [ 656.28d0, 656.104d0, 656.045d0 ] " in the subroutine identify_transition.
I noticed your tests have a lot of repeated code. It would be a good idea to consolidate the tests into a single module. Also a little documentation for the tests is warranted.
Any updates when I can merge this in?
Any updates when I can merge this in?
Right now I am working on some corrections to the Lyman-Alpha stokes parameters and I still need to replace the do loops that you commented on. I'm nearly done with the corrections so it should be ready by the end of the week at the latest.
By the Way, I think this is ready to merge unless you have more suggestions.
The Travis CI is failing. Checkout the errors and see if you can fix them. https://travis-ci.org/github/D3DEnergetic/FIDASIM/builds/772793773
All right everything is passing now. I will merge this tomorrow unless you have anything further to add.
Attached is the report by @gardner-chris for this PR. stark_zeeman.pdf
I have added the effect of zeeman splitting to the calculation of the spectra in FIDASIM. An example below shows the result in a uniform 5T B-field on the spectrum on the half energy part of a 1keV beam(so 0.5keV). In magenta is the spectra calculated taking into account both the Stark and Zeeman effect. The black dashed line is the result of only considering the Stark effect.
I verified the accuracy of the wavelengths in fidasim for both cases by comparing the wavelengths of the peaks to values calculated in python for 5T, 0.5keV.
I also added the stokes parameters to the spectra outputs. I verified that they were calculated correctly by comparing the first stokes parameter, s0, to the intensity since they should be the same. An example half bes stokes parameters calculated using a uniform B=1T and e_inj=1keV is in the image below. I also note that s1 for the pi lines should be the negative of s0 as another check. Currently s2 and s3 are always zero but I left them in incase we ever need to add some effect that will somehow cause them to be nonzero in the future.
For details on the physics and derivations I also wrote this document: https://www.overleaf.com/read/nbwgnpfhsswb