tsave all figures, add completion message, only show histogram - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
 (HTM) git clone git://src.adamsgaard.dk/cosmo
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4b9e74851dbb209ffda2a2469fdcee5374dda860
 (DIR) parent 5fa89e82cc5de7410609037bfe24329d655be04c
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri, 23 Oct 2015 12:13:11 +0200
       
       save all figures, add completion message, only show histogram
       
       Diffstat:
         M index.php                           |      87 ++-----------------------------
         M matlab/file_scanner_mcmc_starter.m  |       5 ++++-
         M matlab/generate_plots.m             |       5 ++---
       
       3 files changed, 10 insertions(+), 87 deletions(-)
       ---
 (DIR) diff --git a/index.php b/index.php
       t@@ -70,91 +70,12 @@ if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
                    <!-- page header -->
                    <h2 class="header center orange-text">MCMC Inversion results</h2>
        
       -
       -            <div class="row">
       -              <div class="col s12 m8 offset-m2">
       -                <div class="card">
       -                  <div class="card-image">
       -                  <img src="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-1.png">
       -                    <span class="card-title">First figure</span>
       -                  </div>
       -                  <div class="card-content">
       -                    <p>This is the first figure, and it shows this and that.</p>
       -                  </div>
       -                  <div class="card-action">
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-1.png"
       -                    target="_blank">Link to PNG</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-1.pdf"
       -                    target="_blank">Link to PDF</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-1.fig"
       -                    target="_blank">Link to FIG</a>
       -                  </div>
       -                </div>
       -              </div>
       -            </div>
       -
       -            <div class="row">
       -              <div class="col s12 m8 offset-m2">
       -                <div class="card">
       -                  <div class="card-image">
       -                  <img src="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-2.png">
       -                    <span class="card-title">Second figure</span>
       -                  </div>
       -                  <div class="card-content">
       -                    <p>This is the second figure, and it shows this and that.</p>
       -                  </div>
       -                  <div class="card-action">
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-2.png"
       -                    target="_blank">Link to PNG</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-2.pdf"
       -                    target="_blank">Link to PDF</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-2.fig"
       -                    target="_blank">Link to FIG</a>
       -                  </div>
       -                </div>
       -              </div>
       -            </div>
       -
       -            <div class="row">
       -              <div class="col s12 m8 offset-m2">
       -                <div class="card">
       -                  <div class="card-image">
       -                  <img src="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-3.png">
       -                    <span class="card-title">Third figure</span>
       -                  </div>
       -                  <div class="card-content">
       -                    <p>This is the third figure, and it shows this and that.</p>
       -                  </div>
       -                  <div class="card-action">
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-3.png"
       -                    target="_blank">Link to PNG</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-3.pdf"
       -                    target="_blank">Link to PDF</a>
       -                  <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-3.fig"
       -                    target="_blank">Link to FIG</a>
       -                  </div>
       -                </div>
       -              </div>
       -            </div>
       -
                    <div class="row">
                      <div class="col s12 m8 offset-m2">
                        <div class="card">
                          <div class="card-image">
                          <img src="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-4.png">
       +                        echo($_GET['results_id']); ?>_Walks-5.png">
                            <span class="card-title">Fourth figure</span>
                          </div>
                          <div class="card-content">
       t@@ -171,13 +92,13 @@ if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
                          </div>
                          <div class="card-action">
                          <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-4.png"
       +                        echo($_GET['results_id']); ?>_Walks-5.png"
                            target="_blank">Link to PNG</a>
                          <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-4.pdf"
       +                        echo($_GET['results_id']); ?>_Walks-5.pdf"
                            target="_blank">Link to PDF</a>
                          <a href="output/<?php
       -                        echo($_GET['results_id']); ?>_Walks-4.fig"
       +                        echo($_GET['results_id']); ?>_Walks-5.fig"
                            target="_blank">Link to FIG</a>
                          </div>
                        </div>
 (DIR) diff --git a/matlab/file_scanner_mcmc_starter.m b/matlab/file_scanner_mcmc_starter.m
       t@@ -9,7 +9,7 @@
        
        % folder containing input files from web interface ("uploadhistory.php")
        % and status file
       -infolder = '/home/adc/cosmo/input';
       +infolder = '~/cosmo/input';
        
        % folder for generated plots
        %outfolder = 'output/';
       t@@ -34,6 +34,7 @@ graphics_formats = {'fig', 'png', 'pdf'};
        
        % show figures after they are generated in addition to saving them,
        % values: 'on' or 'off'
       +%show_figures = 'on';
        show_figures = 'off';
        
        % number of MCMC walkers
       t@@ -118,6 +119,8 @@ while 1
                fprintf(fid, 'Computations complete');
                fclose(fid);
                
       +        disp('Computations complete');
       +        
                diary off;
                
                %keyboard
 (DIR) diff --git a/matlab/generate_plots.m b/matlab/generate_plots.m
       t@@ -193,7 +193,7 @@ for i1 = 1:M % for each model parameter
            Nhistc=histc(Ss{iwalk}.ms(i1,:),xbins{i1});
            bar(xbins{i1},Nhistc,'histc')
            
       -    disp(isub)
       +    disp(['isub = ' num2str(isub)])
            if i1 == 1
                disp('Interglacial erosion rate [mm/yr]')
                xlabel('Interglacial erosion rate [mm/yr]')
       t@@ -218,7 +218,6 @@ for i1 = 1:M % for each model parameter
            else
                disp(['Using mname for i1 = ' i1])
                xlabel(fixed_stuff.mname{i1})
       -        keyboard
            end
            %set (gca,'xtick',[1e-7:1e-3]);
            
       t@@ -259,7 +258,7 @@ if strcmp(show_figures, 'on')
        end
        
        % save all figures
       -for i=1:4
       +for i=1:length(fh)
            figure_save_multiformat(fh(i), ...
                strcat(save_file, '-', num2str(i)), ...
                formats);