added the prepareLasyLaser module to the python utilities - #5623
Conversation
7f23b0e to
7604e07
Compare
|
Wow, soething went wrong. I did not intend for this to happen like that. |
|
@Ehtyar The CI created changed on your PR. Please see log. It also tells you how to fix your code. |
685b9f8 to
c5c10ae
Compare
|
@PrometheusPi The plan is to push it to mainline, as soon as it is good enough for it. |
|
Please review now. I have fixed the bugs and added a test suite for this module. |
|
@Ehtyar There is still a previous review of your code from me pending that has not yet been included (manly question and typos). Could you incorporate these suggestions before a have another look at it please? |
PrometheusPi
left a comment
There was a problem hiding this comment.
sorry @Ehtyar I never pushed my suggesting.
There was a problem hiding this comment.
@psychocoderHPC @ikbuibui What are current rules on adding *.ipynbfiles?
prepareLasyLaser is a python module with which it is possible to write openPMD-compatible files from Lasy laser objects, that the FromOpenPMDPulse incident field method in PIConGPU can read. prepareLasyLaser_example.ipynb provides an example of how to use it. I also added a line in the relevant docs document.
Because the __init__.py in the directory lib/python/picongpu/extra/input/ was empty, the modules there were not available in the picongpu python package. Now they are properly imported. For this, lasy was added to the package dependencies.
…lso moved the test suite for it to the test folder and fixed it as well.
| return dV[:, None] | ||
|
|
||
|
|
||
| def normalize_energy(dim, field, energy, Nt=None): |
There was a problem hiding this comment.
Why is this function called normalize - doesn't it rescale to a given energy?
There was a problem hiding this comment.
Thats fair, I just followed the naming of the Lasy function for the same purpose.
What would be a better name?
There was a problem hiding this comment.
is this better, scale_to_energy?
…ng.assert_allclose now and improving readability.
| if tqdm_available: | ||
| pbar.update(1) | ||
| else: | ||
| if ix % 20 == 19: |
There was a problem hiding this comment.
Why did you use this strange module check?
There was a problem hiding this comment.
Ah, tqdm is not currently a dependency of the picongpu package. I can add it to the dependencies, but it is not really necessary, it just makes it prettier. That is why I also added the option to just use print.
prepareLasyLaser is a python module with which it is possible to write openPMD-compatible files from Lasy laser objects, that the FromOpenPMDPulse incident field method in PIConGPU can read. prepareLasyLaser_example.ipynb provides an example of how to use it. I also added a line in the relevant docs document.