gempy icon indicating copy to clipboard operation
gempy copied to clipboard

Automaticly set at least two points per surface

Open Leguark opened this issue 6 years ago • 0 comments

Right now we only raise an assert error. Ideally, we would duplicate the single point and print a warn massage. Possibly at the computation moment.

This is the code that makes the trick:

id_only_one_bool = geo_model.surface_points.df['id'].value_counts() == 1 id_only_one = id_only_one_bool.index[id_only_one_bool] single_vals = geo_model.surface_points.df[geo_model.surface_points.df['id'].isin(id_only_one)] for idx, vals in single_vals.iterrows(): print(i[1]['X']) geo_model.add_surface_points(vals['X'], vals['Y'], vals['Z'], vals['surface'])

Leguark avatar Sep 01 '19 08:09 Leguark