From e980d176183d15f69dd885c4f9d70d00f93632e3 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 09:38:14 +0000 Subject: [PATCH] Document slipt1_array as slip rate (cm/s) Closes #138 Co-Authored-By: Claude Opus 5.5 --- source_modelling/srf.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source_modelling/srf.py b/source_modelling/srf.py index 8e38af4..43adb40 100644 --- a/source_modelling/srf.py +++ b/source_modelling/srf.py @@ -237,8 +237,10 @@ class SrfFile: the linked documentation on the SRF format for more details. slipt1_array : csr_array - A sparse array containing the slip for each point and at each timestep, where - slipt1_array[i, j] is the slip for the ith patch at time t = j * dt. + A sparse array containing the slip rate (cm/s) for each point and at each + timestep, where slipt1_array[i, j] is the slip rate for the ith patch at + absolute time t = j * dt. The non-zero entries of row i start at column + floor(tinit / dt), where tinit is the rupture initiation time of the ith patch. References ---------- @@ -578,8 +580,8 @@ def to_xarray(self, include_slip_time_function: bool = True) -> xr.Dataset: attrs={ "sparse_format": "csr", "original_shape": self.slipt1_array.shape, - "units": "cm", - "description": "Slip for each patch at each timestep", + "units": "cm/s", + "description": "Slip rate for each patch at each timestep", }, ) datasets.append(slip_ds) @@ -590,7 +592,7 @@ def to_xarray(self, include_slip_time_function: bool = True) -> xr.Dataset: @property def slip(self): - "csr_array: A sparse array containing slip-time functions for each point." + "csr_array: A sparse array containing slip-rate functions (cm/s) for each point." return self.slipt1_array @property