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:
start_time (datetime.datetime)
end_time (datetime.datetime)
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
Returns the latitude of the lower left node of the spatial grid
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
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.
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
Contains the spatio-magnitude forecast as 2d numpy.ndarray.
Returns a sum of the forecast data
log
Returns the lowest magnitude bin edge
num_mag_bins
num_nodes
polygons