radiasoft / rslaser_old

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

Fix #151: gain calc option for each propagator #153

Closed gurhar1133 closed 1 year ago

gurhar1133 commented 1 year ago

Now there's an optional keyword param calc_gain that when passed to propagate will determine if calc gain is applied

def propagate(self, laser_pulse, prop_type, calc_gain=False):

_propagate_gain_test() will calculate gain regardless of value of param calc_gain however (is this what we want?) @bruhwiler @k-wolfinger ?

k-wolfinger commented 1 year ago

Since we can now chose to calculate the gain with any of the propagators (n0n2_srw, n0n2_lct, abcd_lct), we do not need the _propagate_gain_test() any more @gurhar1133

bruhwiler commented 1 year ago

@k-wolfinger --

k-wolfinger commented 1 year ago

@k-wolfinger --

  • please take the lead on reviewing this PR
  • it would be good to allow for gain-only simulations, with a null operator for wavefront propagation

@bruhwiler Will do.

So @gurhar1133 we need the option to calculate the gain without propagating. Why don't we repurpose _propagate_gain_test() so it only iterates through the laser slices while calling self.calc_gain(). And change the name from gain_test to gain_calculation or something like that. We can chat on slack if you need more clarification

k-wolfinger commented 1 year ago

@gurhar1133 I looked over the code, and the Crystal class propagate function still needs to be updated

gurhar1133 commented 1 year ago

@gurhar1133 I looked over the code, and the Crystal class propagate function still needs to be updated

Oops, sorry about that