Skip to content

feat: relative width smoothing procedures - #718

Open
jokasimr wants to merge 4 commits into
mainfrom
smoothing-kernels
Open

feat: relative width smoothing procedures#718
jokasimr wants to merge 4 commits into
mainfrom
smoothing-kernels

Conversation

@jokasimr

@jokasimr jokasimr commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Adds functionality to scippneutron for smoothing 1D curves with kernels that have a width relative to the dimension coordinate.

As an example, in the figure below the step signal is smoothed by a gaussian kernel with width proportional to x:

Figure 49

The computed smoothed signal and the expected exact signal overlap.

@jokasimr
jokasimr requested a review from SimonHeybrock August 4, 2026 10:51
@jokasimr

jokasimr commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

The idea is that the scaled kernel has constant width on a grid that is the logarithm of the original grid, and when the kernel is constant width it can be computed efficiently using scipy.signal.convolve.

Here's a document describing the implementation in more detail:

relative_kernel_smoothing_math.pdf

@jokasimr

jokasimr commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@SimonHeybrock Do you think this functionality should go here in Scippneutron or in Scipp?

It's mainly useful for analysis work where you have an idealized model and want to apply some smoothing from resolution effects to obtain something that is comparable to the measurement data.

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