Source code :: Spectrometer.php

[Return]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
##!/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'])}

Navigation