Data Processing (GOLEM like)
Simple web interface
Try our simple web interface [link]. It allows plotting and data downloading [examples]
WGET
To download the whole discharge directory, it is possible to use
To download only one diagnostic use
List of all available signals Data. More details about web interface are here
PyGolem - python, matlab interface
See more details in Pygolem section. PyGolem supports python/matlab/html access.
Matlab - standalone
ShotNo=22471;
baseURL='http://golem.fjfi.cvut.cz/utils/data/';
identifier='loop_voltage';
%Create a path to data
dataURL=strcat(baseURL,int2str(ShotNo),'/',identifier);
% Write data from GOLEM server to a local file
urlwrite(dataURL,identifier);
% Load data
data = load(identifier, '\t');
% Plot and save the graph
plot(data(:,1)*1000, data(:,2), '.') ;
xlabel('Time [ms]')
ylabel('U_l [V]')
saveas(gcf, 'plot', 'jpeg');
exit;
Matlab - golem_data.m
A script for matlab that uses web interface to download data [link] . A simple example of use:
Download script on a linux computer
Simple example:
Plot one signal:
LIst of all diagnostic:
http://golem.fjfi.cvut.cz/shots/0/Data.php#all_data
Advanced example:
Plot signals with labels and errorbars:
[tvec,data,obj1] = golem_data(10689 , 'electron_temperature');
[~,~,obj2] = golem_data(10689 , 'spectrometr\temperature');
hold all
plot(tvec,data) % or use object: plot(obj1.tvec, obj1.data)
errorbar(obj2.tvec, obj2.data,obj2.data_err(:,1), obj2.data_err(:,2) )
xlabel(obj2.ax_labels(1,:))
ylabel(obj2.ax_labels(2,:))
legend({obj1.name, obj2.name})
axis([obj1.plasma_start, obj1.plasma_end, 0, inf])
title(obj1.info)
hold off
Python - standalone
import matplotlib.pyplot as plt
from numpy import loadtxt
from urllib import urlopen
baseURL = "http://golem.fjfi.cvut.cz/utils/data/"
ShotNo = 22471
identifier = "loop_voltage"
#Create a path to data
dataURL = urlopen(baseURL+ str(ShotNo) + '/' + identifier)
#Load data from GOLEM server
data=loadtxt(dataURL, delimiter='\t')
#Plot the graph
plt.plot(data[:,0], data[:,1], 'k-')
plt.savefig('graph.jpg')
plt.show()
Python - golem_data.py
A script for python that uses web interface to download data [link]. A simple example of use:
Download script on a linux computer
Simple example:
Plot one signal:
from golem_data import golem_data
obj = golem_data(10011, 'loop_voltage')
plot(obj.tvec,obj.data)
show()
LIst of all diagnostic:
http://golem.fjfi.cvut.cz/shots/0/Data.php#all_data
Plot evolution over a group of shots:
from golem_data import golem_data
for shot in range(10300, 10350):
plot(shot, golem_data(shot, 'pressure').data, 'b.')
show()
Advanced example:
Plot signals with labels and errorbars:
from golem_data import golem_data
obj1 = golem_data(10689 , 'electron_temperature')
obj2 = golem_data(10689 , 'spectrometr\\temperature')
plot(obj1.tvec,obj1.data, label=obj1.labels)
errorbar(obj2.tvec, obj2.data, xerr=obj2.tvec_err, yerr=[obj2.data_err[:,0], obj2.data_err[:,1]], label=obj2.labels )
xlabel(obj2.ax_labels[0])
ylabel(obj2.ax_labels[1])
legend([obj1.name, obj2.name])
axis([obj1.plasma_start, obj1.plasma_end, 0, None])
title(obj1.info)
show()
More tools:
download.py - script for fast downloading of raw data without calling pygolem web interface
data_mining - Script for fast local loading of scalar values from pygolem database.
Gnuplot - standalone
set macros;
ShotNo = "22471";
baseURL = "http://golem.fjfi.cvut.cz/utils/data/";
identifier = "loop_voltage";
#Create a path to data
DataURL= "@baseURL@ShotNo/@identifier";
#Write data from GOLEM server to a local file
!wget -q @DataURL;
#Plot the graph from a local file
set datafile separator "\t";
plotstyle = "with lines linestyle -1"
plot 'loop_voltage' using 1:2 @plotstyle;
exit;
Gnuplot and wget - from bash
IDL
There is no official support of IDL, recommended software is Matlab, Python
ShotNo=10601;
baseURL='golem.fjfi.cvut.cz/cgi-bin/data/';
diagn='loop_voltage';
;Create a path to data
dataURL=baseURL+STRTRIM(string(ShotNo),1)+'/'+diagn+'.csv';
filename=diagn+'_'+STRTRIM(string(ShotNo),1);
;Write data from GOLEM server to a local file
oUrl = OBJ_NEW('IDLnetUrl')
oUrl->SetProperty, URL_HOST = dataURL
fn = oUrl->Get(FILENAME=filename)
;Load data
data= read_ascii(filename,delimiter = ';')
;Plot the graph
plot,data.field1(0,*),data.field1(1,*)
;exit
Excel
Excel is not recommended, only tolerated. You can download Excel data from:
http://golem.fjfi.cvut.cz/utils/data/<shot number>/<identifier>.xls
but be patient, it can take long.
Note
Have you found any problem? Do you have some suggestion? We really appreciate your feedback, comments and suggestions. Thank you in advance. V. Sv.