forked from williamBarnhart/gCent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runGCent.m
70 lines (59 loc) · 2.07 KB
/
runGCent.m
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
function runGCent(steps,gCentFile)
% runGCent(steps, gCentFile)
% Wrapper function for running the different steps of gCent to produce a
% single path source model of an earthquake from geodetic observations
%
%
% Inputs:
% steps
% 'all' Run data resampling and inversion
% 'resample' Run resampling only
% 'inversion' Run inversion only
% gCentFile
% Full or relative directory path location of the gCent_in.m defaults
% file that has data and event paramaters
%
% Hints
% 1. For the sake of simplicity, most defaults are set in gCentFile. If
% your inversions are not turning out well, such as when the inversion
% wants solutions outside of the allowable search range, you can adjust
% starting locations, strikes, and dips in gCentFile.
%
% 2. The resampler creates a starting fault based on the event location in
% gCentFile. You can look at the interferograms a-priori and choose an
% event location based on the interferogram itself
%
% 3. For large earthquakes, NA may need a larger search distance to find
% the location of the event (the "location" is the center of the fault
% plane, not necessarily the hypocenter. A larger search distance can be
% achieved by changing the p.radius range in writeRunNAIn.m
run(gCentFile)
if(isfolder(WORKDIR)==0)
mkdir(WORKDIR)
end
switch steps
case 'all'
if(isfolder([WORKDIR '/RESAMP'])==0)
mkdir([WORKDIR '/RESAMP']);
end
if(isempty(insarDataFiles)~=1);
doInSARResample(gCentFile);
end
% if(isempty(gpsTimeSeriesDir)~=1);
% doGPSoffsets(gCentFile);
% end
% doOpticalResample(gCentFile);
runNA(gCentFile);
case 'resample'
if(isfolder([WORKDIR '/RESAMP'])==0)
mkdir([WORKDIR '/RESAMP']);
end
if(isempty(insarDataFiles)~=1);
doInSARResample(gCentFile);
end
% if(isempty(gpsTimeSeriesDir)~=1);
% doGPSoffsets(gCentFile);
% end
case 'inversion'
runNA(gCentFile);
end