...
Code Block |
---|
shell> idsdump $USER test 3 9999 2 equilibrium class equilibrium Attribute ids_properties class ids_properties Attribute comment: Attribute homogeneous_time: 1 Attribute source: Attribute provider: Attribute creation_date: [.......] Attribute code class code Attribute name: 12 34 56 78 90 Attribute commit: 12 34 56 78 90 Attribute version: 12 34 56 78 90 Attribute repository: 12 34 56 78 90 Attribute parameters: 12 34 56 78 90 Attribute output_flag [-819925519 678927020 358961885 263985221 -518535735 -656888240 885898039 -949201251 187087431 189678740 306846126 536940120 -842545485 -121858537 -867824798 103609281 -986039164 -761981263 -444948662 -178414734 91809633 -65221224 575637439 -526052305] Attribute time [ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24.] |
06.1.3.2 Dumping an IDS node
Getting a subset of an IDS enables reading only a node (and its descendants if the node is a structure), making the GET operation much faster. To retrieve only requested node one should call the script idsdumppath
.
Path syntax: The path to requested node(s) is separated by slashes (“/path/to/node(s)”). Nodes representing arrays must contain indexes (“/path/to/array(idx)/field”) or “Fortran style” indices (“path/to/array(x:y)/field”) Limitation: In case of nested AoS, it is not allowed to specify set of indices for AoS ancestors. Only given values of AoS ancestors indices are handled: (e.g. “field/with/ancestorAoS(x:y)/field/AoS(n :m)” is not managed) Data query examples: “flux_loop(1)/flux/data(1:5)” “bpol_probe(2:3)/field/data” “loop(:)/current” “time(4:-1)” “profiles_1d(2)/grid/rho_tor_norm(2:4)” “ids_properties” occurrence is a number indicating the occurrence of the target IDS in the Data Entry
Code Block |
---|
idsdumppath
Usage: idsdumppath <USER> <TOKAMAK> <VERSION> <SHOT> <RUN> <IDS> <DATA_PATH> |
Path syntax:
- The path to requested node(s) is separated by slashes (“/path/to/node(s)”).
- Nodes representing arrays must contain indexes (“/path/to/array(idx)/field”) or “Fortran style” indices (“path/to/array(x:y)/field”)
- Limitation: In case of nested arrays, it is not allowed to specify set of indices for AoS ancestors. Only given values of AoS ancestors indices are handled: (e.g. “field/with/ancestorAoS(x:y)/field/AoS(n :m)” is not managed)
Data query examples:
- “flux_loop(1)/flux/data(1:5)”
- “bpol_probe(2:3)/field/data”
- “loop(:)/current”
- “time(4:-1)”
- “profiles_1d(2)/grid/rho_tor_norm(2:4)”
Code Block |
---|
shell> idsdumppath $USER test 3 9999 2 equilibrium "code"
Type: <class 'imas_3_24_0_ual_4_2_0.equilibrium.code__structure'>
----------------------------------------------
----------------------------------------------
class code
Attribute name: 12 34 56 78 90
Attribute commit: 12 34 56 78 90
Attribute version: 12 34 56 78 90
Attribute repository: 12 34 56 78 90
Attribute parameters: 12 34 56 78 90
Attribute output_flag
[-819925519 678927020 358961885 263985221 -518535735 -656888240
885898039 -949201251 187087431 189678740 306846126 536940120
-842545485 -121858537 -867824798 103609281 -986039164 -761981263
-444948662 -178414734 91809633 -65221224 575637439 -526052305]
|
Code Block |
---|
shell> idsdumppath $USER test 3 9999 2 equilibrium "code/output_flag(0)"
Type: <class 'numpy.int32'>
----------------------------------------------
----------------------------------------------
-819925519
|
06.1.3.3 Copying database files directly
...
Code Block |
---|
# change directory in your $HOME
cd $HOME/public/imasdb/test/3/0/
# copy data files (pay attention to *_dot_* at the end of command line!)
cp ~michalo/public/imasdb/test/3/0/ids_120002.* .
cp ~michalo/public/imasdb/test/3/0/ids_130003.* . |
...
. |