Skip to content

FEAT: Poisson process time of arrival and random reflection sign - #176

Open
mberz wants to merge 15 commits into
enh/reflection_rate_and_numberfrom
feat/poisson_process_toa
Open

FEAT: Poisson process time of arrival and random reflection sign#176
mberz wants to merge 15 commits into
enh/reflection_rate_and_numberfrom
feat/poisson_process_toa

Conversation

@mberz

@mberz mberz commented Jul 13, 2026

Copy link
Copy Markdown
Member

Which issue(s) are closed by this pull request?

None

Changes proposed in this pull request:

  • Add a function to sample times of arrival from a non homogeneous Poisson process
    • The non homogeneous Poisson process is mapped to a homogeneous equivalent for non iterative sampling
    • The cumulative density function is integrated numerically (instead of using the closed form solution from classic room acoustic theory) to support limiting the reflection rate to a fixed number.
  • Add a function to sample the amplitude of the process from times of arrivals.
    • The amplitude can be sampled
      • from a binary sequence (-1, 1), effectively sampling the sign only
      • uniform or normal distributions which can be used to synthesize amplitude fine-structure

Dependencies

@mberz mberz added the enhancement New feature or request label Jul 13, 2026
@mberz mberz moved this from Backlog to Implementation in progress in Weekly Planning Jul 13, 2026
@mberz mberz modified the milestones: v1.0.1, v1.1.0 Jul 13, 2026
@mberz
mberz requested a review from Copilot July 13, 2026 17:50
@mberz mberz changed the title Feat/poisson process toa FEAT: Poisson process time of arrival and random reflection sign Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new parametric utilities for simulating reflection arrival times via a (capped) non-homogeneous Poisson process and for converting arrival times into a ternary (-1/0/1) reflection sequence suitable for signal-based workflows in pyrato.

Changes:

  • Added _start_time_of_arrival_poisson_process and time_of_arrival_poisson_process for sampling reflection arrival times (with optional reflection-rate limiting).
  • Added ternary_reflection_sequence to map arrival times to discrete samples with random ±1 signs.
  • Added unit tests covering start-time calculation, sampling reproducibility, bounds, rate limiting, and ternary sequence behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
pyrato/parametric.py Introduces Poisson-process TOA sampling and ternary reflection sequence generation.
tests/test_parametric.py Adds tests for the new TOA and ternary-sequence functionality.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyrato/parametric.py Outdated
Comment thread pyrato/parametric.py
Comment thread pyrato/parametric.py Outdated
Comment thread pyrato/parametric.py
Comment thread pyrato/parametric.py Outdated
Comment thread tests/test_parametric.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

Comment thread pyrato/parametric.py
Comment thread pyrato/parametric.py
Comment thread pyrato/parametric.py Outdated
Comment thread pyrato/parametric.py
Comment thread tests/test_parametric.py
mberz and others added 4 commits July 15, 2026 11:23
@mberz
mberz requested a review from a team July 15, 2026 09:28
@mberz mberz linked an issue Jul 17, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Implementation in progress

Development

Successfully merging this pull request may close these issues.

Add routines for synthesizing Impulse Responses?

2 participants