Skip to content

Commit

Permalink
fixing property
Browse files Browse the repository at this point in the history
  • Loading branch information
Hojat-Shirmard committed Nov 25, 2024
1 parent 9c1c6e3 commit a61e923
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions gplately/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1963,30 +1963,34 @@ def plot_topological_plate_boundaries(self, ax, color="black", **kwargs):
**kwargs,
)

@append_docstring(GET_DATE_DOCSTRING.format("topologies"))
@validate_reconstruction_time
@property
@append_docstring(GET_DATE_DOCSTRING.format("ridge transforms"))
def ridge_transforms(self):
"""Combine ridges and transforms into one feature set."""
if self._topological_plate_boundaries is None:
logger.debug("Accessing ridge transforms - updating topological plate boundaries.")
self.update_time(self.time)
logger.debug("Returning ridge_transforms property.")
return self.ridges + self.transforms

def get_ridge_transforms(self, central_meridian=0.0, tessellate_degrees=None):
"""Create a GeoDataFrame containing geometries of reconstructed ridge transforms."""
logger.debug("Getting reconstructed ridge transforms.")
return self.get_feature(
self.ridge_transforms,
central_meridian=central_meridian,
tessellate_degrees=tessellate_degrees
)

@validate_topology_availability("all topologies")
@append_docstring(PLOT_DOCSTRING.format("topologies"))
@validate_topology_availability("ridge transforms")
@append_docstring(PLOT_DOCSTRING.format("ridge transforms"))
def plot_ridge_transforms(self, ax, color="black", **kwargs):
"""Plot reconstructed ridge transforms onto a map."""
"""Plot reconstructed ridge transforms onto a map."""
logger.debug("Plotting reconstructed ridge transforms.")
return self.plot_feature(
ax,
self.ridge_transforms,
feature_name="ridge_transforms",
color=color,
edgecolor=color,
**kwargs,
)

0 comments on commit a61e923

Please sign in to comment.