radiasoft / rslaser_old

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

#50 setting defaults on the objects #51

Closed gurhar1133 closed 2 years ago

gurhar1133 commented 2 years ago

LaserPulse, LaserPulseSlice and LaserCavity now have defaults set as a var on them. This variable is used in the input validation to fill in missing fields with default values. Tests and input validation have been updated accordingly

@robnagler or @moellep or @e-carlin suggestions for refactoring the .get_params() method for LaserPulseSlice are welcome.

bruhwiler commented 2 years ago

Please fix these broken scripts: ..../examples/single_pass/s2e.py ..../examples/cavity/simple_cavity.py

Please fix these broken Jupyter notebooks: ..../examples/notebooks/cavity/TestCavity.ipynb ..../examples/notebooks/cavity/TestCavityFull.ipynb ..../examples/notebooks/wavefront/WavefrontUnits.ipynb ..../examples/notebooks/diagnostics/LongitudinalEnvelope.ipynb ..../examples/notebooks/diagnostics/TransverseEnvelope.ipynb

Don't worry about other notebooks in ..../examples/notebooks/diagnostics/ because they've been updated in the main branch.

bruhwiler commented 2 years ago

We agreed to handle Notebook fixups outside of PRs. A separate issue will be created for this. The Notebook changes will be pushed directly to the main branch.

gurhar1133 commented 2 years ago

Reverted to commit prior to any notebook changes

gurhar1133 commented 2 years ago

Moved get_params to a generalized private function on a base class that LaserPulse and LaserPulseSlice inherit from

gurhar1133 commented 2 years ago

All changes made