Changeset 189


Ignore:
Timestamp:
Jan 24, 2012, 2:46:22 PM (7 years ago)
Author:
tjniskan
Message:
  • Fixed a small bug in reading JCAMP format files (Bruker header files).
  • Fixed contrast/brightness auto-balance for non-float image data.

M aedes.m
M aedes_readjcamp.m
M aedes_revision.m

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • aedes.m

    r187 r189  
    73967396  end
    73977397else
    7398   % Saturate 1% of the low and high values
    7399   normClim = stretchlim(tmp_data,...
    7400     [0.005 0.995]);
    7401   normClim = max(normClim,[],2);
    7402   Clim(1) = floor(max_val*normClim(1));
    7403   Clim(2) = ceil(max_val*normClim(2));
     7398        % Saturate 1% of the low and high values
     7399        high_cut = 1-0.005;
     7400        low_cut = 0.005;
     7401        tmp = sort(tmp_data(:));
     7402        n = length(tmp);
     7403        high_ind = floor(n*high_cut);
     7404        low_ind = ceil(n*low_cut);
     7405        Clim = double([tmp(low_ind) tmp(high_ind)]);
    74047406end
    74057407
  • aedes_readjcamp.m

    r173 r189  
    131131end
    132132
     133% Check if the string contains numbers at all before tryin to convert to a
     134% number. str2num uses eval command and if the string matches to a
     135% function name strange things can happen...
     136tmp2 = regexp(val,'.*\d.*');
     137if isempty(tmp2)
     138        out = val;
     139        return
     140end
     141
    133142% Convert value to numeric if possible
    134143tmp = str2num(val);
  • aedes_revision.m

    r188 r189  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - Svn Hook -
     95% - SVN Hook -
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008