Skip to content

Add missing XPRT IR blocks: logic, Atan2, Rescale, Alias, discrete Delay#204

Merged
milanofthe merged 3 commits intomasterfrom
feature/xprt-ir-blocks
Feb 26, 2026
Merged

Add missing XPRT IR blocks: logic, Atan2, Rescale, Alias, discrete Delay#204
milanofthe merged 3 commits intomasterfrom
feature/xprt-ir-blocks

Conversation

@milanofthe
Copy link
Copy Markdown
Member

@milanofthe milanofthe commented Feb 26, 2026

New blocks:

  • GreaterThan, LessThan, Equal — comparison operators (logic.py)
  • LogicAnd, LogicOr, LogicNot — boolean logic operators (logic.py)
  • Atan2 — two-argument arctangent (math.py)
  • Rescale — linear mapping from [i0, i1] to [o0, o1] with optional saturation (math.py)
  • Alias — signal pass-through / rename (math.py)

Modified blocks:

  • Delay — new optional sampling_period parameter enables discrete-time N-sample delay mode using Schedule events and a ring buffer (n = round(tau / sampling_period))

@milanofthe milanofthe force-pushed the feature/xprt-ir-blocks branch from 2c27994 to 12eb72d Compare February 26, 2026 09:56
@milanofthe milanofthe force-pushed the feature/xprt-ir-blocks branch from 12eb72d to 250e699 Compare February 26, 2026 09:58
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 88.13559% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pathsim/blocks/math.py 74.46% 12 Missing ⚠️
src/pathsim/blocks/delay.py 96.00% 1 Missing ⚠️
src/pathsim/blocks/logic.py 97.77% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@milanofthe milanofthe merged commit c2a653d into master Feb 26, 2026
4 checks passed
@milanofthe milanofthe deleted the feature/xprt-ir-blocks branch February 26, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant