Skip to content

Commit 13ecaa2

Browse files
author
Lachlan Grose
committed
style: black formatting
1 parent 783ec2f commit 13ecaa2

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

LoopStructural/visualisation/model_plotter.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def add_section(
212212
name,
213213
colour=colour,
214214
paint_with=paint_with,
215-
**kwargs
215+
**kwargs,
216216
)
217217

218218
def add_isosurface(
@@ -230,7 +230,7 @@ def add_isosurface(
230230
colours=None,
231231
opacity=None,
232232
function=None,
233-
**kwargs
233+
**kwargs,
234234
):
235235
"""Plot the surface of a geological feature
236236
@@ -334,7 +334,9 @@ def add_isosurface(
334334
)
335335

336336
if isovalue > np.nanmax(val) or isovalue < np.nanmin(val):
337-
logger.warning("Isovalue doesn't exist inside bounding box")
337+
logger.warning(
338+
f"{geological_feature.name}: Isovalue doesn't exist inside bounding box"
339+
)
338340
continue
339341
try:
340342
verts, faces, normals, values = marching_cubes(
@@ -380,7 +382,7 @@ def add_isosurface(
380382
paint_with=paint_with,
381383
paint_with_value=paint_with_value,
382384
cmap=cmap,
383-
**kwargs
385+
**kwargs,
384386
)
385387

386388
def add_scalar_field(
@@ -392,7 +394,7 @@ def add_scalar_field(
392394
vmax=None,
393395
opacity=None,
394396
paint_with=None,
395-
**kwargs
397+
**kwargs,
396398
):
397399
"""Add a block the size of the model area painted with the scalar field value
398400
@@ -432,7 +434,7 @@ def add_scalar_field(
432434
vmin=vmin,
433435
vmax=vmax,
434436
opacity=opacity,
435-
**kwargs
437+
**kwargs,
436438
)
437439

438440
def add_box(self, bounding_box, name, colour="red", **kwargs):
@@ -498,7 +500,7 @@ def add_model(self, cmap=None, **kwargs):
498500
name,
499501
paint_with=lambda xyz: self.model.evaluate_model(xyz, scale=False),
500502
cmap=cmap,
501-
**kwargs
503+
**kwargs,
502504
)
503505

504506
def add_fault_displacements(self, cmap="rainbow", **kwargs):
@@ -568,7 +570,7 @@ def add_model_surfaces(
568570
cmap=None,
569571
fault_colour="black",
570572
displacement_cmap=None,
571-
**kwargs
573+
**kwargs,
572574
):
573575
"""Add surfaces for all of the interfaces in the model
574576
@@ -661,7 +663,7 @@ def add_model_surfaces(
661663
slices=values,
662664
names=names,
663665
colours=colours,
664-
**kwargs
666+
**kwargs,
665667
)
666668
pbar.update(len(values))
667669

@@ -702,7 +704,7 @@ def mask(x):
702704
region=mask,
703705
colour=fault_colour,
704706
name=f.name + name_suffix,
705-
**kwargs
707+
**kwargs,
706708
)
707709
pbar.update(1)
708710
logger.info("Adding surfaces took {} seconds".format(time.time() - start))
@@ -799,7 +801,7 @@ def add_data(self, feature, disks=False, vectors=False, **kwargs):
799801
grad[:, 3:6],
800802
name + "_grad_cp",
801803
symbol_type=symbol_type,
802-
**kwargs
804+
**kwargs,
803805
)
804806

805807
if norm.shape[0] > 0 and add_grad:
@@ -808,22 +810,22 @@ def add_data(self, feature, disks=False, vectors=False, **kwargs):
808810
norm[:, 3:6],
809811
name + "_norm_cp",
810812
symbol_type=symbol_type,
811-
**kwargs
813+
**kwargs,
812814
)
813815
if value.shape[0] > 0 and add_value:
814816
kwargs["range"] = [feature.min(), feature.max()]
815817
self.add_value_data(
816818
self.model.rescale(value[:, :3], inplace=False),
817819
value[:, 3],
818820
name + "_value_cp",
819-
**kwargs
821+
**kwargs,
820822
)
821823
if tang.shape[0] > 0 and add_tang:
822824
self.add_vector_data(
823825
self.model.rescale(tang[:, :3], inplace=False),
824826
tang[:, 3:6],
825827
name + "_tang_cp",
826-
**kwargs
828+
**kwargs,
827829
)
828830
if interface.shape[0] > 0 and add_interface:
829831
self.add_points(
@@ -1020,5 +1022,5 @@ def add_support_box(self, geological_feature, paint=False, **kwargs):
10201022
tri,
10211023
name,
10221024
paint_with=paint_with,
1023-
**kwargs
1025+
**kwargs,
10241026
)

0 commit comments

Comments
 (0)