;
0200             <span class="keyword">end</span>
0201             mins = min(min(acq.spectra));
0202             maxs = max(max(acq.spectra));
0203         <span class="keyword">end</span>
0204 
0205         <span class="comment">% Scale the spectra based upon current offset and scale</span>
0206         <span class="keyword">if</span> acq.bgsub
0207            scaled_spectra = acq.offset + ( acq.scale ) * ( acq.spectra - repmat( acq.mean_spectra, [1,size(acq.spectra,2)]) ) / ( maxs - mins ); 
0208      