Skip to content
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

fix plotting tool for numerical heating #2697

Conversation

psychocoderHPC
Copy link
Member

fix: #2687

The field energy is ignored/not used in the tool plotNumericalHeating.
This results into a wrong heating plot.

  • add usage of fields_energy.dat
  • fix documentation

The field energy is ignored/not used in the tool `plotNumericalHeating`.
This results into a wrong heating plot.

- add usage of `fields_energy.dat`
- fix documentation
@psychocoderHPC psychocoderHPC added component: tools scripts, python libs and CMake affects latest release a bug that affects the latest stable release labels Sep 3, 2018
Copy link
Member

@PrometheusPi PrometheusPi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix looks good to me. Thank you @psychocoderHPC.

@@ -119,7 +119,7 @@ for sim in directories:
mydir = sim+simDir
# get relevant files with energy
files = [f for f in os.listdir(mydir)
if os.path.isfile(os.path.join(mydir, f)) and re.search('^.*_energy_all.dat', f)]
if os.path.isfile(os.path.join(mydir, f)) and (re.search('^.*_energy_all.dat', f) or re.search('^.fields_energy.dat', f))]
# check if file list is empty
if len(files) == 0:
sys.exit("There were no energy files in \"{}\".".format(mydir))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should also at least print a warning of the field energy is missing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in the case where I will only plot the lose of energy of an moving particle species (maybe one particle) it is not needed.
A suggestion is to rename this to something like plotGlobalHeating and enforce at least one particle species and the field energy.

Copy link
Member

@ax3l ax3l Sep 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we should just restructure this tool as we do with other plugin post-processing scripts into lib/python/picongpu/: a module for data loading and two plot interfaces, one for actual "simulation heating" and another for simple plots of contained energy in specific species, fields, etc.

@ax3l ax3l merged commit 0d7ad0c into ComputationalRadiationPhysics:dev Sep 4, 2018
@psychocoderHPC psychocoderHPC deleted the fix-plotNumericalHeating branch September 4, 2018 08:04
@ax3l ax3l mentioned this pull request Sep 4, 2018
8 tasks
psychocoderHPC added a commit to psychocoderHPC/picongpu that referenced this pull request Aug 10, 2020
The tool should be fixed with ComputationalRadiationPhysics#2697 but because of wrong regex the tool
is still broken.
psychocoderHPC added a commit to psychocoderHPC/picongpu that referenced this pull request Aug 10, 2020
The tool should be fixed with ComputationalRadiationPhysics#2697 but because of wrong regex the tool
is still broken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects latest release a bug that affects the latest stable release component: tools scripts, python libs and CMake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants