Please load use matlab on hpc-app1.iter.org node:
ssh hpc-app1
module load imas/3.15.0 matlab/2013a
imasdb test
Table of Contents |
---|
Differences inside Matlab interface
Table of Contents |
---|
Below, we have collected commonly used operations related to CPOs/IDSes. You can compare both methods by looking at different implementations of similar operations.
...
import imasjava.imas
...
euitm_create('euitm', shot, run)
...
imas_create('ids', shot, run);
...
euitm_open('euitm', shot, run);
...
imas_open('ids', shot, run)
...
euitm_close(idx)
...
imas_close(idx)
...
CPO_gen('equilibrium', 100)
...
3.4.1. Creating pulse file
...
Code Block | ||
---|---|---|
| ||
>> import |
...
|
...
language | text |
---|
...
imasjava.imas
>> idx=imas_create('ids', 111, 11);
>> disp(idx)
0
>> |
3.4.2. Opening pulse file
...
Code Block | ||
---|---|---|
| ||
>> import |
...
|
...
language | text |
---|
...
imasjava.imas
>> idx=imas_open('ids', 111, 11);
>> disp(idx)
0
>> |
...
3.4.3. Closing pulse file
...
...
>> import_ual
>> idx=euitm_open('euitm', 111, 11);
>> disp(idx)
0
>> ret=euitm_close(idx)
ret =
0
>>
Code Block | ||
---|---|---|
| ||
>> import imasjava.imas
>> idx=imas_open('ids', 111, 11);
>> disp(idx)
0
>> ret=imas_close(idx)
ret =
0
>> |
3.4.4. Creation of
...
IDS
...
language | text |
---|
...
Code Block | ||
---|---|---|
| ||
>> eq=ids_gen('equilibrium')
eq =
ids_properties: [1x1 struct]
vacuum_toroidal_field: [1x1 struct]
time_slice: {[1x1 struct]}
code: [1x1 struct]
time: []
>> |
3.4.5. Saving
...
IDS
...
Code Block | ||
---|---|---|
| ||
>> import |
...
|
...
language | text |
---|
...
imasjava.*
>> idx=imas_create('ids',111,11);
>> eq=ids_gen('equilibrium');
>> eq.ids_properties.comment = 'This is a test IDS';
>> eq.ids_properties.homogeneous_time = 1
eq =
ids_properties: [1x1 struct]
vacuum_toroidal_field: [1x1 struct]
time_slice: {[1x1 struct]}
code: [1x1 struct]
time: []
>> eq.time = [1 2 3 4 5 6 7 8 9 10];
>> for i =1:10
eq.time_slice{i}.time = i;
end
>> ids_put(idx,'equilibrium',eq);
>> imas_close(idx);
>> |
3.4.6. Reading
...
IDS
...
language | text |
---|
...
Code Block | ||
---|---|---|
| ||
>> import imasjava.*
>> idx = imas_open('ids', 111, 11);
idx =
0
>> eq=ids_get(idx, 'equilibrium');
>> disp(eq.ids_properties);
comment: 'This is a test IDS'
homogeneous_time: 1
>> |