##!/usr/bin/python2
## -*- coding: utf-8 -*-
<%page args="shot, page" />
<%
from pygolem_lite.modules import make_config, get_page_paths, make_image
from pygolem_lite import Shot
import re
page_path, base_path, page = get_page_paths(shot, page)
%>
<a href="main.py">[Source - main.py]</a><br/>
<a href="CMWT.py">[Source - CMWT.py]</a><br/>
<a href="SoundGenerator.py">[Source - SoundGenerator.py]</a><br/>
<h3>Magnetic islands detected from Magnetic Ring </h3>
%if not Shot().exist('niturbo'):
<h2> Missing NIturbo data </h2>
%else:
${make_image( "graphs/analyze.png" , "Poloidal mode number M ")}
<video width="60%" height="360" controls autoplay>
<source src="graphs/AnimCWT.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="graphs/AnimCWT.ogg" type='video/ogg; codecs="theora, vorbis"'>
<source src="graphs/AnimCWT.webm" type='video/webm; codecs="vp8.0, vorbis"'>
<object data="graphs/AnimCWT.mp4" width="60%" height="360">
<embed src="graphs/AnimCWT.mp4" width="60%" height="360">
</object>
<br/>
<br/>
<font color="red">Can't play video. Please Upgrade your browser.</font>
</video>
%for i in range(-8,8):
${make_image( "graphs/spectrogram"+str(i)+".png" , "Magnetic island of M = "+str(i))}
<?php
if (file_exists("${ "graphs/spectrogram"+str(i)+".png" }")) {
?>
<br/>
<object type="application/x-shockwave-flash" data="./player_mp3_maxi.swf" width="700" height="20" hspace="-10" >
<param name="movie" value="./player_mp3_maxi.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="mp3=./mp3/sound${str(i)}.mp3&width=700&height=20&showstop=1&showvolume=1" />
</object>
<?php
}
?>
<br/>
% endfor
%endif