csep.core.forecasts.GriddedForecast

class csep.core.forecasts.GriddedForecast(start_time=None, end_time=None, *args, **kwargs)[source]

Class to represent grid-based forecasts

__init__(start_time=None, end_time=None, *args, **kwargs)[source]

Constructor for GriddedForecast class

Parameters:

Methods

__init__([start_time, end_time])

Constructor for GriddedForecast class

from_custom(func[, func_args])

Creates MarkedGriddedDataSet class from custom parsing function.

from_dict(adict)

get_index_of(lons, lats)

Returns the index of lons, lats in spatial region

get_latitudes()

Returns the latitude of the lower left node of the spatial grid

get_longitudes()

Returns the lognitude of the lower left node of the spatial grid

get_magnitude_index(mags[, tol])

Returns the indices into the magnitude bins of selected magnitudes

get_magnitudes()

Returns the left edge of the magnitude bins.

get_rates(lons, lats, mags[, data, ret_inds])

Returns the rate associated with a longitude, latitude, and magnitude.

get_valid_midpoints()

Returns the midpoints of the valid testing region

load_ascii(ascii_fname[, start_date, ...])

Reads Forecast file from CSEP1 ascii format.

magnitude_counts()

Returns counts of events in magnitude bins

plot([ax, show, log, extent, set_global, ...])

Plot gridded forecast according to plate-carree projection

scale(val)

Scales forecast by floating point value.

scale_to_test_date(test_datetime)

Scales forecast data by the fraction of the date.

spatial_counts([cartesian])

Integrates over magnitudes to return the spatial version of the forecast.

sum()

Sums over all of the forecast data

target_event_rates(target_catalog[, scale])

Generates data set of target event rates given a target data.

to_dict()

Attributes

data

Contains the spatio-magnitude forecast as 2d numpy.ndarray.

event_count

Returns a sum of the forecast data

log

magnitudes

min_magnitude

Returns the lowest magnitude bin edge

num_mag_bins

num_nodes

polygons