Added loading TimeBase vector into struct. Updated intern docs

This commit is contained in:
sakul-45 2021-07-27 13:17:35 +02:00
parent 00ece83446
commit 6f535bfd92
2 changed files with 38 additions and 31 deletions

View File

@ -14,22 +14,24 @@ function [Data,params] = load_bruker(path)
% Example for params output: % Example for params output:
% params = % params =
% %
% struct with fields: % struct with fields: Units
% %
% Field_Center: 3500 % Field_Center: 3500 G
% Field_Sweep: 3400 % Field_Sweep: 2700 G
% Field_Step: 5 % Field_Step: 5 G
% Accumulations: 100 % Accumulations: 100 -
% laser_shotreprate: 20 % laser_shotreprate: 20 -
% Field_Start: 1800 % Field_Start: 2150 G
% Field_End: 5200 % Field_End: 4850 G
% Field_Vector: [1×681 double] % Field_Vector: [1×540 double] G
% mwFreq: 9.6845 % mwFreq: 9.6845 GHz
% mwPower: 0.2000 % mwPower: 0.2000 W
% QValue: 22800 % QValue: 22800 -
% mwAtten: 30 % mwAtten: 30 dB
% mwFreqs: [681×1 double] % mwFreqs: [681×1 double] GHz
% Name: "/some/path" % TimeBase: [1×10001 double] s
% Path: '/some/path/' -
% Name: 'example_data' -
%correct \ for / %correct \ for /
corrpath = replace(path,"\","/"); corrpath = replace(path,"\","/");
@ -51,6 +53,7 @@ params.mwPower = bruker_params.MWPW * 1e3;
params.QValue = "NOT RECORDED"; params.QValue = "NOT RECORDED";
params.mwAtten = str2double(extractBefore(string(bruker_params.PowerAtten),' ')); params.mwAtten = str2double(extractBefore(string(bruker_params.PowerAtten),' '));
params.mwFreqs = "NOT RECORDED"; params.mwFreqs = "NOT RECORDED";
params.TimeBase = (bruker_params.XMIN:(bruker_params.XWID/bruker_params.XPTS):(bruker_params.XMIN+bruker_params.XWID)) .* 1e-9;
%get filename for further documentation and exporting figures %get filename for further documentation and exporting figures
[datapath,dataname,~] = fileparts(corrpath); [datapath,dataname,~] = fileparts(corrpath);

View File

@ -10,27 +10,31 @@ function [Data,params] = load_matlab(path)
% Example for params output: % Example for params output:
% params = % params =
% %
% struct with fields: % struct with fields: Units
% %
% Field_Center: 3500 % Field_Center: 3500 G
% Field_Sweep: 3400 % Field_Sweep: 2700 G
% Field_Step: 5 % Field_Step: 5 G
% Accumulations: 100 % Accumulations: 100 -
% laser_shotreprate: 20 % laser_shotreprate: 20 -
% Field_Start: 1800 % Field_Start: 2150 G
% Field_End: 5200 % Field_End: 4850 G
% Field_Vector: [1×681 double] % Field_Vector: [1×540 double] G
% mwFreq: 9.6845 % mwFreq: 9.6845 GHz
% mwPower: 0.2000 % mwPower: 0.2000 W
% QValue: 22800 % QValue: 22800 -
% mwAtten: 30 % mwAtten: 30 dB
% mwFreqs: [681×1 double] % mwFreqs: [681×1 double] GHz
% Name: "/some/path" % TimeBase: [1×10001 double] s
% Path: '/some/path/' -
% Name: 'example_data' -
%correct \ for / %correct \ for /
corrpath = replace(path,"\","/"); corrpath = replace(path,"\","/");
load(corrpath,'Data','params') %load data and write TimeBase in params
load(corrpath,'Data','params','TimeBase')
params.TimeBase = TimeBase;
%get filename for further documentation and exporting figures %get filename for further documentation and exporting figures
[datapath,dataname,~] = fileparts(corrpath); [datapath,dataname,~] = fileparts(corrpath);