Skip to content

Instantly share code, notes, and snippets.

View tomelse's full-sized avatar
👨‍🔬

Thomas Else tomelse

👨‍🔬
  • CRUK Cambridge Institute
  • Cambridge, UK
View GitHub Profile
@tomelse
tomelse / jwave_band_limited_interpolant.py
Last active September 29, 2023 12:00
J-Wave band-limited interpolant for off-grid sensors (http://github.com/ucl-bug/jwave). This is based on this paper : http://bug.medphys.ucl.ac.uk/papers/2019-Wise-JASA.pdf. It is similar to what has been implemented in k-Wave (www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources).
import jax.numpy as jnp
import numpy.typing
from jax.tree_util import register_pytree_node_class
import numpy as np
from typing import Tuple
from jwave.geometry import Field
@register_pytree_node_class
class BLISensors: