##!/usr/bin/python2 ## -*- coding: utf-8 -*- <%page args="shot, page, default_path"/> <% from pygolem_lite import Shot from pygolem_lite.config import TororoidalMagneticFieldTrigger, TororoidalMagneticFieldCapacitor, CurrentDriveElectricFieldCapacitor, StabilizationCapacitor, BreakDownElectricFieldCapacitor from pygolem_lite.web import emph, cat, get_page_paths import datetime, cStringIO page_path, base_path, page = get_page_paths(shot, page, default_path) %>

Main authors of this web:

Michal Odstrcil
Tomas Odstrcil
Ondrej Grover

Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT- ED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Basic rules:

FAQ:

Pygolem web interface

See ${emph('Python/Matlab/IDL interface in our wiki')}. If you need to download data from many shots, the simplest way is to use pygolem web interface: http://golem.fjfi.cvut.cz/utils/data/${Shot}/loop_voltage . Names of the diagnostics are shown in Data page and you can either use the links provided by the Data page or if you prefer another data formats use following syntax
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/_.' | h}
supported formats are
None Ordinary TAB separated ASCII format
.txt Ordinary TAB separated ASCII format
.gzZip compressed ordinary TAB separated ASCII format
.csvComma / semicolon separated ASCII values
.npy Standard python binary data
.npz Compressed python binary data (see python interface)
.matMatlab binary data (see matlab interface)
.xlsExcel 97 format
imageSupported formats: png, svg, svgz
.proIDL - not supported, use .mat files (load_mat.pro), (see IDL interface )
for the ASCII formats you can select if you prefer dots/commas decimal separators
_dp Dots point separators, selected as default !!
_cpComma points separator
Examples:
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage'} - returns simple ASCII data
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage.npz'} - returns compressed loop voltage data
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage_cp.csv'} - comma separated csv - ${emph("czech excel")}
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage.xls'} - ${emph("Excel/OO Calc/Gnumeric")}

${emph('See more details in our wiki')}

Add new page

Load data in your page

use code i.e for loop voltage
from pygolem_lite import Shot
tvec, data  = Shot()['loop_voltage']
and you will download data for shot number where is currently placed your script otherwise use
from pygolem_lite import Shot
tvec, data  = Shot(${shot})['loop_voltage']
if you want to download data from DAS "nistandard":
tvec, data  = Shot(${shot})['nistandard']
if you need only one channel you can use either number or channel id
tvec, data  = Shot(${shot})['nistandard', 0]
tvec, data  = Shot(${shot})['nistandard', 'uloop']
full list of accesible signal is in ${base_path}/Data.php
Is is also possible to use wget and pygolem web interface.

Generate an icon for your analysis/diagnostics on the Home page

You should generate an image with width = 150px and height ~ 100px in your folder and name it icon.png You can either use simple bash command and convert your plot to the small size
convert -resize 150x120\! your_plot.png icon.png
or if you use Python
import os
os.system('convert -resize 150x120\! your_plot.png icon.png')
and finally if you used pygolem plot interface you can create a small plot
paralel_multiplot(data, "" , 'icon', (4,3), 40)
##

TODO:

##<% params = cat(page_path + '/TODO.txt', return_array = True) %> ##% for line in params: ##
  • ${line}
  • ## % endfor

    Comments