-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSSM.m
More file actions
49 lines (40 loc) · 1.54 KB
/
SSM.m
File metadata and controls
49 lines (40 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% SSM.m - Single Station processing (Matlab)
% This script is a second chance to plot and process
% the data and/or to correct the metaData after running
% SS and saving the Matlab variables to a *.mat file.
% This script is identical to SS except is obtains the
% data & metaData from the *.mat file rather than from
% the original binary file; this could be faster if
% the binary file is large.
%
% Just like SS, it uses the paths structure Survey that is
% set in startUpSurvey.m; it gets updated with the path to
% the original NIMS binary file when *.mat is loaded.
warning off;
% run startUpSurvey & attract attention to this window with a warning message
if ~exist('Survey','var')
% msg = ['Before processing, please run startUpSurvey '...
% 'to choose the root directory for your MT survey. Then run SSM again.'];
% h = warndlg(msg);
% uiwait(h); return;
% getOS;
Survey = startUpSurvey %#ok<NOPTS>
end
% Reading from Matlab data file
cd (Survey.original);
[dataFile,dataPath] = uigetfile('*.mat');
load ([dataPath dataFile]);
README
% If the *.nim file with the same base name exists
% in the same directory, assume this is the raw data
clear original
original.Path = dataPath;
dataFile = [dataFile(1:end-4) '.nim'];
if exist([dataPath dataFile],'file')>0
original.File = dataFile;
end
if ~exist(Survey.data,'dir'); mkdir(Survey.data); end
% If the metaData structure has changed, update it
metaData = updateMetaData(metaData,Header,GPS,seq,stat,dupl);
% Here: pop up a window with the metaData
h = checkHeaderGUI(metaData);