Skip to content

Commit

Permalink
automatically synchronized identical files to revision 10749
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.fcdonders.nl/home/svnroot/fieldtrip/trunk@10750 0cf7c7f0-3615-4144-b4e6-68da3bce3cd0
  • Loading branch information
robertoostenveld committed Oct 6, 2015
1 parent 7b395b0 commit ed6219c
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 20 deletions.
24 changes: 20 additions & 4 deletions fileio/private/scalingfactor.m
Expand Up @@ -43,15 +43,20 @@
% sievert Sv equivalent dose (of ionizing radiation) J/kg L2#T-2
% katal kat catalytic activity mol/s T-1#N
%
% The following alternative units are supported
% inch inch length
% feet feet length
% gauss gauss magnetic field strength
%
% The following derived units are not supported due to potential confusion
% between their ascii character representation
% ohm # electric resistance, impedance, reactance V/A M#L2#T-3#I-2
% watt W power, radiant flux J/s = V#A M#L2#T-3
% degree Celsius °C temperature relative to 273.15 K K ?
% degree Celsius ?C temperature relative to 273.15 K K ?
%
% See also http://en.wikipedia.org/wiki/International_System_of_Units

% Copyright (C) 2012, Robert Oostenveld
% Copyright (C) 2012-2015, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip
% for the documentation and details.
Expand Down Expand Up @@ -100,12 +105,14 @@
return
end

unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat'};
unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat' 'inch' 'feet' 'gauss'};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the following section pertains to checking that units are compatible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unknown = -1;

% each of the fundamental units is represented by a prime number
m = 2;
kg = 3; g = 3; % besides representing kg, also represent g to facilitate the processing further down
Expand All @@ -114,7 +121,6 @@
K = 11;
mol = 13;
cd = 17;
unknown = -1;

% each of the derives units is represented by a product and/or ratio of prime numbers
Hz = 1/s;
Expand All @@ -137,6 +143,11 @@
Sv = J/kg;
kat = mol/s;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = m; % it is actually 0.0254 m
feet = inch; % it is actually 12 inch
gauss = T; % it is actually 10^-4 T

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = %s;', unit{i}, unit{i}));
Expand Down Expand Up @@ -202,6 +213,11 @@
Sv = 1;
kat = 1;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = 0.0254;
feet = 0.0254*12;
gauss = 1e-4;

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = 1e-1 * %s;', unit{i}, unit{i}));
Expand Down
24 changes: 20 additions & 4 deletions forward/private/scalingfactor.m
Expand Up @@ -43,15 +43,20 @@
% sievert Sv equivalent dose (of ionizing radiation) J/kg L2#T-2
% katal kat catalytic activity mol/s T-1#N
%
% The following alternative units are supported
% inch inch length
% feet feet length
% gauss gauss magnetic field strength
%
% The following derived units are not supported due to potential confusion
% between their ascii character representation
% ohm # electric resistance, impedance, reactance V/A M#L2#T-3#I-2
% watt W power, radiant flux J/s = V#A M#L2#T-3
% degree Celsius °C temperature relative to 273.15 K K ?
% degree Celsius ?C temperature relative to 273.15 K K ?
%
% See also http://en.wikipedia.org/wiki/International_System_of_Units

% Copyright (C) 2012, Robert Oostenveld
% Copyright (C) 2012-2015, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip
% for the documentation and details.
Expand Down Expand Up @@ -100,12 +105,14 @@
return
end

unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat'};
unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat' 'inch' 'feet' 'gauss'};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the following section pertains to checking that units are compatible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unknown = -1;

% each of the fundamental units is represented by a prime number
m = 2;
kg = 3; g = 3; % besides representing kg, also represent g to facilitate the processing further down
Expand All @@ -114,7 +121,6 @@
K = 11;
mol = 13;
cd = 17;
unknown = -1;

% each of the derives units is represented by a product and/or ratio of prime numbers
Hz = 1/s;
Expand All @@ -137,6 +143,11 @@
Sv = J/kg;
kat = mol/s;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = m; % it is actually 0.0254 m
feet = inch; % it is actually 12 inch
gauss = T; % it is actually 10^-4 T

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = %s;', unit{i}, unit{i}));
Expand Down Expand Up @@ -202,6 +213,11 @@
Sv = 1;
kat = 1;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = 0.0254;
feet = 0.0254*12;
gauss = 1e-4;

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = 1e-1 * %s;', unit{i}, unit{i}));
Expand Down
24 changes: 20 additions & 4 deletions inverse/private/scalingfactor.m
Expand Up @@ -43,15 +43,20 @@
% sievert Sv equivalent dose (of ionizing radiation) J/kg L2#T-2
% katal kat catalytic activity mol/s T-1#N
%
% The following alternative units are supported
% inch inch length
% feet feet length
% gauss gauss magnetic field strength
%
% The following derived units are not supported due to potential confusion
% between their ascii character representation
% ohm # electric resistance, impedance, reactance V/A M#L2#T-3#I-2
% watt W power, radiant flux J/s = V#A M#L2#T-3
% degree Celsius °C temperature relative to 273.15 K K ?
% degree Celsius ?C temperature relative to 273.15 K K ?
%
% See also http://en.wikipedia.org/wiki/International_System_of_Units

% Copyright (C) 2012, Robert Oostenveld
% Copyright (C) 2012-2015, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip
% for the documentation and details.
Expand Down Expand Up @@ -100,12 +105,14 @@
return
end

unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat'};
unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat' 'inch' 'feet' 'gauss'};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the following section pertains to checking that units are compatible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unknown = -1;

