Closed moellep closed 1 year ago
@k-wolfinger -- please have a look. It would be worth checking the other prop_type methods as well.
Also, we should check for n2<0 and throw an exception in that case.
_propagate_n0n2_lct
is fine_propagate_abcd_lct
is fine_propagate_n0n2_srw
:
srwlib.srwl.PropagElecField(thisSlice.wfr, optBL)
a levelTesting changes and adding a check for n2<0 now
Added check for n2<0 and tested changes. Tests all passing.
https://github.com/radiasoft/rslaser/blob/7edbf2888c24272ac1eba3d06a10eeeba9b521bc/rslaser/optics/crystal.py#L431
In
crystal.py _propagate_n0n2_srw()
if n2 is 0, it creates an optBL container structure, but then does nothing with it. It looks like the call tosrwlib.srwl.PropagElecField(thisSlice.wfr, optBL)
should be out-dented a level so the optBL is propagated for all values of n2.