Conversation
added 4 commits
February 20, 2020 09:58
…le and --output_file
Codecov Report
@@ Coverage Diff @@
## devel #352 +/- ##
==========================================
- Coverage 39.64% 39.32% -0.32%
==========================================
Files 81 83 +2
Lines 24363 24536 +173
==========================================
- Hits 9659 9650 -9
- Misses 14704 14886 +182
Continue to review full report at Codecov.
|
lasofivec
approved these changes
Feb 21, 2020
Collaborator
|
Thank you for the detailed message !
PS: I didn't deleted the branch |
Member
Author
|
Yep, it happens that there are NaNs, this is from IMAS data, so it depends on what is stored in IMAS |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivations:
Main changes:
_mat2ids2calc.pyhas been created in sub-packagetofu/imas2tofu/to handle reading from the mat file, asusming its structure mimics the ids_core_profiles_(all other data is taken from the main ids: diag geometry, equilibrium...)input_fileandoutput_filehave been adde to generic functiontofu.utils.calc_from_imas()so the user can specify the file for input and, optionally, a mat file where the synthetic signal will be saved.tofucalc.pyfor easy use from matlab or bashtofu/imas2tofu/_def.pyand updates to the shortcuts themselvestofu/data/_physics.pymoved one step up totofu/_physics.pyExample (IRFM intra only, on the proper git branch):
In the example below, tofu loads 4 ids from IMAS (the diagnostic to get the geometry, the equilibrium for 2D interpolation, the wall for the geometry and pulse_schedule which is always loaded by default).
It loads the 1d core profiles directly from the provided input_file
After a summary and some harmless warnings, we get a message confirming the synthetic data was successfully saved in the desired .mat file.
Pro tip: if --output_file is not provided, tofu plots the result in an interactive figure for visualization