##!/usr/bin/python2
## -*- coding: utf-8 -*-
##""" CREATED: 7/2012
##AUTHOR: TOMAS ODSTRCIL
##"""
<%page args="shot, page"/>
<%
import os
from pygolem_lite.web import cat, emph, get_page_paths, make_image
page_path, base_path, page = get_page_paths(shot, page)
from pygolem_lite import Shot, saveconst
cData = Shot(shot)
%>
<?php
$par1 = "./data/spectra.txt";
$par2 = "./data/spectra.txt_Data_.txt";
if (file_exists($par2)){
$par = $par2;
}
else{
$par = $par1;
}
if (file_exists($par)) {
echo "<h3>Parameters:</h3><ul> ";
$fp = fopen($par, "r");
while(!feof($fp)) {
$data = fgets($fp, 1024);
if ($data == "Exact time stamps:\n")
break;
if ($data == "****************************************************************************************************\n")
break;
echo "<li>$data </li>";
}
fclose($fp);
echo "</ul>";
}
?>
<h3>Data <a href="ControlSoftware/SpectrometerControl.py">[Source] </a> </h3>
% if cData['plasma']:
<?php echo '<a href="'.$par.'"> Measured spectra </a><br>'; ?>
<a href="./data/spectra.txt_Resultes_full.csv"> All identified spectral lines </a><br>
## Graphs
${make_image( "data/spectra.txt_Graph_" , "Spectra")}
##${make_image( "data/spectra.txt_LinesEvolution_", "Lines Evolution (more reliable results are in Analysis/Impurities")}
% else:
<h3>No plasma</h3>
% endif
${Shot(shot).get_pygolem_list(['spectrometr:data'])}