CatalogForecast(filename=None, catalogs=None, name=None, filter_spatial=False, filters=None, apply_mct=False, region=None, expected_rates=None, start_time=None, end_time=None, n_cat=None, event=None, loader=None, catalog_type='ascii', catalog_format='native')¶
Catalog based forecast defined as a family of stochastic event sets.
__init__(filename=None, catalogs=None, name=None, filter_spatial=False, filters=None, apply_mct=False, region=None, expected_rates=None, start_time=None, end_time=None, n_cat=None, event=None, loader=None, catalog_type='ascii', catalog_format='native')¶
The region information can be provided along side the data, if they are stored in one of the supported file formats. It is assumed that the region for each data is identical. If the regions are not provided with the data files, they must be provided explicitly. The california testing region can be loaded using
There are a few different ways this class can be constructed, each
The region is not required to load a forecast or to perform basic operations on a forecast, such as counting events. Any binning of events in space or magnitude will require a spatial region or magnitude bin definitions, respectively.
filename (str) – Path to the file or directory containing the forecast.
catalogs – iterable of
filter_spatial (bool) – if true, will filter to area defined in space region
apply_mct (bool) – this should be provided if a time-dependent magnitude completeness model should be applied to the forecast
filters (iterable) – list of data filter strings. these override the filter_magnitude and filter_time arguments
csep.core.spatial.CartesianGrid2Dincluding magnitude bins
start_time (datetime.datetime) – start time of the forecast
end_time (datetime.datetime) – end time of the forecast
name (str) – name of the forecast, will be used for defaults in plotting and other places
n_cat (int) – number of catalogs in the forecast
csep.models.Event) – if the forecast is associated with a particular event
__init__([filename, catalogs, name, …])
The region information can be provided along side the data, if they are stored in one of the supported file formats.
Return a single dataframe with all of the events from all of the catalogs.
Compute the expected rates in space-magnitude bins
Loads ASCII format for data forecast.
Returns expected magnitude counts from forecast
Returns the expected spatial counts from forecast
write_ascii(fname[, header, loader])
Writes data forecast to ASCII format
Returns left bin-edges of magnitude bins
Returns smallest magnitude bin edge of forecast