diff --git a/source_modelling/community_fault_model.py b/source_modelling/community_fault_model.py index 890fcb0..48e855e 100644 --- a/source_modelling/community_fault_model.py +++ b/source_modelling/community_fault_model.py @@ -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. @@ -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 @@ -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( diff --git a/source_modelling/fsp.py b/source_modelling/fsp.py index eb51100..38d7a13 100644 --- a/source_modelling/fsp.py +++ b/source_modelling/fsp.py @@ -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. @@ -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 @@ -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 diff --git a/source_modelling/rupture_propagation.py b/source_modelling/rupture_propagation.py index 4ae4314..cc4da33 100644 --- a/source_modelling/rupture_propagation.py +++ b/source_modelling/rupture_propagation.py @@ -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. @@ -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