Commit b6f33441 authored by Pablo Iturrieta Rebolledo's avatar Pablo Iturrieta Rebolledo
Browse files

removed todo of limited models

parent 363c2bfd
...@@ -26,12 +26,14 @@ import pandas as pd ...@@ -26,12 +26,14 @@ import pandas as pd
def get_simulations(model, catalog, lons, lats): def get_simulations(model, catalog, lons, lats):
seed = 23
forecast_data = model.spatial_counts() forecast_data = model.spatial_counts()
n_obs = catalog.get_number_of_events() n_obs = catalog.get_number_of_events()
num_events_to_simulate = n_obs num_events_to_simulate = n_obs
sampling_weights = numpy.cumsum(forecast_data) / numpy.sum(forecast_data) sampling_weights = numpy.cumsum(forecast_data) / numpy.sum(forecast_data)
sim_fore = numpy.zeros(sampling_weights.shape) sim_fore = numpy.zeros(sampling_weights.shape)
numpy.random.seed(seed)
sim_func = csep.core.poisson_evaluations._simulate_catalog sim_func = csep.core.poisson_evaluations._simulate_catalog
sim = sim_func(num_events_to_simulate, sampling_weights, sim_fore).astype(int) sim = sim_func(num_events_to_simulate, sampling_weights, sim_fore).astype(int)
ind_sim = np.where(sim != 0)[0] ind_sim = np.where(sim != 0)[0]
...@@ -451,7 +453,7 @@ def run_parallel(): ...@@ -451,7 +453,7 @@ def run_parallel():
for catalog, cat_name in zip(catalogs, cat_names): for catalog, cat_name in zip(catalogs, cat_names):
for model in models[12:]: #todo modifyy this for model in models:
print(model.name) print(model.name)
points = np.stack((catalog.get_longitudes(), catalog.get_latitudes())).T points = np.stack((catalog.get_longitudes(), catalog.get_latitudes())).T
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment