Store fida photons in Spectra
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position of neutral in beam grid coordinates |
|
real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocitiy of neutral [cm/s] |
|
real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
||
integer, | intent(in), | optional | :: | orbit_class | Orbit class ID |
|
logical, | intent(in), | optional | :: | passive | Indicates whether photon is passive FIDA |
subroutine store_fida_photons(pos, vi, lambda0, photons, orbit_class, passive)
!+ Store fida photons in [[libfida:spectra]]
real(Float64), dimension(3), intent(in) :: pos
!+ Position of neutral in beam grid coordinates
real(Float64), dimension(3), intent(in) :: vi
!+ Velocitiy of neutral [cm/s]
real(Float64), intent(in) :: lambda0
!+ Reference wavelength [nm]
real(Float64), intent(in) :: photons
!+ Photons from [[libfida:colrad]] [Ph/(s*cm^3)]
integer, intent(in), optional :: orbit_class
!+ Orbit class ID
logical, intent(in), optional :: passive
!+ Indicates whether photon is passive FIDA
integer :: iclass = 1
logical :: pas = .False.
type(LOSinters) :: inter
if(present(orbit_class)) then
iclass = min(orbit_class,particles%nclass)
endif
if(present(passive)) pas = passive
if(pas) then
call store_photons(pos, vi, lambda0, photons, spec%pfida(:,:,:,iclass), spec%pfidastokes(:,:,:,:,iclass), passive=.True.)
else
call store_photons(pos, vi, lambda0, photons, spec%fida(:,:,:,iclass),spec%fidastokes(:,:,:,:,iclass))
endif
end subroutine store_fida_photons