-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix plotting tool for numerical heating #2697
Conversation
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
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.
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)) |
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.
I wonder if we should also at least print a warning of the field energy is missing.
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.
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.
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.
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.
The tool should be fixed with ComputationalRadiationPhysics#2697 but because of wrong regex the tool is still broken.
The tool should be fixed with ComputationalRadiationPhysics#2697 but because of wrong regex the tool is still broken.
fix: #2687
The field energy is ignored/not used in the tool
plotNumericalHeating
.This results into a wrong heating plot.
fields_energy.dat