radiasoft / rslaser_old

Integrated modeling of CPA crystal-based laser amplifiers
Apache License 2.0
1 stars 1 forks source link

_propagate_n0n2_srw() not calling PropagElecField() when n2 == 0 #159

Closed moellep closed 1 year ago

moellep commented 1 year ago

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 to srwlib.srwl.PropagElecField(thisSlice.wfr, optBL) should be out-dented a level so the optBL is propagated for all values of n2.

bruhwiler commented 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.

k-wolfinger commented 1 year ago

Testing changes and adding a check for n2<0 now

k-wolfinger commented 1 year ago

Added check for n2<0 and tested changes. Tests all passing.