...
Acessing data from commandline (bartek palak)
Listing pulse files
Info | ||
---|---|---|
| ||
Usage: imasdbs [OPTIONS] [COMMAND] This program lists existing databases. Possible commands are: list <shot number>- list existing databases slices <shot number> <run number> - list existing databases, including number of timeslices and time range for time-dependent IDSes times <shot number> <run number> - list existing databases, including number of timeslices their time points for time-dependent IDSes tokamak - list existing tokamaks (with data versions) dataversion - list existing dataversions (with tokamaks) If the optional arguments shot number and run number are given, only databases with these numbers will be shown. If no command is given, the list command is performed. To see databases stored in the public database, use 'public' as the user name. Options: -h, --help show this help message and exit -u USER, --user=USER Show databases of specified user -t TOKAMAK, --tokamak=TOKAMAK Show only databases for specified tokamaks -v VERSION, --version=VERSION Show only databases for specified data version --backend=BACKEND Show databases written with given backend(s). Comma- separated list of backends (Currently supported: mdsplus, hdf5). By default all backends are shown. -c, --compact Compact/reduced output |
|
|
Dumping pulse files
To list the content (all data) of an IDS, use idsdump
script
|
|
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 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)”
|
|
Copying database files directly
In case you know user name, machine name, shot number and run number, you can import users' database files copying them directly from the users' public directories. Database files are located inside:
|
Take a look at the example below. We will copy data from user michalo, machine test, shot: 12 and run: 2
|
Adapting user code into IMAS - 22.09
...