[Issue335] description_2d propagated and set to 1 by default#336
[Issue335] description_2d propagated and set to 1 by default#336
Conversation
…_Data(), and set to 1 when possible by default
…(), to_Cam(), to_Data() and calc_signal()
| description_2d=None, mobile=None, plot=True): | ||
| """ Export the content of wall ids as a tofu Config object | ||
|
|
||
| Choose the occurence (occ), and index (description_2d, cf. dd_doc) to |
There was a problem hiding this comment.
It is an IMAS-specific documentation
Users of IMAS will know it, others won't, but anyway, this sub-package imas2tofu is to be used by IMAS users only, so they will know ;-)
Basically, to get the documentation on IMAS on the ITER clusters for example, you typically type dd_doc in a terminal (with the ritgh modules pre-loaded), and a web browser opens ndirectly on an IMAS documentation page
| plot_sig: None / str | ||
| shortcut of the signal to be plotted, if any | ||
| plot_X: None / str | ||
| shortcut of the abscissa against which to plot the signal, if any |
There was a problem hiding this comment.
what does shortcut means here ?
There was a problem hiding this comment.
All data fields can be accessed by shortcuts, they are available via the method get_shortcuts() that displays them all, ordered by ids and signal.
For example:
In [1]: import tofu as tf
/Home/DV226270/ToFu_All/tofu_git/tofu/tofu/imas2tofu/__init__.py:83: UserWarning:
You do not seem to be using the latest IMAS version:
'module list' vs 'module av IMAS' suggests:
- Current version: 3.23.1-4.0.3
- Latest version : 3.25.0-4.4.0
warnings.warn(msg)
/Home/DV226270/ToFu_All/tofu_git/tofu/tofu/__init__.py:95: UserWarning:
The following subpackages are not available:
- tofu.mag
=> see print(tofu.dsub[<subpackage>]) for details.
warnings.warn(msg)
In [2]: multi = tf.imas2tofu.MultiIDSLoader(ids=['bolometer'], shot=55983, synthdiag=True)
Getting ids [occ] tokamak user version shot run refshot refrun
-------------- ----- ------- ----------- ------- ----- --- ------- ------
bolometer [0] west imas_public 3 55983 0 -1 -1
core_sources [0] " " " " " " "
equilibrium [0] " " " " " " "
ual_begin_arraystruct_action: %TREE-W-NNF, Node Not Found (ual_lowlevel.cpp:719)
=> failed !
pulse_schedule [0] " " " " " " "
wall [0] " " " " " " "
/Home/DV226270/ToFu_All/tofu_git/tofu/tofu/imas2tofu/_core.py:1200: UserWarning: ERROR: ual_begin_arraystruct_action failed for "grids_ggd"
warnings.warn(str(err))
In [3]: multi.get_shortcuts()
ids shortcut long version
-------------- ------------ -------------------------------------------------------------------------
bolometer etendue channel[chan].etendue
bolometer los_pt1Phi channel[chan].line_of_sight.first_point.phi
bolometer los_pt1R channel[chan].line_of_sight.first_point.r
bolometer los_pt1Z channel[chan].line_of_sight.first_point.z
bolometer los_pt2Phi channel[chan].line_of_sight.second_point.phi
bolometer los_pt2R channel[chan].line_of_sight.second_point.r
bolometer los_pt2Z channel[chan].line_of_sight.second_point.z
bolometer los_ptsRZPhi f( los_pt1R, los_pt1Z, los_pt1Phi, los_pt2R, los_pt2Z, los_pt2Phi )
bolometer names channel[chan].name
bolometer power channel[chan].power.data
bolometer prad power_radiated_total
bolometer pradbulk power_radiated_inside_lcfs
bolometer t channel[chan].power.time
bolometer tpower time
core_sources 1dbrem source[identifier.name=bremsstrahlung].profiles_1d[time].electrons.energy
core_sources 1dline source[identifier.name=lineradiation].profiles_1d[time].electrons.energy
core_sources 1dprad f( 1dbrem, 1dline )
core_sources 1dpsi source[identifier.name=lineradiation].profiles_1d[time].grid.psi
core_sources 1drhopn f( 1dpsi )
core_sources 1drhotn source[identifier.name=lineradiation].profiles_1d[time].grid.rho_tor_norm
core_sources t time
equilibrium 1djT time_slice[time].profiles_1d.j_tor
equilibrium 1dpe time_slice[time].profiles_1d.pressure
equilibrium 1dphi time_slice[time].profiles_1d.phi
equilibrium 1dpsi time_slice[time].profiles_1d.psi
equilibrium 1dq time_slice[time].profiles_1d.q
equilibrium 1drhopn f( 1dpsi, psiaxis, psisep )
equilibrium 1drhotn time_slice[time].profiles_1d.rho_tor_norm
equilibrium 2dB f( 2dBT, 2dBR, 2dBZ )
equilibrium 2dBR time_slice[time].ggd[0].b_field_r[0].values
equilibrium 2dBT time_slice[time].ggd[0].b_field_tor[0].values
equilibrium 2dBZ time_slice[time].ggd[0].b_field_z[0].values
equilibrium 2djT time_slice[time].ggd[0].j_tor[0].values
equilibrium 2dmeshFaces grids_ggd[0].grid[0].space[0].objects_per_dimension[2].object[].nodes
equilibrium 2dmeshNodes grids_ggd[0].grid[0].space[0].objects_per_dimension[0].object[].geometry
equilibrium 2dmeshR time_slice[0].profiles_2d[0].r
equilibrium 2dmeshZ time_slice[0].profiles_2d[0].z
equilibrium 2dphi time_slice[time].ggd[0].phi[0].values
equilibrium 2dpsi time_slice[time].ggd[0].psi[0].values
equilibrium 2drhopn f( 2dpsi, psiaxis, psisep )
equilibrium 2drhotn f( 2dphi )
equilibrium 2dtheta f( axR, axZ, 2dmeshNodes )
equilibrium BT0 time_slice[time].global_quantities.magnetic_axis.b_field_tor
equilibrium ax f( axR, axZ )
equilibrium axR time_slice[time].global_quantities.magnetic_axis.r
equilibrium axZ time_slice[time].global_quantities.magnetic_axis.z
equilibrium ip time_slice[time].global_quantities.ip
equilibrium psiaxis time_slice[time].global_quantities.psi_axis
equilibrium psisep time_slice[time].global_quantities.psi_boundary
equilibrium q0 time_slice[time].global_quantities.q_axis
equilibrium q95 time_slice[time].global_quantities.q_95
equilibrium qmin time_slice[time].global_quantities.q_min.value
equilibrium sep f( sepR, sepZ )
equilibrium sepR time_slice[time].boundary_separatrix.outline.r
equilibrium sepZ time_slice[time].boundary_separatrix.outline.z
equilibrium strike0 f( strike0R, strike0Z )
equilibrium strike0R time_slice[time].boundary.strike_point[0].r
equilibrium strike0Z time_slice[time].boundary.strike_point[0].z
equilibrium strike1 f( strike1R, strike1Z )
equilibrium strike1R time_slice[time].boundary.strike_point[1].r
equilibrium strike1Z time_slice[time].boundary.strike_point[1].z
equilibrium t time
equilibrium volume time_slice[time].global_quantities.volume
equilibrium x0 f( x0R, x0Z )
equilibrium x0R time_slice[time].boundary.x_point[0].r
equilibrium x0Z time_slice[time].boundary.x_point[0].z
equilibrium x1 f( x1R, x1Z )
equilibrium x1R time_slice[time].boundary.x_point[1].r
equilibrium x1Z time_slice[time].boundary.x_point[1].z
pulse_schedule events f( events_names, events_times )
pulse_schedule events_names event[].identifier
pulse_schedule events_times event[].time_stamp
wall wall f( wallR, wallZ )
wall wallR description_2d[0].limiter.unit[0].outline.r
wall wallZ description_2d[0].limiter.unit[0].outline.z
There was a problem hiding this comment.
I implemented this because accessing data in an IMAS ids can be cumbersome since the path to it can be long and not always intuitive.
So each long path has a shortcut.
Most are predefined but the user can customize them if he wants to define his/her own shortcuts. Koyo did it for example in issue #218
There was a problem hiding this comment.
ok, I imagined it was this but I rather keep a record of the answer. Plus I didn't know shortcuts were also for the abscissa for example
Codecov Report
@@ Coverage Diff @@
## devel #336 +/- ##
==========================================
- Coverage 40.02% 40.02% -0.01%
==========================================
Files 79 79
Lines 24132 24134 +2
==========================================
Hits 9659 9659
- Misses 14473 14475 +2
Continue to review full report at Codecov.
|
Main changes:
Example (on IRFM Intra only):
Issues:
Fixes, in devel, Issue #335