Commit 516e2d17f8cfc58c235ea719497f1ab1220e9eac

Authored by Marion Bandet
1 parent 5fde9a30
Exists in master

update WERA calibrations

Showing 45 changed files with 1791 additions and 147 deletions   Show diff stats
build/doctrees/Comparison_WERA-ADCP_Sept2013.doctree
No preview for this file type
build/doctrees/WERAcalibration.doctree
No preview for this file type
build/doctrees/calibration.doctree
No preview for this file type
build/doctrees/environment.pickle
No preview for this file type
build/html/WERAcalibration.html
1   -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2   - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3   -
4   -
5   -<html xmlns="http://www.w3.org/1999/xhtml">
6   - <head>
7   - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   -
9   - <title>WERA calibrations &mdash; documentation_HFR_analysis 0.0.1 documentation</title>
10   -
11   - <link rel="stylesheet" href="_static/default.css" type="text/css" />
12   - <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13   -
14   - <script type="text/javascript">
15   - var DOCUMENTATION_OPTIONS = {
16   - URL_ROOT: './',
17   - VERSION: '0.0.1',
18   - COLLAPSE_INDEX: false,
19   - FILE_SUFFIX: '.html',
20   - HAS_SOURCE: true
21   - };
22   - </script>
23   - <script type="text/javascript" src="_static/jquery.js"></script>
24   - <script type="text/javascript" src="_static/underscore.js"></script>
25   - <script type="text/javascript" src="_static/doctools.js"></script>
26   - <link rel="top" title="documentation_HFR_analysis 0.0.1 documentation" href="index.html" />
27   - <link rel="next" title="Comparison WERA and ADCP radial velocities September 2013" href="Comparison_WERA-ADCP_Sept2013.html" />
28   - <link rel="prev" title="WERA radial currents processing" href="WERAprocessing.html" />
29   - </head>
30   - <body>
31   - <div class="related">
32   - <h3>Navigation</h3>
33   - <ul>
34   - <li class="right" style="margin-right: 10px">
35   - <a href="genindex.html" title="General Index"
36   - accesskey="I">index</a></li>
37   - <li class="right" >
38   - <a href="Comparison_WERA-ADCP_Sept2013.html" title="Comparison WERA and ADCP radial velocities September 2013"
39   - accesskey="N">next</a> |</li>
40   - <li class="right" >
41   - <a href="WERAprocessing.html" title="WERA radial currents processing"
42   - accesskey="P">previous</a> |</li>
43   - <li><a href="index.html">documentation_HFR_analysis 0.0.1 documentation</a> &raquo;</li>
44   - </ul>
45   - </div>
46   -
47   - <div class="document">
48   - <div class="documentwrapper">
49   - <div class="bodywrapper">
50   - <div class="body">
  1 +
  2 +<!DOCTYPE html
  3 + PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  4 +<html><head>
  5 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6 + <!--
  7 +This HTML was auto-generated from MATLAB code.
  8 +To make changes, update the MATLAB code and republish this document.
  9 + --><title>WERAcalibration</title><meta name="generator" content="MATLAB 7.14"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2015-10-06"><meta name="DC.source" content="WERAcalibration.m"><style type="text/css">
  10 +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
  11 +
  12 +html { min-height:100%; margin-bottom:1px; }
  13 +html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
  14 +html body td { vertical-align:top; text-align:left; }
  15 +
  16 +h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
  17 +h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
  18 +h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }
  19 +
  20 +a { color:#005fce; text-decoration:none; }
  21 +a:hover { color:#005fce; text-decoration:underline; }
  22 +a:visited { color:#004aa0; text-decoration:none; }
  23 +
  24 +p { padding:0px; margin:0px 0px 20px; }
  25 +img { padding:0px; margin:0px 0px 20px; border:none; }
  26 +p img, pre img, tt img, li img { margin-bottom:0px; }
  27 +
  28 +ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
  29 +ul li { padding:0px; margin:0px 0px 7px 0px; }
  30 +ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
  31 +ul li ol li { list-style:decimal; }
  32 +ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
  33 +ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
  34 +ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
  35 +ol li ol li { list-style-type:lower-alpha; }
  36 +ol li ul { padding-top:7px; }
  37 +ol li ul li { list-style:square; }
  38 +
  39 +.content { font-size:1.2em; line-height:140%; padding: 20px; }
  40 +
  41 +pre, tt, code { font-size:12px; }
  42 +pre { margin:0px 0px 20px; }
  43 +pre.error { color:red; }
  44 +pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
  45 +pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
  46 +
  47 +@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }
  48 +
  49 +span.keyword { color:#0000FF }
  50 +span.comment { color:#228B22 }
  51 +span.string { color:#A020F0 }
  52 +span.untermstring { color:#B20000 }
  53 +span.syscmd { color:#B28C00 }
  54 +
  55 +.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
  56 +.footer p { margin:0px; }
  57 +
  58 + </style></head><body><div class="content"><h2>Contents</h2><div><ul><li><a href="#3">phases and time of calibration</a></li><li><a href="#4">separate between calibrations made with Helzel's system and Pierre's system</a></li><li><a href="#5">theoretical values</a></li></ul></div><pre class="codeinput">clear <span class="string">all</span>
  59 +close <span class="string">all</span>
  60 +
  61 +<span class="comment">%cd('/home/bandma01/Documents/WERAs/')</span>
  62 +cd(<span class="string">'/home/bandma01/hfr-data-processing/calibrations/'</span>)
  63 +
  64 +<span class="comment">% site = 'PAO';</span>
  65 +site = <span class="string">'PAB'</span>;
  66 +cd(site)
  67 +
  68 +<span class="comment">% system</span>
  69 +<span class="keyword">for</span> sys = 1:2
  70 +</pre><pre class="codeinput"> <span class="keyword">if</span> sys == 1
  71 + systm = <span class="string">'Helzel'</span>;
  72 + <span class="keyword">elseif</span> sys == 2
  73 + systm = <span class="string">'Flament'</span>;
  74 + <span class="keyword">end</span>
  75 +
  76 + clear <span class="string">J</span> <span class="string">I</span> <span class="string">E</span> <span class="string">Phase</span> <span class="string">calib_file</span> <span class="string">calib_hr</span> <span class="string">calib_jd</span> <span class="string">calib_min</span> <span class="string">calib_time</span> <span class="string">calib_value</span>
  77 + clear <span class="string">calib_year</span> <span class="string">d</span> <span class="string">data</span> <span class="string">delta_phase_obs</span> <span class="string">delta_phase_th</span> <span class="string">gps_data</span> <span class="string">index_timecalib</span>
  78 + clear <span class="string">theta_pairs</span>
  79 +
  80 + <span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  81 +
  82 + load(<span class="string">'HelzelPAO_Track_29-OCT-14 183138.mat'</span>)
  83 +
  84 + <span class="keyword">elseif</span> strcmp(site,<span class="string">'PAB'</span>) == 1
  85 +
  86 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  87 + load(<span class="string">'HelzelPAB_Track_30-OCT-14 175446.mat'</span>)
  88 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  89 + load(<span class="string">'FlamentPAB_Track_30-OCT-14 182008.mat'</span>)
  90 + <span class="keyword">end</span>
  91 +
  92 + <span class="keyword">end</span>
  93 +</pre><h2>phases and time of calibration<a name="3"></a></h2><pre class="codeinput"> <span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  94 + cd(<span class="string">'2014302'</span>)
  95 + <span class="keyword">elseif</span> strcmp(site,<span class="string">'PAB'</span>) == 1
  96 + cd(<span class="string">'2014303'</span>)
  97 + <span class="keyword">end</span>
  98 +
  99 + <span class="comment">% list files</span>
  100 + clear <span class="string">d</span>
  101 + d = dir(<span class="string">'*.mat'</span>); <span class="comment">% returns a structure with name, date, bytes, isdir, datenum</span>
  102 + Nfiles = length(d); <span class="comment">% nombre de fichiers a analyser</span>
  103 +
  104 +
  105 + <span class="comment">% look at the names of files and extract information</span>
  106 + <span class="keyword">for</span> c = 1:Nfiles
  107 + calib_year(c) = str2double(d(c).name(1:4));
  108 + calib_jd(c) = str2double(d(c).name(5:7));
  109 + calib_hr(c) = str2double(d(c).name(8:9));
  110 + calib_min(c) = str2double(d(c).name(10:11));
  111 +
  112 + load(d(c).name,<span class="string">'phase'</span>)
  113 +
  114 + Phase(:,c) = phase;
  115 + <span class="keyword">end</span>
  116 + clear <span class="string">phase</span>
  117 +
  118 + delta_phase_obs = modsym(diff(Phase,1),180);
  119 +
  120 + To = datenum(2014,01,01,0,0,0);
  121 +
  122 + <span class="comment">% add 20 sec to center calibration time</span>
  123 + calib_time = To + calib_jd -1 + calib_hr./24 + calib_min/24/60 + 20/24/3600;
  124 + <span class="comment">% datevec(calib_time)</span>
  125 +
  126 + <span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  127 + <span class="comment">% calib time 2min34sec late wrt GPS</span>
  128 + calib_time = calib_time + 2/24/60 + 34/24/3600;
  129 + <span class="keyword">end</span>
  130 +</pre><h2>separate between calibrations made with Helzel's system and Pierre's system<a name="4"></a></h2><p>date of new calibration files Helzel 2014-10-30 16:52 to 17:54 Flament 2014-10-30 17:55 to 18:20</p><pre class="codeinput"> T1 = datenum(2014,10,30,17,59,00);
  131 +
  132 +
  133 + clear <span class="string">J</span>
  134 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  135 + J = find(calib_time &gt; T1);
  136 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  137 + J = find(calib_time &gt; T1);
  138 + <span class="keyword">end</span>
  139 +
  140 + <span class="comment">%remove unwanted data to avoid confusion!</span>
  141 + calib_year(J)=[];
  142 + calib_jd(J)=[];
  143 + calib_hr(J)=[];
  144 + calib_min(J)=[];
  145 + Phase(:,J)=[];
  146 + delta_phase_obs(:,J)=[];
  147 + calib_time(J)=[];
  148 + d(J)=[];
  149 + clear <span class="string">c</span> <span class="string">Nfiles</span>
  150 +
  151 + <span class="comment">%+++++++++++++++++++++++++++++++++++++++++</span>
  152 + <span class="comment">% for each calibration file (series# 1)</span>
  153 + <span class="comment">%+++++++++++++++++++++++++++++++++++++++++</span>
  154 + <span class="keyword">for</span> calib_file = 1:length(calib_time)
  155 +
  156 + time_calib = calib_time(calib_file);
  157 +
  158 + <span class="comment">% find corresponding file in gps data</span>
  159 + clear <span class="string">I</span>
  160 + I = find(data(:,1) &gt; time_calib);
  161 + <span class="comment">% take closest point for now</span>
  162 + I = I(1);
  163 +
  164 + <span class="comment">% datevec(data(I,1))</span>
  165 + <span class="comment">% datevec(time_calib)</span>
  166 +
  167 + index_timecalib(calib_file) = I;
  168 + <span class="keyword">end</span>
  169 +
  170 + <span class="comment">% check</span>
  171 + <span class="comment">% datevec(data(index_timecalib,1))</span>
  172 +
  173 + <span class="comment">% isolate gps calibration data</span>
  174 + gps_data = data(index_timecalib,:); <span class="comment">% time lat lon</span>
  175 +
  176 + figure(1)
  177 + hold <span class="string">on</span>
  178 + h1=plot(gps_data(:,2),gps_data(:,3),<span class="string">'.'</span>);
  179 + grid <span class="string">on</span>
  180 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  181 + set(h1,<span class="string">'marker'</span>,<span class="string">'.'</span>,<span class="string">'color'</span>,<span class="string">'b'</span>)
  182 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  183 + set(h1,<span class="string">'marker'</span>,<span class="string">'x'</span>,<span class="string">'color'</span>,<span class="string">'k'</span>)
  184 + <span class="keyword">end</span>
  185 +
  186 + <span class="comment">% load antenna coordinates</span>
  187 + cd <span class="string">..</span>
  188 + load([site <span class="string">'_Rx_coords.mat'</span>])
  189 +
  190 + hold <span class="string">on</span>
  191 + plot(lon,lat,<span class="string">'x'</span>)
  192 + grid <span class="string">on</span>
  193 + title([<span class="string">'site = '</span> site ])
  194 +</pre><img vspace="5" hspace="5" src="WERAcalibration_01.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_16.png" alt=""> <h2>theoretical values<a name="5"></a></h2><p>wavelength</p><pre class="codeinput"> lambda = 3E8/16.15E6;
  195 +
  196 +
  197 + <span class="comment">% initialize variables</span>
  198 + theta_pairs = nan(11,length(gps_data));
  199 +
  200 + <span class="comment">% for each gps point</span>
  201 + <span class="keyword">for</span> pt = 1:length(gps_data)
  202 +
  203 + <span class="comment">% compute distance between GPS and antennas</span>
  204 + <span class="keyword">for</span> ant = 1:12
  205 + clear <span class="string">E</span> <span class="string">W</span>
  206 + [E,W] = lonlat2km(gps_data(pt,2),gps_data(pt,3),lon(ant),lat(ant));
  207 + ddist = sqrt(E.^2+W.^2);
  208 + r(ant) = ddist*1000; <span class="comment">%meters</span>
  209 + <span class="keyword">end</span>
  210 +
  211 +
  212 +
  213 + <span class="comment">%for each pair of antennas</span>
  214 + <span class="keyword">for</span> p = 1:11
  215 +
  216 + <span class="comment">%delta_r</span>
  217 + delta_r(p) = r(p+1) - r(p);
  218 +
  219 + <span class="comment">% theoretical phase</span>
  220 + delta_phase_th(p,pt) = modsym((delta_r(p)*360./lambda),180);
  221 +
  222 +
  223 + <span class="comment">% position of middle of pairs</span>
  224 + clear <span class="string">lon_mid</span> <span class="string">lat_mid</span>
  225 + lon_mid = (lon(p+1)+lon(p))/2;
  226 + lat_mid = (lat(p+1)+lat(p))/2;
  227 +
  228 + <span class="comment">% distance between middle of pair and one of the antenna in the pair</span>
  229 + <span class="comment">% clear E W</span>
  230 + <span class="comment">% [E,W] = lonlat2km(lon_mid,lat_mid,lon(p),lat(p));</span>
  231 + <span class="comment">% ddist = sqrt(E.^2+W.^2);</span>
  232 + <span class="comment">% a(p) = ddist*1000; %meters</span>
  233 +
  234 + <span class="comment">% distance between middle of pair and GPS pt</span>
  235 + clear <span class="string">ddsit</span> <span class="string">phasAng</span>
  236 + [ddist,phasAng] = sw_dist([gps_data(pt,3) lat_mid],[gps_data(pt,2) lon_mid],<span class="string">'km'</span>);
  237 + r_mid(p) = ddist*1000; <span class="comment">%meters</span>
  238 + zeta(p) = phasAng;
  239 +
  240 +
  241 + <span class="comment">% distance between pair of antennas</span>
  242 + clear <span class="string">ddsit</span> <span class="string">phasAng</span>
  243 + [ddist,phasAng] = sw_dist([lat(p) lat(p+1)],[lon(p) lon(p+1)],<span class="string">'km'</span>);
  244 + phi(p) = phasAng;
  245 +
  246 +
  247 + <span class="comment">% azimuth</span>
  248 + theta_pairs(p,pt) = modsym(zeta(p)-phi(p)+90,180);
  249 + <span class="comment">%rad2deg(theta_pairs)</span>
  250 + <span class="keyword">end</span>
  251 +
  252 +
  253 + <span class="keyword">end</span>
  254 +
  255 + figure(1)
  256 + legend(<span class="string">'gps'</span>,<span class="string">'antennas'</span>,<span class="string">'location'</span>,<span class="string">'southeast'</span>)
  257 + xlabel(<span class="string">'longitude'</span>)
  258 + ylabel(<span class="string">'latitude'</span>)
  259 +
  260 +
  261 + <span class="comment">% for each pair of antenna</span>
  262 + <span class="keyword">for</span> p = 1:11
  263 + figure(p+1)
  264 + h2=plot(theta_pairs(p,:),delta_phase_th(p,:),<span class="string">'x'</span>);
  265 + hold <span class="string">on</span>
  266 + h3=plot(theta_pairs(p,:),-delta_phase_obs(p,:),<span class="string">'or'</span>);
  267 + grid <span class="string">on</span>
  268 + xlabel(<span class="string">'incidence (degrees)'</span>)
  269 + ylabel(<span class="string">'phase difference (degrees)'</span>)
  270 + legend(<span class="string">'theoretical'</span>,<span class="string">'observed'</span>,<span class="string">'location'</span>,<span class="string">'best'</span>)
  271 + title([site <span class="string">' - antennas '</span> num2str(p) <span class="string">'-'</span> num2str(p+1)])
  272 +
  273 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  274 + set(h2,<span class="string">'color'</span>,<span class="string">'b'</span>)
  275 + set(h3,<span class="string">'color'</span>,<span class="string">'r'</span>,<span class="string">'marker'</span>,<span class="string">'o'</span>)
  276 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  277 + set(h2,<span class="string">'color'</span>,<span class="string">'k'</span>,<span class="string">'marker'</span>,<span class="string">'*'</span>)
  278 + set(h3,<span class="string">'color'</span>,<span class="string">'r'</span>,<span class="string">'marker'</span>,<span class="string">'sq'</span>,<span class="string">'markerfacecolor'</span>,<span class="string">'r'</span>)
  279 + <span class="keyword">end</span>
  280 +
  281 +
  282 + <span class="comment">% compute calibration value for antennas pairs</span>
  283 + calib_value(p) = nanmean(modsym(-delta_phase_obs(p,:)-delta_phase_th(p,:),180),2);
  284 +
  285 +
  286 + <span class="comment">% compute calibration value for each antenna</span>
  287 + phi_ant(p+1,sys) = sum(calib_value);
  288 +
  289 + <span class="keyword">end</span>
  290 +
  291 + P=ones(16,3);
  292 + P(13:16,:)=0;
  293 + P(1:12,3)=phi_ant(:,1);
  294 +
  295 +
  296 + <span class="comment">% save file (we only keep results from Helzel</span>
  297 + <span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  298 + dlmwrite(<span class="string">'calibration_pao_29OCT2014.wera'</span>,P,<span class="string">'delimiter'</span>,<span class="string">'\t'</span>,<span class="string">'precision'</span>,<span class="string">'%.7f'</span>)
  299 + <span class="keyword">elseif</span> strcmp(site,<span class="string">'PAB'</span>) == 1
  300 + dlmwrite(<span class="string">'calibration_pab_30OCT2014.wera'</span>,P,<span class="string">'delimiter'</span>,<span class="string">'\t'</span>,<span class="string">'precision'</span>,<span class="string">'%.7f'</span>)
  301 + <span class="keyword">end</span>
  302 +
  303 +
  304 + figure(13)
  305 + hold <span class="string">on</span>
  306 + h4=plot(calib_value,<span class="string">'.-'</span>);
  307 + grid <span class="string">on</span>
  308 + xlabel(<span class="string">'pairs of antennas'</span>)
  309 + ylabel({<span class="string">'phase difference between'</span>,<span class="string">'theoretical and observed values (degrees)'</span>})
  310 + title(site)
  311 +
  312 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  313 + set(h4,<span class="string">'color'</span>,<span class="string">'b'</span>)
  314 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  315 + set(h4,<span class="string">'color'</span>,<span class="string">'k'</span>)
  316 + legend(<span class="string">'Helzel'</span>,<span class="string">'Flament'</span>,<span class="string">'location'</span>,<span class="string">'southeast'</span>)
  317 + <span class="keyword">end</span>
  318 +
  319 +
  320 + figure(14)
  321 + hold <span class="string">on</span>
  322 + h5=plot([1:12],phi_ant(:,sys),<span class="string">'r'</span>);
  323 + grid <span class="string">on</span>
  324 + <span class="keyword">if</span> strcmp(systm,<span class="string">'Helzel'</span>) == 1
  325 + set(h5,<span class="string">'marker'</span>,<span class="string">'o'</span>)
  326 + <span class="keyword">elseif</span> strcmp(systm,<span class="string">'Flament'</span>) == 1
  327 + set(h5,<span class="string">'marker'</span>,<span class="string">'sq'</span>,<span class="string">'markerfacecolor'</span>,<span class="string">'r'</span>)
  328 + legend(<span class="string">'Helzel'</span>,<span class="string">'Flament'</span>,<span class="string">'location'</span>,<span class="string">'southeast'</span>)
  329 + <span class="keyword">end</span>
  330 + xlabel(<span class="string">'antenna number'</span>)
  331 + ylabel(<span class="string">'calibration phase to be applied (degrees)'</span>)
  332 + title(site)
  333 +
  334 + <span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  335 + <span class="keyword">break</span>
  336 + <span class="keyword">end</span>
  337 +</pre><img vspace="5" hspace="5" src="WERAcalibration_02.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_03.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_04.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_05.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_06.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_07.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_08.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_09.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_10.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_11.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_12.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_13.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_14.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_15.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_17.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_18.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_19.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_20.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_21.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_22.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_23.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_24.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_25.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_26.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_27.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_28.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_29.png" alt=""> <img vspace="5" hspace="5" src="WERAcalibration_30.png" alt=""> <pre class="codeinput"><span class="keyword">end</span>
  338 +
  339 +<span class="comment">%add current calibration phases</span>
  340 +<span class="keyword">if</span> strcmp(site,<span class="string">'PAO'</span>) == 1
  341 + load <span class="string">calibration_pao.wera</span>
  342 + figure(14)
  343 + plot([1:12],calibration_pao(1:12,3),<span class="string">'b.-'</span>)
  344 + legend(<span class="string">'Helzel'</span>,<span class="string">'original calibration'</span>,<span class="string">'location'</span>,<span class="string">'northwest'</span>)
  345 +<span class="keyword">elseif</span> strcmp(site,<span class="string">'PAB'</span>) == 1
  346 + load <span class="string">calibration_pab.wera</span>
  347 + figure(14)
  348 + plot([1:12],calibration_pab(1:12,3),<span class="string">'b.-'</span>)
  349 + legend(<span class="string">'Helzel'</span>,<span class="string">'Flament'</span>,<span class="string">'original calibration'</span>,<span class="string">'location'</span>,<span class="string">'southeast'</span>)
  350 +<span class="keyword">end</span>
  351 +
  352 +
  353 +
  354 +
  355 +
  356 +
  357 +<span class="comment">% save figures</span>
  358 +save_flag = 1;
  359 +
  360 +figdir = (<span class="string">'/home/bandma01/Dropbox/UQAR/MEOPAR_Marion/figures/WERAcalibration'</span>);
  361 +cd(figdir)
  362 +
  363 +fig_hdl = figure(1);
  364 +<span class="keyword">if</span> save_flag
  365 + fname = [<span class="string">'configuration_'</span> site <span class="string">'_calibrations'</span>];
  366 + fig_w = 8;<span class="comment">%cm</span>
  367 + fig_h = 5;<span class="comment">%cm</span>
  368 + set(fig_hdl,<span class="string">'PaperUnits'</span>,<span class="string">'centimeters'</span>)
  369 + set(fig_hdl,<span class="string">'PaperPosition'</span>,[0 0 fig_w fig_h])
  370 + set(fig_hdl, <span class="string">'PaperSize'</span>, [fig_w fig_h]);
  371 + print(fig_hdl,<span class="string">'-dpng'</span>,<span class="string">'-r500'</span>,fname)
  372 + <span class="comment">%crop([fname '.png'])</span>
  373 +<span class="keyword">end</span>
  374 +
  375 +
  376 +
  377 +
  378 +<span class="keyword">for</span> i = 2:12
  379 + fig_hdl = figure(i);
  380 + <span class="keyword">if</span> save_flag
  381 + fname = [<span class="string">'Phases_'</span> site <span class="string">'_pair'</span> num2str(i-1) <span class="string">'-'</span> num2str(i)];
  382 + fig_w = 8;<span class="comment">%cm</span>
  383 + fig_h = 5;<span class="comment">%cm</span>
  384 + set(fig_hdl,<span class="string">'PaperUnits'</span>,<span class="string">'centimeters'</span>)
  385 + set(fig_hdl,<span class="string">'PaperPosition'</span>,[0 0 fig_w fig_h])
  386 + set(fig_hdl, <span class="string">'PaperSize'</span>, [fig_w fig_h]);
  387 + print(fig_hdl,<span class="string">'-dpng'</span>,<span class="string">'-r500'</span>,fname)
  388 + <span class="comment">% crop([fname '.png'])</span>
  389 + <span class="keyword">end</span>
  390 +<span class="keyword">end</span>
  391 +
  392 +
  393 +
  394 +fig_hdl = figure(13);
  395 +<span class="keyword">if</span> save_flag
  396 + fname = [<span class="string">'PhaseDifference_'</span> site <span class="string">'_calibrations'</span>];
  397 + fig_w = 8;<span class="comment">%cm</span>
  398 + fig_h = 5;<span class="comment">%cm</span>
  399 + set(fig_hdl,<span class="string">'PaperUnits'</span>,<span class="string">'centimeters'</span>)
  400 + set(fig_hdl,<span class="string">'PaperPosition'</span>,[0 0 fig_w fig_h])
  401 + set(fig_hdl, <span class="string">'PaperSize'</span>, [fig_w fig_h]);
  402 + print(fig_hdl,<span class="string">'-dpng'</span>,<span class="string">'-r500'</span>,fname)
  403 + <span class="comment">% crop([fname '.png'])</span>
  404 +<span class="keyword">end</span>
  405 +
  406 +fig_hdl = figure(14);
  407 +<span class="keyword">if</span> save_flag
  408 + fname = [<span class="string">'PhaseCalibration_'</span> site];
  409 + fig_w = 8;<span class="comment">%cm</span>
  410 + fig_h = 5;<span class="comment">%cm</span>
  411 + set(fig_hdl,<span class="string">'PaperUnits'</span>,<span class="string">'centimeters'</span>)
  412 + set(fig_hdl,<span class="string">'PaperPosition'</span>,[0 0 fig_w fig_h])
  413 + set(fig_hdl, <span class="string">'PaperSize'</span>, [fig_w fig_h]);
  414 + print(fig_hdl,<span class="string">'-dpng'</span>,<span class="string">'-r500'</span>,fname)
  415 + <span class="comment">% crop([fname '.png'])</span>
  416 +<span class="keyword">end</span>
  417 +</pre><p class="footer"><br>
  418 + Published with MATLAB&reg; 7.14<br></p></div><!--
  419 +##### SOURCE BEGIN #####
  420 +clear all
  421 +close all
  422 +
  423 +%cd('/home/bandma01/Documents/WERAs/')
  424 +cd('/home/bandma01/hfr-data-processing/calibrations/')
  425 +
  426 +% site = 'PAO';
  427 +site = 'PAB';
  428 +cd(site)
  429 +
  430 +% system
  431 +for sys = 1:2
  432 +
  433 + if sys == 1
  434 + systm = 'Helzel';
  435 + elseif sys == 2
  436 + systm = 'Flament';
  437 + end
  438 +
  439 + clear J I E Phase calib_file calib_hr calib_jd calib_min calib_time calib_value
  440 + clear calib_year d data delta_phase_obs delta_phase_th gps_data index_timecalib
  441 + clear theta_pairs
  442 +
  443 + if strcmp(site,'PAO') == 1
  444 +
  445 + load('HelzelPAO_Track_29-OCT-14 183138.mat')
  446 +
  447 + elseif strcmp(site,'PAB') == 1
  448 +
  449 + if strcmp(systm,'Helzel') == 1
  450 + load('HelzelPAB_Track_30-OCT-14 175446.mat')
  451 + elseif strcmp(systm,'Flament') == 1
  452 + load('FlamentPAB_Track_30-OCT-14 182008.mat')
  453 + end
  454 +
  455 + end
  456 +
  457 +
  458 + %% phases and time of calibration
  459 + if strcmp(site,'PAO') == 1
  460 + cd('2014302')
  461 + elseif strcmp(site,'PAB') == 1
  462 + cd('2014303')
  463 + end
  464 +
  465 + % list files
  466 + clear d
  467 + d = dir('*.mat'); % returns a structure with name, date, bytes, isdir, datenum
  468 + Nfiles = length(d); % nombre de fichiers a analyser
  469 +
  470 +
  471 + % look at the names of files and extract information
  472 + for c = 1:Nfiles
  473 + calib_year(c) = str2double(d(c).name(1:4));
  474 + calib_jd(c) = str2double(d(c).name(5:7));
  475 + calib_hr(c) = str2double(d(c).name(8:9));
  476 + calib_min(c) = str2double(d(c).name(10:11));
  477 +
  478 + load(d(c).name,'phase')
  479 +
  480 + Phase(:,c) = phase;
  481 + end
  482 + clear phase
  483 +
  484 + delta_phase_obs = modsym(diff(Phase,1),180);
  485 +
  486 + To = datenum(2014,01,01,0,0,0);
  487 +
  488 + % add 20 sec to center calibration time
  489 + calib_time = To + calib_jd -1 + calib_hr./24 + calib_min/24/60 + 20/24/3600;
  490 + % datevec(calib_time)
  491 +
  492 + if strcmp(site,'PAO') == 1
  493 + % calib time 2min34sec late wrt GPS
  494 + calib_time = calib_time + 2/24/60 + 34/24/3600;
  495 + end
  496 +
  497 + %% separate between calibrations made with Helzel's system and Pierre's system
  498 + % date of new calibration files
  499 + % Helzel 2014-10-30 16:52 to 17:54
  500 + % Flament 2014-10-30 17:55 to 18:20
  501 + T1 = datenum(2014,10,30,17,59,00);
  502 +
  503 +
  504 + clear J
  505 + if strcmp(systm,'Helzel') == 1
  506 + J = find(calib_time > T1);
  507 + elseif strcmp(systm,'Flament') == 1
  508 + J = find(calib_time > T1);
  509 + end
  510 +
  511 + %remove unwanted data to avoid confusion!
  512 + calib_year(J)=[];
  513 + calib_jd(J)=[];
  514 + calib_hr(J)=[];
  515 + calib_min(J)=[];
  516 + Phase(:,J)=[];
  517 + delta_phase_obs(:,J)=[];
  518 + calib_time(J)=[];
  519 + d(J)=[];
  520 + clear c Nfiles
  521 +
  522 + %+++++++++++++++++++++++++++++++++++++++++
  523 + % for each calibration file (series# 1)
  524 + %+++++++++++++++++++++++++++++++++++++++++
  525 + for calib_file = 1:length(calib_time)
  526 +
  527 + time_calib = calib_time(calib_file);
  528 +
  529 + % find corresponding file in gps data
  530 + clear I
  531 + I = find(data(:,1) > time_calib);
  532 + % take closest point for now
  533 + I = I(1);
  534 +
  535 + % datevec(data(I,1))
  536 + % datevec(time_calib)
  537 +
  538 + index_timecalib(calib_file) = I;
  539 + end
  540 +
  541 + % check
  542 + % datevec(data(index_timecalib,1))
  543 +
  544 + % isolate gps calibration data
  545 + gps_data = data(index_timecalib,:); % time lat lon
  546 +
  547 + figure(1)
  548 + hold on
  549 + h1=plot(gps_data(:,2),gps_data(:,3),'.');
  550 + grid on
  551 + if strcmp(systm,'Helzel') == 1
  552 + set(h1,'marker','.','color','b')
  553 + elseif strcmp(systm,'Flament') == 1
  554 + set(h1,'marker','x','color','k')
  555 + end
  556 +
  557 + % load antenna coordinates
  558 + cd ..
  559 + load([site '_Rx_coords.mat'])
  560 +
  561 + hold on
  562 + plot(lon,lat,'x')
  563 + grid on
  564 + title(['site = ' site ])
  565 +
  566 +
  567 + %% theoretical values
  568 + % wavelength
  569 + lambda = 3E8/16.15E6;
  570 +
  571 +
  572 + % initialize variables
  573 + theta_pairs = nan(11,length(gps_data));
  574 +
  575 + % for each gps point
  576 + for pt = 1:length(gps_data)
  577 +
  578 + % compute distance between GPS and antennas
  579 + for ant = 1:12
  580 + clear E W
  581 + [E,W] = lonlat2km(gps_data(pt,2),gps_data(pt,3),lon(ant),lat(ant));
  582 + ddist = sqrt(E.^2+W.^2);
  583 + r(ant) = ddist*1000; %meters
  584 + end
  585 +
  586 +
  587 +
  588 + %for each pair of antennas
  589 + for p = 1:11
  590 +
  591 + %delta_r
  592 + delta_r(p) = r(p+1) - r(p);
  593 +
  594 + % theoretical phase
  595 + delta_phase_th(p,pt) = modsym((delta_r(p)*360./lambda),180);
  596 +
  597 +
  598 + % position of middle of pairs
  599 + clear lon_mid lat_mid
  600 + lon_mid = (lon(p+1)+lon(p))/2;
  601 + lat_mid = (lat(p+1)+lat(p))/2;
  602 +
  603 + % distance between middle of pair and one of the antenna in the pair
  604 + % clear E W
  605 + % [E,W] = lonlat2km(lon_mid,lat_mid,lon(p),lat(p));
  606 + % ddist = sqrt(E.^2+W.^2);
  607 + % a(p) = ddist*1000; %meters
  608 +
  609 + % distance between middle of pair and GPS pt
  610 + clear ddsit phasAng
  611 + [ddist,phasAng] = sw_dist([gps_data(pt,3) lat_mid],[gps_data(pt,2) lon_mid],'km');
  612 + r_mid(p) = ddist*1000; %meters
  613 + zeta(p) = phasAng;
  614 +
51 615  
52   - <div class="section" id="wera-calibrations">
53   -<h1>WERA calibrations<a class="headerlink" href="#wera-calibrations" title="Permalink to this headline">¶</a></h1>
54   -<p>In March 2015, we used data collected in September 2013 to compare old and new calibrations in order to know which ones we should use for the on-going analysis of currents data.</p>
55   -<p>PAP1</p>
56   -<div class="topic">
57   -<p class="topic-title first">PAP1</p>
58   -<p>RadialConfigs_PAP1_20121213_WAPM_MUSIC402002_5Dsmooth
59   -from 2012-12-13 to 2013-02-01 19:50 UTC</p>
60   -<p>RadialConfigs_PAP1_20130201_BAPM_MUSIC402002_nosmooth
61   -from 2013-02-01 19:50 UTC to now</p>
62   -</div>
63   -<div class="topic">
64   -<p class="topic-title first">STF2</p>
65   -<p>RadialConfigs_STF2_20121220_BAPM_MUSIC402002_nosmooth
66   -from 2012-12-20 to 2013-02-06 12:00 UTC</p>
67   -<p>RadialConfigs_PAP1_20130201_BAPM_MUSIC402002_nosmooth
68   -from 2013-02-01 19:50 UTC to now</p>
69   -</div>
70   -</div>
71   -
72   -
73   - </div>
74   - </div>
75   - </div>
76   - <div class="sphinxsidebar">
77   - <div class="sphinxsidebarwrapper">
78   - <h4>Previous topic</h4>
79   - <p class="topless"><a href="WERAprocessing.html"
80   - title="previous chapter">WERA radial currents processing</a></p>
81   - <h4>Next topic</h4>
82   - <p class="topless"><a href="Comparison_WERA-ADCP_Sept2013.html"
83   - title="next chapter">Comparison WERA and ADCP radial velocities September 2013</a></p>
84   - <h3>This Page</h3>
85   - <ul class="this-page-menu">
86   - <li><a href="_sources/WERAcalibration.txt"
87   - rel="nofollow">Show Source</a></li>
88   - </ul>
89   -<div id="searchbox" style="display: none">
90   - <h3>Quick search</h3>
91   - <form class="search" action="search.html" method="get">
92   - <input type="text" name="q" />
93   - <input type="submit" value="Go" />
94   - <input type="hidden" name="check_keywords" value="yes" />
95   - <input type="hidden" name="area" value="default" />
96   - </form>
97   - <p class="searchtip" style="font-size: 90%">
98   - Enter search terms or a module, class or function name.
99   - </p>
100   -</div>
101   -<script type="text/javascript">$('#searchbox').show(0);</script>
102   - </div>
103   - </div>
104   - <div class="clearer"></div>
105   - </div>
106   - <div class="related">
107   - <h3>Navigation</h3>
108   - <ul>
109   - <li class="right" style="margin-right: 10px">
110   - <a href="genindex.html" title="General Index"
111   - >index</a></li>
112   - <li class="right" >
113   - <a href="Comparison_WERA-ADCP_Sept2013.html" title="Comparison WERA and ADCP radial velocities September 2013"
114   - >next</a> |</li>
115   - <li class="right" >
116   - <a href="WERAprocessing.html" title="WERA radial currents processing"
117   - >previous</a> |</li>
118   - <li><a href="index.html">documentation_HFR_analysis 0.0.1 documentation</a> &raquo;</li>
119   - </ul>
120   - </div>
121   - <div class="footer">
122   - &copy; Copyright 2015, Marion Bandet.
123   - Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
124   - </div>
125   - </body>
126   -</html>
127 616 \ No newline at end of file
  617 + % distance between pair of antennas
  618 + clear ddsit phasAng
  619 + [ddist,phasAng] = sw_dist([lat(p) lat(p+1)],[lon(p) lon(p+1)],'km');
  620 + phi(p) = phasAng;
  621 +
  622 +
  623 + % azimuth
  624 + theta_pairs(p,pt) = modsym(zeta(p)-phi(p)+90,180);
  625 + %rad2deg(theta_pairs)
  626 + end
  627 +
  628 +
  629 + end
  630 +
  631 + figure(1)
  632 + legend('gps','antennas','location','southeast')
  633 + xlabel('longitude')
  634 + ylabel('latitude')
  635 +
  636 +
  637 + % for each pair of antenna
  638 + for p = 1:11
  639 + figure(p+1)
  640 + h2=plot(theta_pairs(p,:),delta_phase_th(p,:),'x');
  641 + hold on
  642 + h3=plot(theta_pairs(p,:),-delta_phase_obs(p,:),'or');
  643 + grid on
  644 + xlabel('incidence (degrees)')
  645 + ylabel('phase difference (degrees)')
  646 + legend('theoretical','observed','location','best')
  647 + title([site ' - antennas ' num2str(p) '-' num2str(p+1)])
  648 +
  649 + if strcmp(systm,'Helzel') == 1
  650 + set(h2,'color','b')
  651 + set(h3,'color','r','marker','o')
  652 + elseif strcmp(systm,'Flament') == 1
  653 + set(h2,'color','k','marker','*')
  654 + set(h3,'color','r','marker','sq','markerfacecolor','r')
  655 + end
  656 +
  657 +
  658 + % compute calibration value for antennas pairs
  659 + calib_value(p) = nanmean(modsym(-delta_phase_obs(p,:)-delta_phase_th(p,:),180),2);
  660 +
  661 +
  662 + % compute calibration value for each antenna
  663 + phi_ant(p+1,sys) = sum(calib_value);
  664 +
  665 + end
  666 +
  667 + P=ones(16,3);
  668 + P(13:16,:)=0;
  669 + P(1:12,3)=phi_ant(:,1);
  670 +
  671 +
  672 + % save file (we only keep results from Helzel
  673 + if strcmp(site,'PAO') == 1
  674 + dlmwrite('calibration_pao_29OCT2014.wera',P,'delimiter','\t','precision','%.7f')
  675 + elseif strcmp(site,'PAB') == 1
  676 + dlmwrite('calibration_pab_30OCT2014.wera',P,'delimiter','\t','precision','%.7f')
  677 + end
  678 +
  679 +
  680 + figure(13)
  681 + hold on
  682 + h4=plot(calib_value,'.-');
  683 + grid on
  684 + xlabel('pairs of antennas')
  685 + ylabel({'phase difference between','theoretical and observed values (degrees)'})
  686 + title(site)
  687 +
  688 + if strcmp(systm,'Helzel') == 1
  689 + set(h4,'color','b')
  690 + elseif strcmp(systm,'Flament') == 1
  691 + set(h4,'color','k')
  692 + legend('Helzel','Flament','location','southeast')
  693 + end
  694 +
  695 +
  696 + figure(14)
  697 + hold on
  698 + h5=plot([1:12],phi_ant(:,sys),'r');
  699 + grid on
  700 + if strcmp(systm,'Helzel') == 1
  701 + set(h5,'marker','o')
  702 + elseif strcmp(systm,'Flament') == 1
  703 + set(h5,'marker','sq','markerfacecolor','r')
  704 + legend('Helzel','Flament','location','southeast')
  705 + end
  706 + xlabel('antenna number')
  707 + ylabel('calibration phase to be applied (degrees)')
  708 + title(site)
  709 +
  710 + if strcmp(site,'PAO') == 1
  711 + break
  712 + end
  713 +
  714 +end
  715 +
  716 +%add current calibration phases
  717 +if strcmp(site,'PAO') == 1
  718 + load calibration_pao.wera
  719 + figure(14)
  720 + plot([1:12],calibration_pao(1:12,3),'b.-')
  721 + legend('Helzel','original calibration','location','northwest')
  722 +elseif strcmp(site,'PAB') == 1
  723 + load calibration_pab.wera
  724 + figure(14)
  725 + plot([1:12],calibration_pab(1:12,3),'b.-')
  726 + legend('Helzel','Flament','original calibration','location','southeast')
  727 +end
  728 +
  729 +
  730 +
  731 +
  732 +
  733 +
  734 +% save figures
  735 +save_flag = 1;
  736 +
  737 +figdir = ('/home/bandma01/Dropbox/UQAR/MEOPAR_Marion/figures/WERAcalibration');
  738 +cd(figdir)
  739 +
  740 +fig_hdl = figure(1);
  741 +if save_flag
  742 + fname = ['configuration_' site '_calibrations'];
  743 + fig_w = 8;%cm
  744 + fig_h = 5;%cm
  745 + set(fig_hdl,'PaperUnits','centimeters')
  746 + set(fig_hdl,'PaperPosition',[0 0 fig_w fig_h])
  747 + set(fig_hdl, 'PaperSize', [fig_w fig_h]);
  748 + print(fig_hdl,'-dpng','-r500',fname)
  749 + %crop([fname '.png'])
  750 +end
  751 +
  752 +
  753 +
  754 +
  755 +for i = 2:12
  756 + fig_hdl = figure(i);
  757 + if save_flag
  758 + fname = ['Phases_' site '_pair' num2str(i-1) '-' num2str(i)];
  759 + fig_w = 8;%cm
  760 + fig_h = 5;%cm
  761 + set(fig_hdl,'PaperUnits','centimeters')
  762 + set(fig_hdl,'PaperPosition',[0 0 fig_w fig_h])
  763 + set(fig_hdl, 'PaperSize', [fig_w fig_h]);
  764 + print(fig_hdl,'-dpng','-r500',fname)
  765 + % crop([fname '.png'])
  766 + end
  767 +end
  768 +
  769 +
  770 +
  771 +fig_hdl = figure(13);
  772 +if save_flag
  773 + fname = ['PhaseDifference_' site '_calibrations'];
  774 + fig_w = 8;%cm
  775 + fig_h = 5;%cm
  776 + set(fig_hdl,'PaperUnits','centimeters')
  777 + set(fig_hdl,'PaperPosition',[0 0 fig_w fig_h])
  778 + set(fig_hdl, 'PaperSize', [fig_w fig_h]);
  779 + print(fig_hdl,'-dpng','-r500',fname)
  780 + % crop([fname '.png'])
  781 +end
  782 +
  783 +fig_hdl = figure(14);
  784 +if save_flag
  785 + fname = ['PhaseCalibration_' site];
  786 + fig_w = 8;%cm
  787 + fig_h = 5;%cm
  788 + set(fig_hdl,'PaperUnits','centimeters')
  789 + set(fig_hdl,'PaperPosition',[0 0 fig_w fig_h])
  790 + set(fig_hdl, 'PaperSize', [fig_w fig_h]);
  791 + print(fig_hdl,'-dpng','-r500',fname)
  792 + % crop([fname '.png'])
  793 +end
  794 +##### SOURCE END #####
  795 +--></body></html>
128 796 \ No newline at end of file
... ...
build/html/WERAcalibration.png 0 → 100644

3.44 KB

build/html/WERAcalibration_01.png 0 → 100644

8.59 KB

build/html/WERAcalibration_02.png 0 → 100644