Source code :: Homepage.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
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
##!/usr/bin/python2
## -*- coding: utf-8 -*-


##""" CREATED: 7/2012
    ##AUTHOR: MICHAL ODSTRCIL
##"""


<%page args="shot, page"/>

<%
    import os
    from pygolem_lite.web import cat, emph, get_page_paths, make_config
    page_path, base_path, page  = get_page_paths(shot, page)
    youtube = "tomography/youtube_url"

    from pygolem_lite import Shot, saveconst
    import random

%>



<a href="#original">Original image </a><br/>
<a href="#correct">Corrected image </a>



 <?php
 #$youtube = "tomography/youtube_url";
 #if (file_exists($youtube)) {
    #echo '<h2>Visible spectra tomography</h2>';
    #$fp = fopen($youtube, "r");
    #$url = fgets($fp, 1024);
    #echo "<iframe  width='480' height='390' src=$url frameborder='0' allowfullscreen></iframe>";
    #//http://www.youtube.com/embed/AiPHnA0k4v0
    #echo  ' <img src="schema_server.png" /> ';
 #}

 if (file_exists('tomography/video.avi')) {
 ?>
 <h2>Tomographic reconstruction  </h2>
 
 ##<a href="tomography/video.avi"> Show plasma animation </a>
 
<video  controls>
<source src="tomography/video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="tomography/video.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video><br/>


  <?php
  }
  
 #if (file_exists('tomography/SVD.png')) {
 ?>
 
     <h2>Color emissivity</h2>

    <img src='tomography/colors_1.png'>
    <img src='tomography/colors_2.png'><br/>
    
    
 ##<h2>Singular value decomposition</h2>
##<img src='tomography/SVD.png'><br/>

##<?php } ?>
 
% for camera in [1,2]:
    <?php
     if (file_exists("${ str(camera)+'/plasma_all.png' }"))  {
    ?>
	<h2>Camera ${camera} - time evolution</h2>
	##<h3>Parameters:</h3>
	
	##${make_config(page_path+'/'+str(camera)+'/parameters.txt')}

	<a id="corrected"><h3>Corrected image</h3></a>
	<img src='${camera}/CorrectedRGB.png?${random.randint(1,1e6)}'></img><br/>
	<a id="original"><h3>Original image</h3></a>
	<img src='${camera}/plasma_all.png?${random.randint(1,1e6)}'></img><br/>
	<%  correct = True %>

    <?php  } ?>
    
%endfor

 <?php
 if ( ! file_exists('1/') && ! file_exists('2/')) {
     $plasma = ${Shot(shot)['plasma']};
     if ( $plasma == 1 ) {
         echo '<h2>Camera failed </h2>';
     } else {
         echo '<h2>No plasma</h2>';
     }
 }
 ?>
 
 ${Shot(shot).get_pygolem_list(['camera:output_power_tomo', 'camera:position_horizontal_tomo', 'camera:position_vertical_tomo', 'camera:color_emiss_1', 'camera:color_emiss_2'])}

Navigation