Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source_modelling/community_fault_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""This module provides classes and functions for the New Zealand Community Fault Model.

The New Zealand Community Fault Model (CFM) is a collection of fault data for New
Zealand. The CFM is stored in a GeoPackage file and can be accessed using the
Zealand. The CFM is stored in a shapefile and can be accessed using the
functions in this module. The function `most_likely_nodal_plane` can be used to
find the most likely nodal plane for a given centroid and two nodal planes, by
querying nearby faults in the CFM.
Expand Down Expand Up @@ -249,13 +249,13 @@ class CommunityFault:
slip_rate_timeframe_unit: int | None
"""The unit of the slip rate timeframe."""
down_dip_depth90: float
"""Not sure!"""
"""The D90 down-dip depth estimate of the fault (km)."""
down_dip_depth_dfc: float
"""Not sure!"""
"""The Dfc down-dip depth estimate of the fault (km)."""
down_dip_depth90_method: DipMethod
"""Not sure!"""
"""The method used to derive the D90 down-dip depth."""
down_dip_dfc_method: DipMethod
"""Not sure!"""
"""The method used to derive the Dfc down-dip depth."""
up_dip_depth: Range
"""The up dip depth range."""
quality_code: int
Expand Down Expand Up @@ -405,7 +405,7 @@ def community_fault_model_as_geodataframe() -> "gpd.GeoDataFrame":

model = get_community_fault_model()

# Transform the trace to WGS84
# Swap traces from (northing, easting) to (x=easting, y=northing) as required by EPSG:2193
for fault in model:
fault.trace = shapely.transform(fault.trace, lambda coord: coord[:, ::-1])
return gpd.GeoDataFrame(
Expand Down
11 changes: 6 additions & 5 deletions source_modelling/fsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ class FSPFile:
Average speed of rupture front.
slip_velocity_function : str
Description of the slip velocity function used
nx : float or None
nx : int or None
The number of subfaults along strike.
nz : float or None
nz : int or None
The number of subfaults along dip.
dx : float
The length of each subfault.
Expand All @@ -193,13 +193,14 @@ class FSPFile:
fmax : float or None
The maximum frequency in the inversion.
time_window_count : float or None
The slip (or rake) time windows for each subfault.
The number of slip (or rake) time windows for each subfault.
time_window_length : float or None
The time window length for each subfault.
time_shift : float or None
The time shift for each time window.
segment_count : int
Number of segments (subfaults).
Number of fault segments. This is not the number of subfaults
(rows of `data`), which are counted across all segments.
data : pd.DataFrame
The data frame of info on each subfault. Columns vary for this
dataframe, but each comes with 'segment', 'length', and 'width' which
Expand Down Expand Up @@ -251,7 +252,7 @@ class FSPFile:
time_window_length: float | None
time_shift: float | None

# Number of segments (== len(data))
# Number of fault segments (not subfaults, so != len(data))
segment_count: int
data: pd.DataFrame

Expand Down
4 changes: 2 additions & 2 deletions source_modelling/rupture_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

def spanning_tree_with_probabilities(
graph: nx.Graph,
) -> tuple[list[nx.DiGraph], list[float]]:
) -> tuple[list[nx.Graph], list[float]]:
r"""
Compute all spanning trees of a graph and their unnormalised weights.

Expand All @@ -51,7 +51,7 @@ def spanning_tree_with_probabilities(

Returns
-------
list[nx.DiGraph]
list[nx.Graph]
A list of spanning trees of the graph.
list[float]
The unnormalised weight P(T) of each spanning tree, in the same order
Expand Down
Loading