parasolpy.ism

Index Sequential Method (ISM) trace generation.

Functions

create_ism_traces(inflow, k, trace_length)

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_length over a doubled (wrap-around) copy of the historical record, stepping by k timesteps 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. Use indices % len(inflow) to map back to original record positions.

Return type:

tuple[numpy.ndarray, numpy.ndarray]