| 1 | We have a first-draft GUI-based app available here: |
| 2 | |
| 3 | [http://opensha.usc.edu/apps/opensha/AfershockGUI/AftershockGUI.jar Download] |
| 4 | |
| 5 | which allows you to fetch data for any event in ComCat and compute sequence-specific RJ aftershock parameters (with limited options at this point). |
| 6 | |
| 7 | You should be able to double click the application to launch it (see TROUBLE SHOOTING JAVA below if not). |
| 8 | |
| 9 | The GUI is simply a wrapper around the code we are writing for the operational system; Ned has been writing the latter and Kevin has built the GUI and enabled access to ComCat. It has a long way to go, but it’s ready for your initial feedback on what types of things you’d like see added. |
| 10 | |
| 11 | == Tutorial == |
| 12 | |
| 13 | '''Once launched''', you’ll see a bunch of adjustable parameters on the left (see screen shot below); mouse over the titles to get more info on each. For now, just click '''“Fetch Data”''' to collect a weeks worth of aftershocks following the Nepal earthquake (the default), or enter any other '''USGS Event ID''' obtained from http://earthquake.usgs.gov/earthquakes (you sometimes have to dig a bit to find the IDs, which look something like “us20002qn7”). The default region used for collecting data is the two-step approach outlined in Jeanne’s doc (and with a min and max depth of 0 and 20 km, respectively). |
| 14 | |
| 15 | At this point you can view a map of epicenters (under the '''Hypocenters''' tab), a magnitude frequency distribution or MFD (under the '''Mag/Num Dist''' tab), and a plot of magnitudes as a function of time ('''Mag/Time Plot''' tab). There is also a '''Console''' tab that writes out some useful information, such as Mmaxc (the mode of the MFD, which is also shown in the MFD plot), and a '''Catalog''' tab which allows you to view the aftershocks in a 10-column format. |
| 16 | |
| 17 | The next thing to do is to set the magnitude of completeness '''Mc''', which defaults to Mmaxc+0.5, and to set the '''Magnitude Precision''' (network rounding, where the default is 0.1; we have no way of getting this from ComCat, so work is needed if this is important). |
| 18 | |
| 19 | Then click '''“Compute b”''' and the maximum likelihood b-value will be set in the “b-value” parameter just below (and the fit will be added to the MFD plot). Either keep this b-value or change it to something else (the plot will update too). |
| 20 | |
| 21 | Next, fill in the range of values for the grid search we will do over the aftershock-parameters ('''a''', '''p''', and '''c'''), or leave at default values. To fix one of the parameters, set the min=max like the default for '''c'''. |
| 22 | |
| 23 | Hit '''“Compute”''' and the maximum-likelihood values for '''a''', '''p''', and '''c''' will be filled in, and various marginal PDFs can be viewed under the '''Model PDFs''' tab. For example, you can see the resultant 2D PDF for '''p''' vs '''a''' in the following screen shot of the app: |
| 24 | |
| 25 | SCREEN SHOT 1 |
| 26 | |
| 27 | Notice that the fit is not so good. Go back and set '''Mc''' as 4.5 rather than 4.95, click '''Compute b''' again, and then click '''“Compute”''' again. The 2D PDF looks better now: |
| 28 | |
| 29 | SCREEN SHOT 2 |
| 30 | |
| 31 | Finally, set the '''Forecast Start Time (Days)''' and likewise for the end time, click '''Compute''' below these settings, and go to the '''Forecast''' tab to see the results. If you want to see the numbers, click the '''Show Data''' option below the plot. |
| 32 | |
| 33 | The app does not yet check things like whether you have enough data to do the calculation, so infinite or NaN values might pop up and possibly crash the app. It seems particularly flakey with respect to parameter ranges for the grid search, as certain combinations can lead to numerical problems. |
| 34 | |
| 35 | It’s a start however, and with your help we can hopefully make it more bullet proof and useful. All these problems will need to be ironed out in the operational code as well, so this GUI should help with that. We could also batch process many events at once (outside the GUI) in order to check or update generic parameters. |
| 36 | |
| 37 | Things to add later include: |
| 38 | |
| 39 | 1) time-dependent '''Mc''' model (we need parameter values) |
| 40 | |
| 41 | 2) inclusion of generic parameters according to the Garcia, FE, or special regions (someone needs to give us those as well), and combined generic and sequence-specific forecasts. |
| 42 | |
| 43 | 3) obtaining finite-rupture surfaces from ComCat (for collecting aftershocks) |
| 44 | |
| 45 | 4) better ways of setting '''Mag Precision'''? |
| 46 | |
| 47 | As for the operational code, once we get the algorithms to Jeanne’s group’s liking, we then need to write the code that will listen to PDL and execute the calculations automatically as events occur (we know what this will take). We will also go through all the code line-by-line with the NEIC hazdev group to make sure it adheres to their standards with respect to testing and robustness. |
| 48 | |
| 49 | == Troubleshooting Java == |
| 50 | |
| 51 | If you don’t have java installed go to https://www.java.com and follow the instructions. If you get a message saying you can’t run the app for security reasons, open the Java control panel (listed as Java under System Preferences on OSX), click the Security tab, click “High” rather than “Very High”, and add http://opensha.usc.edu to the "Exception Site List" at the bottom. You may also need to go to the “Security and Privacy” option under System Preferences (OSX) and then select “Anywhere” under “Allow apps downloaded from:” (click the lock at the bottom of the window to be able to change this setting). If none of this works, please see your system admin, look here for info: https://www.java.com/en/download/help/, or ask Kevin and I. |