Skip to content

Commit

Permalink
moved save directory outside of zmap
Browse files Browse the repository at this point in the history
worked on some of the cross section methods
fixed bug on loading preferences  app
zmap no longer crashes when no catalog present on restart
added a method (that may change) to cut catalog and crop based on current selections
Fixed FDSN import when request is too large. It treated the max allowable, and max retrieved as the same thing.
  • Loading branch information
CelsoReyes committed Apr 4, 2019
1 parent 4e7834a commit 60e7717
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 238 deletions.
6 changes: 3 additions & 3 deletions +defaults/general_defaults.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Directories":{
"output":"./output",
"data":"./eq_data",
"working":"./working"
"output":"../m_zmap_files/output",
"data":"../my_zmap_files/eq_data",
"working":"../my_zmap_files/zmap7/working"
},
"ParallelProcessing":{
"Enable":false,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Clicking on the `see distributions` button will show a few histograms that may h
### Main Map Screen

Once a catalog is loaded, earthquakes will be plotted in the Main Window.
![MainMapScreen](resources/img/ZmapMainWindow_20180216.png)
![MainMapScreen](docs/img/ZmapMainWindow_20180216.png)
This is where most of the work will happen. The screen is divided into several sections. When first presented, all events will be hilighted, and the main map will take up the entirety of the left side of the window.

The plots on the right side of the screen will reflect statistics for the entire catalog.
Expand Down
11 changes: 7 additions & 4 deletions importfilters/import_fdsn_event.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,15 @@
ok=false;
case "BadRequest"
disp(resp.Body.Data)

numbers= double(regexp(extractBefore(resp.Body.Data,'Request:'),'\d\d\d+','match'));
% first number is the error, so ignore it.
numbers(1)=[];
% second number is
% as of 2018-12-14, USGS returns this result when limit is exceeded. these depend on the error message wording
maxSearchLimit = double(extractBefore(extractAfter(resp.Body.Data,'exceeds search limit of '),'.'));
nFound = double(extractBefore(extractAfter(resp.Body.Data,'exceeds search limit of '),'.'));
maxSearchLimit = min(numbers);
nFound = max(numbers);
if ~ismissing(maxSearchLimit)
warning("maximum number of events [%d] exceeded. atttempting to limit results", maxSearchLimit);
warning("maximum number of events [%d] exceeded. attempting to limit results", maxSearchLimit);
% try again, in chunks of maxSearchLimit
disp('* trying again while limiting results')
[resp, ok] = get_in_chunks(myuri, maxSearchLimit, nFound);
Expand Down
2 changes: 1 addition & 1 deletion src/+XYfun/bvalgrid.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'Additional_Runs_b_std', 'Additional_Runs_Mc_std', 'failreason', 'nEvents_gt_local_Mc'}

ParameterableProperties = ["NodeMinEventCount", "nBstSample", "useBootstrap", "fMccorr",...
"fBinning", "mc_choice", "mc_auto_est"];
"fBinning", "mc_choice", "mc_auto_est"]

References = "";
end
Expand Down
10 changes: 2 additions & 8 deletions src/+XZfun/bcross.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
properties
nBstSample {mustBeNonnegative,mustBeInteger} = 100 % number of bootstrap samples
useBootstrap logical = false % perform bootstrapping?
fMccorr double = 0.2 % magnitude correction
fMccorr double = 0.0 % magnitude correction
fBinning {mustBePositive} = 0.1 % magnitude bins
mc_choice McMethods = McMethods.MaxCurvature % magnitude of completion method
mc_auto_est McAutoEstimate = McAutoEstimate.auto
Expand Down Expand Up @@ -33,7 +33,7 @@

ParameterableProperties = ["NodeMinEventCount", "nBstSample", "useBootstrap", "fMccorr",...
"fBinning", "mc_choice", "mc_auto_est"];
References = "";
References = ""
end

methods
Expand Down Expand Up @@ -61,14 +61,9 @@ function InteractiveSetup(obj)
zdlg.AddHeader('Choose stuff');

zdlg.AddMcMethodDropdown('mc_choice');
% zdlg.AddGridSpacing('gridOpts', dx, 'km' , [], '' , dd, 'km');
% obj.AddDialogOption(zdlg, 'EventSelector');

zdlg.AddEdit('fBinning' , 'Magnitude binning' , obj.fBinning,...
'Bins for magnitudes');
obj.AddDialogOption(zdlg, 'NodeMinEventCount');
%zdlg.AddEdit('fMcFix' , 'Fixed Mc' , fMcFix,...
% 'fixed magnitude of completeness (Mc)');
zdlg.AddEdit('fMccorr' , 'Mc correction factor' , obj.fMccorr,...
'Correction term to be added to Mc');
zdlg.AddCheckbox('useBootstrap' , 'Use Bootstrapping' , false, checkboxTargets,...
Expand Down Expand Up @@ -145,7 +140,6 @@ function InteractiveSetup(obj)

function ModifyGlobals(obj)
obj.ZG.bvg = obj.Result.values;
obj.ZG.Grid = obj.Grid; %TODO do we really write back the grid?
end
end

Expand Down
Loading

0 comments on commit 60e7717

Please sign in to comment.