%-------------------------------------------------------------------------------
README
%-------------------------------------------------------------------------------

PredictMmax uses two statistical models (Hallo et al., 2014; Shapiro et al., 2010)
to forecast event magnitudes based on correlations between seismicity and 
injection volumes. See Verdon and Budge (2018, BSSA) for more details. 

It is called in Matlab as:

>> [Mmax1,Mmax2,Seff,b,SI,MC,IC] = PredictMmax(M,T,IR,IT,Vmax,...)

INPUTS:
M = observed event magnitudes up to a given time 
T = observed event times up to a given time
IR = injection rate up to a given time
IT = injection rate times up to a given time
Vmax = the ultimate total injection volume that will be used

OUTPUTS:
Mmax1 = Mmax estimated using Hallo method
Mmax2 = Mmax estimated using Shapiro method
Seff = seismic efficiency
SI = seismogenic index
MC = cumulative moment release
IC = cumulative fluid injection volume

The directory Demo/ contains an example where PredictMmax is used to
forecast magnitudes during a hydraulic fracturing job. Typically, 
a loop over time is created, with PredictMmax being used to re-calculate
the forecast magnitudes every 1 - 10 minutes, as shown in the demonstration
example

The function PredictMmaxPlot.m has been designed to plot the outputs from
PredictMmax


