From ed6219c58880eaf136084ed9c90ff2c90a7700fe Mon Sep 17 00:00:00 2001 From: Robert Oostenveld Date: Tue, 6 Oct 2015 16:12:40 +0000 Subject: [PATCH] automatically synchronized identical files to revision 10749 git-svn-id: svn+ssh://svn.fcdonders.nl/home/svnroot/fieldtrip/trunk@10750 0cf7c7f0-3615-4144-b4e6-68da3bce3cd0 --- fileio/private/scalingfactor.m | 24 ++++++++++++++++++++---- forward/private/scalingfactor.m | 24 ++++++++++++++++++++---- inverse/private/scalingfactor.m | 24 ++++++++++++++++++++---- plotting/private/scalingfactor.m | 24 ++++++++++++++++++++---- private/scalingfactor.m | 24 ++++++++++++++++++++---- 5 files changed, 100 insertions(+), 20 deletions(-) diff --git a/fileio/private/scalingfactor.m b/fileio/private/scalingfactor.m index f9ed10c5fe..dede2a6ee5 100644 --- a/fileio/private/scalingfactor.m +++ b/fileio/private/scalingfactor.m @@ -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. @@ -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 @@ -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; @@ -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})); @@ -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})); diff --git a/forward/private/scalingfactor.m b/forward/private/scalingfactor.m index f9ed10c5fe..dede2a6ee5 100644 --- a/forward/private/scalingfactor.m +++ b/forward/private/scalingfactor.m @@ -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. @@ -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 @@ -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; @@ -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})); @@ -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})); diff --git a/inverse/private/scalingfactor.m b/inverse/private/scalingfactor.m index f9ed10c5fe..dede2a6ee5 100644 --- a/inverse/private/scalingfactor.m +++ b/inverse/private/scalingfactor.m @@ -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. @@ -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 @@ -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; @@ -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})); @@ -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})); diff --git a/plotting/private/scalingfactor.m b/plotting/private/scalingfactor.m index f9ed10c5fe..dede2a6ee5 100644 --- a/plotting/private/scalingfactor.m +++ b/plotting/private/scalingfactor.m @@ -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. @@ -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 @@ -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; @@ -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})); @@ -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})); diff --git a/private/scalingfactor.m b/private/scalingfactor.m index f9ed10c5fe..dede2a6ee5 100644 --- a/private/scalingfactor.m +++ b/private/scalingfactor.m @@ -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. @@ -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 @@ -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; @@ -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})); @@ -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}));