Skip to content

Fourier upsampling in smooth_vel_fft for finer output grids - #52

Open
Nikhil0504 wants to merge 7 commits into
bd-j:mainfrom
Nikhil0504:feat/fourier-upsample-outwave
Open

Nikhil0504 wants to merge 7 commits into
bd-j:mainfrom
Nikhil0504:feat/fourier-upsample-outwave

Conversation

@Nikhil0504

Copy link
Copy Markdown

Builds on #51.

smooth_vel_fft returns the smoothed spectrum on outwave by linear interpolation. When outwave
is finer than the input and the smoothed features are only a few pixels wide (a small velocity
dispersion on a barely sampled library), that interpolation changes the line profiles.

Changes

  • New smooth_fft_upsample(dx, spec, sigma, upsample=1): the Gaussian taper of smooth_fft,
    returned upsample times finer by zero padding in Fourier space (band-limited interpolation).
    upsample=1 gives smooth_fft exactly.
  • smooth_vel_fft: on a native log-uniform input (Smooth log-uniform spectra on their native samples in smooth_vel_fft #51), when outwave is finer than the input
    grid, smooth with upsample = ceil(input step / finest outwave step) before interpolating onto
    outwave. Other cases are unchanged.

Tests

  • smooth_fft_upsample keeps the input samples and equals smooth_fft at upsample=1.
  • Absorption lines of 12.7 km/s on 10 km/s pixels, smoothed by 13-25 km/s and evaluated on a
    0.05 A grid: within 2e-3 of the analytic result, while linear interpolation of the native
    result is off by more than 5e-3. This test fails on Smooth log-uniform spectra on their native samples in smooth_vel_fft #51 alone.

Related: #32 (sinc convolution in pixel space).

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