,pos,counts_per_photon);
    xlabel(ax,<span class="string">'Sample'</span>)
    ylabel(ax,<span class="string">'Counts per photon'</span>);
    title(ax,st)

    counts_per_photon = mean(counts_per_photon);
    offset = mean(offset);

    <span class="keyword">function</span> r = objt(m)

        <span class="keyword">if</span> fit_offset
            offset = m(2);
        <span class="keyword">else</span>
            offset = 0;
        <span class="keyword">end</span>

        <span class="comment">% Tra