MCPcopy
hub / github.com/vladmandic/sdnext / _count_steps_in_range

Function _count_steps_in_range

modules/processing_correction.py:196–202  ·  view source on GitHub ↗

Count scheduler timesteps that fall within (low, high) exclusive.

(pipe, low, high)

Source from the content-addressed store, hash-verified

194
195
196def _count_steps_in_range(pipe, low, high):
197 """Count scheduler timesteps that fall within (low, high) exclusive."""
198 timesteps = getattr(getattr(pipe, 'scheduler', None), 'timesteps', None)
199 if timesteps is None:
200 return 1
201 count = sum(1 for t in timesteps.tolist() if low < t < high)
202 return max(count, 1)
203
204
205def _count_steps_below(pipe, threshold):

Callers 1

correction_callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected