parasolpy.ism
Index Sequential Method (ISM) trace generation.
Functions
|
Generate ISM synthetic traces from a historical inflow record. |
- parasolpy.ism.create_ism_traces(inflow, k, trace_length)[source]
Generate ISM synthetic traces from a historical inflow record.
The Index Sequential Method creates an ensemble of synthetic traces by sliding a window of length
trace_lengthover a doubled (wrap-around) copy of the historical record, stepping byktimesteps each time.- Parameters:
inflow – 1-D numpy array of historical inflow values.
k – Step size between trace start points. Controls how many traces are generated:
num_traces = floor(len(inflow) / k).trace_length – Number of timesteps in each output trace.
- Returns:
traces: 2-D array of shape
(trace_length, num_traces)where each column is one synthetic trace.indices: 2-D array of the same shape. Values are indices into the doubled record (
range(0, 2 * len(inflow))), not the original. Useindices % len(inflow)to map back to original record positions.
- Return type:
tuple[numpy.ndarray, numpy.ndarray]