Skip to content

ENH: Allow passing source detector distances to beer lambert law#13875

Open
Kallemakela wants to merge 7 commits intomne-tools:mainfrom
Kallemakela:enh-13862-allow-passing-source-detector-distances-to-beer_lambert_law
Open

ENH: Allow passing source detector distances to beer lambert law#13875
Kallemakela wants to merge 7 commits intomne-tools:mainfrom
Kallemakela:enh-13862-allow-passing-source-detector-distances-to-beer_lambert_law

Conversation

@Kallemakela
Copy link
Copy Markdown
Contributor

Reference issue (if any)

#13862

What does this implement/fix?

Add an optional sd_distances argument to mne/preprocessing/nirs/_beer_lambert_law.py:17.

Proposed signature:
def beer_lambert_law(raw, ppf=6.0, sd_distances=None):

Example usage:
beer_lambert_law(raw_od, sd_distances=0.03)
beer_lambert_law(raw_od, sd_distances=[0.03, 0.03, 0.03, 0.03]) # matches info['chs'] order

Additional information

@welcome
Copy link
Copy Markdown

welcome Bot commented Apr 28, 2026

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

@Kallemakela Kallemakela marked this pull request as ready for review April 28, 2026 12:12
Copy link
Copy Markdown
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, but CIs are not happy. Can you investigate ?

Comment thread mne/preprocessing/nirs/tests/test_beer_lambert_law.py Outdated
Comment thread mne/preprocessing/nirs/_beer_lambert_law.py Outdated
Comment thread mne/preprocessing/nirs/_beer_lambert_law.py
Comment thread mne/preprocessing/nirs/_beer_lambert_law.py Outdated
Comment thread mne/preprocessing/nirs/nirs.py Outdated
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.

2 participants