Source code :: Tomography - basic.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
##!/usr/bin/env python

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


<%
    import os
    from pygolem_lite.web import cat, emph, get_page_paths

    page_path, base_path, page  = get_page_paths(shot, page)

    #youtube = "tomography/youtube_url"
    correct = False

    tomo="tomography/"
    
    from pygolem_lite import Shot
    Data = Shot(shot)
%>


 <?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
 }

 ?>
 
<h2> Basic reconstruction </h2>

 <?php
  if (file_exists('tomography')) {
?>
    <img src='tomography/colors_1.png'><br/>
    <img src='tomography/colors_2.png'><br/>
    <img src='tomography/Detectors.png'><br/>
    <img src='tomography/g_profilX.png'><br/>
    <img src='tomography/g_profilY.png'><br/>
    <img src='tomography/profile.png'><br/>


  <?php
}

 if ( ! file_exists('tomo_working') ) {
     $plasma = ${Shot(shot)['plasma']};
     if ( $plasma == 1 ) {
         echo '<h2> Tomography not accessible</h2>';
     } else {
         echo '<h2>No plasma</h2>';
     }
 }

 if ( file_exists('tomo_working') && ! file_exists('tomography/')) {
      echo '<h2> Computing tomography, wait .... (max 10 min.)</h2>';
 }

 ?>
 

Navigation