Skip to content

Instantly share code, notes, and snippets.

@schlafly
schlafly / convolution_demo.py
Last active October 12, 2023 13:13
Box2DKernel & even oversampling
import numpy as np
import scipy.ndimage
import scipy.interpolate
import scipy.special
from astropy.convolution import convolve, Box2DKernel
# some function we can oversample
def make_fake_image(oversample):
pts = np.linspace(-10, 10, 10 * oversample + 1)