-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readin from HiPACE-C files improved + conversion script #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for this PR! As discussed offline with @SeverinDiederichs let us not put the conversion Python script on the repo for now.
Just curious: why not add the script? Looks useful :) |
Yes, actually I am wondering now. I just have 2 elements in that direction:
But I don't have a strong opinion, sharing it on the repo just makes it easy to refer to, so that would be fine for me too (after adding a bit of documentation). Any opinion @SeverinDiederichs @ax3l @AlexanderSinn? |
I think we can ship it, it's not much "bloat" and if we don't need it anymore or refactor it in a lib we can always remove it later. |
Alright, let's keep it then. @AlexanderSinn @SeverinDiederichs could you then write a docstring at the beginning of the file, explain its capabilities, how to use it, the options, etc.? |
Ok, if we keep the file, I have to request further changes: Currently, the convert script only works, if a density is provided. However, for the case, where I want to use the HiPACE-C output file and convert it into a HiPACE++ file, where I would like to run in normalized units, too, I don't want to specify a density (as there was no original density). For this, the unitSI should be 1. You can test this with the HiPACE-C output file, which should be converted without specifying the density, and then running in normalized units in HiPACE++. (to run in SI units, one would need to specify the density). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks!
I will use the new features in production runs right away
HI @AlexanderSinn, thank you again for the great contributions to HiPACE++! 🚀 ✨ Just saw this in your commits: Please set the same primary e-mail on your local workstations from which you git config --global user.name NAME
git config --global user.email EMAIL@EXAMPLE.com Use the same Thank you! ✨ |
This PR introduces the necessary files to read in a beam from file from HiPACE-C, as well as the ability to read in beams from file for a given charge and plasma density, which was a commonly used feature in HiPACE-C for experimental simulations.
Check that all corner cases work:
python3 convert_hipace_to_hipace++_file.py raw_beam_file.h5
. They need to haveraw
in their name.For Hipace++ the
beam.plasma_density
parameter now doesn't need to be set if using a beam from either write_beam.py or convert_hipace_to_hipace++_file.py as it is automatically transferred via an attribute, however it can be overwritten.const
isconst
)