Skip to content

Instantly share code, notes, and snippets.

@astanziola
astanziola / objectwithsettings.py
Created March 15, 2023 16:46
Python object with settings
"""
This is a Python class named "ObjectWithSettings" that serves as a base
class for other classes to inherit from. It allows objects to add
settings as dictionary items and access them using keys as well as
attributes. The class contains methods for adding a setting, setting an
attribute, getting the settings dictionary as a property, and getting a
flattened dictionary of all settings, including nested settings.
"""
from adict import adict
@astanziola
astanziola / alberti_psf.py
Created February 4, 2023 13:57
Differentiable approximate plane wave Ultrasound PSF in JAX
# This code is a quick reproduction of eq. (9) of
# "Mathematical Analysis of Ultrafast Ultrasound Imaging" by Alberti ed at. 2016.
# https://arxiv.org/pdf/1604.04604.pdf
#
# It represents an approximate point spread function for Plane Wave Imaging that can be
# used to write a simple, yet powerful, 2D Plane Wave ultrasound simulator using spatially-variant
# convolutions.
#
# The function is fully differentiable.
@astanziola
astanziola / jwave_intro_clean.ipynb
Created November 7, 2022 09:32
jwave_intro_clean.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astanziola
astanziola / -watson-1964-smooth-regression-analysis.ipynb
Created March 18, 2021 13:10
[Watson 1964] Smooth regression analysis.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astanziola
astanziola / conditional-variational-autoencoder-on-mnist-and-pytorch-lightning.ipynb
Created January 12, 2021 10:08
Conditional Variational Autoencoder on MNIST and Pytorch-Lightning.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astanziola
astanziola / siren-neural-networks-in-jax.ipynb
Created December 20, 2020 17:21
SIREN neural networks in JAX
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.