Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Karina Loviknes committed Aug 17, 2020
1 parent d2b70c0 commit f0e5ea6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions EGF_tc_toolbox/read_settings.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
vouts{10} = 24; % cross correlation stacking length
vouts{11} = 100; % overlapping percent cross correlation
datesm = {};
bpfm = {};
filterm = {};
iterations = 3;
lag_red = 5000;
stackperiod = split('whole 0');
Expand All @@ -49,7 +49,7 @@
xaxis = [-150 150];
yaxis = [-100 100];
titl = 'name';
bpfp = {};
filterp = {};
fc1 = {};
fc2 = {};

Expand All @@ -61,12 +61,12 @@

vo=1; % Count the number of varargout variables
for j=1:nc
var_name=char(txt{j,1})
var=char(txt{j,2})
var_name=char(txt{j,1});
var=char(txt{j,2});

% Extract the variables:
if strcmp(var_name, 'network')
network=var
network=var;

elseif strcmp(var_name, 'stations')
stations=split(var);
Expand Down Expand Up @@ -115,7 +115,7 @@
% Number of missing files in a row tolerated
vouts{6}=str2num(var);

elseif strcmp(var_name, 'bpf')
elseif strcmp(var_name, 'filter')
% Bandpass filter to apply during pre processing
vouts{7}=str2num(var);

Expand All @@ -139,9 +139,9 @@
% Bandpass filter to apply before measuring time errors
datesm=split(var);

elseif strcmp(var_name, 'bpfm')
elseif strcmp(var_name, 'filterm')
% Bandpass filter to apply before measuring time errors
bpfm=str2num(var);
filterm=str2num(var);

elseif strcmp(var_name, 'iterations')
% Number of iterations to run the measuring process
Expand Down Expand Up @@ -190,9 +190,9 @@
% PLot title
titl=var;

elseif strcmp(var_name, 'bpfp')
elseif strcmp(var_name, 'filterp')
% Bandpass filter before plot
bpfp=str2num(var);
filterp=str2num(var);

elseif strcmp(var_name, 'cutoff_freq1')
% Bandpass filter before plot
Expand Down Expand Up @@ -221,7 +221,7 @@
% Read the entire file
varargout=vouts;
varargout{vo+1}=datesm;
varargout{vo+2}=bpfm;
varargout{vo+2}=filterm;
varargout{vo+3}=iterations;
varargout{vo+4}=stackperiod;
varargout{vo+5}=fit;
Expand All @@ -230,7 +230,7 @@
varargout{vo+8}=xaxis;
varargout{vo+9}=yaxis;
varargout{vo+10}=titl;
varargout{vo+11}=bpfp;
varargout{vo+11}=filterp;
varargout{vo+12}=lag_red;
varargout{vo+13}=fc1;
varargout{vo+14}=fc2;
Expand All @@ -242,7 +242,7 @@
elseif strcmp(varargin{1},'TD')
% Read the variables used to measure timeshifts
varargout{1}=datesm;
varargout{2}=bpfm;
varargout{2}=filterm;
varargout{3}=iterations;
varargout{4}=lag_red;
varargout{5}=stackperiod;
Expand All @@ -264,7 +264,7 @@
varargout{1}=xaxis;
varargout{2}=yaxis;
varargout{3}=titl;
varargout{4}=bpfp;
varargout{4}=filterp;
varargout{5}=lag_red;
varargout{6}=datesm;

Expand All @@ -283,7 +283,7 @@
varargout{2}=vouts{3}; % pole zero file
varargout{3}=vouts{3}; % Dateformat
varargout{4}=lag_red;
varargout{5}=bpfp;
varargout{5}=filterp;
varargout{6}=datesm;

elseif strcmp(varargin{1},'CORRECT')
Expand Down
8 changes: 4 additions & 4 deletions EGF_tc_toolbox/settingsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dateformat = yyyy.ddd
% the Green's function
% Pole-zero file format, if not specified the default format is
% [SAC_PZs_NS_stationname_HHchannels.pz]
pz_file = stationname/SAC_PZs_NS_stationname_HHchannels.pz
pz_file = ../stationname/SAC_PZs_NS_stationname_HHchannels.pz

% Decimate factor, if no downsampling is needed leave out or blank
% decimate =
Expand Down Expand Up @@ -67,7 +67,7 @@ perco = 50

% Bandpass filter to apply on the daily noise correlations and reference trace
%before measuring time delays, if not specified no filter will be applied
%filterm =
%filterm = [0.01 1.25]

% Number of iterations to run the measuring process, must be an integer,
% default is 3
Expand Down Expand Up @@ -118,7 +118,7 @@ yaxis = -4 4
titl = alphabet

% Filter
%filterp = bp [10 25]
%filterp = [10 25]

%% FILTER
% Specify values for applying different bandpass filters:
Expand All @@ -129,7 +129,7 @@ cutoff_freq2 = [1.25 1 0.5 0.2 0.1]
% The filename format of the corrected output, must include station name, date and folder
% (if in another folder), if not specified default is
% [network.stationname.location.HHchannels.D.yyyy.ddd.SAC]
filenameO = stationname/network.stationname.00.HHchannels.D.yyyy.ddd.000000.SAC
filenameO = ../stationname/network.stationname.00.HHchannels.D.yyyy.ddd.000000.SAC

% Input file format, can be either sac (default) or miniseed
fileformatO = sac
Expand Down

0 comments on commit f0e5ea6

Please sign in to comment.