tupdate units in plotting routines, state 2 mins/walker - 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 5e3be79e8b3cb07aa8ea4fc4ae044f419668b3ea
 (DIR) parent 6be67ba3b54f4b63cce286d9b432807f437a8494
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed, 18 Nov 2015 15:11:11 +0100
       
       update units in plotting routines, state 2 mins/walker
       
       Diffstat:
         M matlab/generate_plots.m             |      32 ++++++++++++++++++++++++-------
         M pages/history.html                  |       2 +-
       
       2 files changed, 26 insertions(+), 8 deletions(-)
       ---
 (DIR) diff --git a/matlab/generate_plots.m b/matlab/generate_plots.m
       t@@ -212,18 +212,26 @@ for i1 = 1:M % for each model parameter
            subplot(M,Nwalkers,isub)
            %Nhistc=histc(Ss{iwalk}.ms(i1,:),xbins{i1});
            %bar(xbins{i1},Nhistc,'histc')
       -    histogram(Ss{iwalk}.ms(i1,:), xbins{i1});
       +    
       +    if i1 == 1 || i1 == 2
       +        % change units from mm/yr to m/Myr
       +        histogram(Ss{iwalk}.ms(i1,:)*1000., xbins{i1}*1000.);
       +    else
       +        histogram(Ss{iwalk}.ms(i1,:), xbins{i1});
       +    end
            
            if i1 == 1
                title(['MCMC walker ' num2str(iwalk)])
            end
            
            if i1 == 1
       -        xlabel('Interglacial erosion rate [mm/yr]')
       +        %xlabel('Interglacial erosion rate [mm/yr]')
       +        xlabel('Interglacial erosion rate [m/Myr]')
                text(0.02,0.98,'a', 'Units', ...
                    'Normalized', 'VerticalAlignment', 'Top')
            elseif i1 == 2
       -        xlabel('Glacial erosion rate [mm/yr]')
       +        %xlabel('Glacial erosion rate [mm/yr]')
       +        xlabel('Glacial erosion rate [m/Myr]')
                text(0.02,0.98,'b', 'Units', ...
                    'Normalized', 'VerticalAlignment', 'Top')
            elseif i1 == 3
       t@@ -262,13 +270,19 @@ for i1 = 1:M % for each model parameter
            data = [];
            for iwalker=1:Nwalkers
                data = [data, Ss{iwalker}.ms(i1,:)];
       +        if i1 == 1 || i1 == 2
       +            data = data*1000.;
       +        end
            end
            
            hold on
            %Nhistc=histc(data, xbins{i1});
            %bar(xbins{i1},Nhistc,'histc')
       +    if i1 == 1 || i1 == 2
       +        xbins{i1} = xbins{i1}*1000.; % change to m/Myr
       +    end
            histogram(data, xbins{i1});
       -
       +    
            % 2nd quartile = median = 50th percentile
            med = median(data);
            plot([med, med], get(gca,'YLim'), 'm-')
       t@@ -300,13 +314,17 @@ for i1 = 1:M % for each model parameter
            hold off
            
            if i1 == 1
       +        %xlabel(['Interglacial erosion rate [mm/yr], median = ' ...
                xlabel(['Interglacial erosion rate [mm/yr], median = ' ...
       -            num2str(med, 4) ' mm/yr'])
       +            num2str(med, 4) ' m/Myr'])
       +            %num2str(med, 4) ' mm/yr'])
                text(0.02,0.98,'a', 'Units', ...
                    'Normalized', 'VerticalAlignment', 'Top')
            elseif i1 == 2
       -        xlabel(['Glacial erosion rate [mm/yr], median = ' ...
       -            num2str(med, 4) ' mm/yr'])
       +        %xlabel(['Glacial erosion rate [mm/yr], median = ' ...
       +        xlabel(['Glacial erosion rate [m/Myr], median = ' ...
       +            num2str(med, 4) ' m/Myr'])
       +            %num2str(med, 4) ' mm/yr'])
                text(0.02,0.98,'b', 'Units', ...
                    'Normalized', 'VerticalAlignment', 'Top')
            elseif i1 == 3
 (DIR) diff --git a/pages/history.html b/pages/history.html
       t@@ -471,7 +471,7 @@
                            Markov-Chain Monte Carlo random walkers. Low values produce
                            results quickly, while more walkers can indicate uniqueness
                            and certainty of the solution. Approximate computation time
       -                    is 1 minute per walker.<br>
       +                    is 2 minutes per walker.<br>
                            <div class="input-field col s6">
                                <select name="nwalkers">
                                    <option value="1">1 walker</option>