You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make passive grid calls get_plasma_extrema for incorrect number of channels #290
If you want to calculate passive signal of NPA or FIDA only, it callest get_plasma_extrema with r0_arr and v0_arr of size spec_chords%nchan+npa_chords%nchan. The positions corresponding to diagnostic, that you did not want to count are strange numbers (usually 0, but also nan), leading to code freezing.
Suggested solution:
call get_plasma_extrema with positions of considered diagnostics only:
!! Next consider passive diagnostic extrema relative to the plasma
if((inputs%calc_pfida.gt.0).and.(inputs%calc_pnpa.gt.0)) then
do i=1,(spec_chords%nchan)
r0_arr(:,i) = spec_chords%los(i)%lens_uvw
v0_arr(:,i) = spec_chords%los(i)%axis_uvw
enddo
do i=1, npa_chords%nchan
call xyz_to_uvw(npa_chords%det(i)%detector%origin, r0_arr(:,i+spec_chords%nchan))
xyz_axis = npa_chords%det(i)%detector%basis
v0_arr(:,i+spec_chords%nchan) = matmul(beam_grid%basis, xyz_axis(:,3))
enddo
call get_plasma_extrema(r0_arr,v0_arr,extrema,xarr_beam_grid,yarr_beam_grid)
else if(inputs%calc_pfida.gt.0) then
do i=1, spec_chords%nchan
r0_arr(:,i) = spec_chords%los(i)%lens_uvw
v0_arr(:,i) = spec_chords%los(i)%axis_uvw
enddo
call get_plasma_extrema(r0_arr(:,:spec_chords%nchan),v0_arr(:,:spec_chords%nchan),extrema,xarr_beam_grid,yarr_beam_grid)
else !pnpa>=1 case
do i=1, npa_chords%nchan
call xyz_to_uvw(npa_chords%det(i)%detector%origin, r0_arr(:,i))
xyz_axis = npa_chords%det(i)%detector%basis
v0_arr(:,i) = matmul(beam_grid%basis, xyz_axis(:,3))
enddo
call get_plasma_extrema(r0_arr(:,:npa_chords%nchan),v0_arr(:,:npa_chords%nchan),extrema,xarr_beam_grid,yarr_beam_grid)
endif
Activity