% each of the fundamental units is represented by a prime number
m = 2;
kg = 3; g = 3; % besides representing kg, also represent g to facilitate the processing further down
Expand All @@ -114,7 +121,6 @@
K = 11;
mol = 13;
cd = 17;
unknown = -1;

% each of the derives units is represented by a product and/or ratio of prime numbers
Hz = 1/s;
Expand All @@ -137,6 +143,11 @@
Sv = J/kg;
kat = mol/s;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = m; % it is actually 0.0254 m
feet = inch; % it is actually 12 inch
gauss = T; % it is actually 10^-4 T

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = %s;', unit{i}, unit{i}));
Expand Down Expand Up @@ -202,6 +213,11 @@
Sv = 1;
kat = 1;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = 0.0254;
feet = 0.0254*12;
gauss = 1e-4;

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = 1e-1 * %s;', unit{i}, unit{i}));
Expand Down
24 changes: 20 additions & 4 deletions plotting/private/scalingfactor.m
Expand Up @@ -43,15 +43,20 @@
% sievert Sv equivalent dose (of ionizing radiation) J/kg L2#T-2
% katal kat catalytic activity mol/s T-1#N
%
% The following alternative units are supported
% inch inch length
% feet feet length
% gauss gauss magnetic field strength
%
% The following derived units are not supported due to potential confusion
% between their ascii character representation
% ohm # electric resistance, impedance, reactance V/A M#L2#T-3#I-2
% watt W power, radiant flux J/s = V#A M#L2#T-3
% degree Celsius °C temperature relative to 273.15 K K ?
% degree Celsius ?C temperature relative to 273.15 K K ?
%
% See also http://en.wikipedia.org/wiki/International_System_of_Units

% Copyright (C) 2012, Robert Oostenveld
% Copyright (C) 2012-2015, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip
% for the documentation and details.
Expand Down Expand Up @@ -100,12 +105,14 @@
return
end

unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat'};
unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat' 'inch' 'feet' 'gauss'};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the following section pertains to checking that units are compatible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unknown = -1;

% each of the fundamental units is represented by a prime number
m = 2;
kg = 3; g = 3; % besides representing kg, also represent g to facilitate the processing further down
Expand All @@ -114,7 +121,6 @@
K = 11;
mol = 13;
cd = 17;
unknown = -1;

% each of the derives units is represented by a product and/or ratio of prime numbers
Hz = 1/s;
Expand All @@ -137,6 +143,11 @@
Sv = J/kg;
kat = mol/s;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = m; % it is actually 0.0254 m
feet = inch; % it is actually 12 inch
gauss = T; % it is actually 10^-4 T

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = %s;', unit{i}, unit{i}));
Expand Down Expand Up @@ -202,6 +213,11 @@
Sv = 1;
kat = 1;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = 0.0254;
feet = 0.0254*12;
gauss = 1e-4;

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = 1e-1 * %s;', unit{i}, unit{i}));
Expand Down
24 changes: 20 additions & 4 deletions private/scalingfactor.m
Expand Up @@ -43,15 +43,20 @@
% sievert Sv equivalent dose (of ionizing radiation) J/kg L2#T-2
% katal kat catalytic activity mol/s T-1#N
%
% The following alternative units are supported
% inch inch length
% feet feet length
% gauss gauss magnetic field strength
%
% The following derived units are not supported due to potential confusion
% between their ascii character representation
% ohm # electric resistance, impedance, reactance V/A M#L2#T-3#I-2
% watt W power, radiant flux J/s = V#A M#L2#T-3
% degree Celsius °C temperature relative to 273.15 K K ?
% degree Celsius ?C temperature relative to 273.15 K K ?
%
% See also http://en.wikipedia.org/wiki/International_System_of_Units

% Copyright (C) 2012, Robert Oostenveld
% Copyright (C) 2012-2015, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip
% for the documentation and details.
Expand Down Expand Up @@ -100,12 +105,14 @@
return
end

unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat'};
unit = {'m' 'g' 's' 'A' 'K' 'mol' 'cd' 'Hz' 'rad' 'sr' 'N' 'Pa' 'J' 'C' 'V' 'F' 'S' 'Wb' 'T' 'H' 'lm' 'lx' 'Bq' 'Gy' 'Sv' 'kat' 'inch' 'feet' 'gauss'};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the following section pertains to checking that units are compatible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unknown = -1;

% each of the fundamental units is represented by a prime number
m = 2;
kg = 3; g = 3; % besides representing kg, also represent g to facilitate the processing further down
Expand All @@ -114,7 +121,6 @@
K = 11;
mol = 13;
cd = 17;
unknown = -1;

% each of the derives units is represented by a product and/or ratio of prime numbers
Hz = 1/s;
Expand All @@ -137,6 +143,11 @@
Sv = J/kg;
kat = mol/s;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = m; % it is actually 0.0254 m
feet = inch; % it is actually 12 inch
gauss = T; % it is actually 10^-4 T

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = %s;', unit{i}, unit{i}));
Expand Down Expand Up @@ -202,6 +213,11 @@
Sv = 1;
kat = 1;

% these are the same units as more fundamental units, and only differ with respect to multiplying them with a constant
inch = 0.0254;
feet = 0.0254*12;
gauss = 1e-4;

% deal with all possible prefixes
for i=1:length(unit)
eval(sprintf('d%s = 1e-1 * %s;', unit{i}, unit{i}));
Expand Down

0 comments on commit ed6219c

Please sign in to comment.