Skip to content

Instantly share code, notes, and snippets.

View AshKelly's full-sized avatar

Ash Kelly AshKelly

  • Durham
View GitHub Profile
@AshKelly
AshKelly / numba_vs_np.py
Last active April 3, 2020 09:37
numba_vs_np_convolution
import time
import numba
import numpy as np
# Compare numba-accelerated for loop convolution to Numpy's function
@numba.jit(
"float64[::1](float64[::1], float64[::1])",
locals={
"n_sig": numba.int64,
import numpy as np
import pyquad
def test_integrand_func(x, alpha, beta, j):
return x * alpha * beta + j
x = np.array([1., 2.])
y = np.array([3., 4.])
@AshKelly
AshKelly / gsoc_summary.md
Last active August 13, 2018 10:12
This gist contains a summary of my GSoC project with yt (NumFocus)

GSOC 2018 Work product submission.

Summary of GSoC project with yt-project (NumFocus)

yt is a package for analyzing and visualizing volumetric data. The current infrastructure of yt is designed to deal with adaptive mesh refinement (AMR) data. However, a wide range of modern N-body hydrodynamics simulations now use smoothed particle hydrodynamics (SPH) which produces data consisting of volume filling fields (see Springel 2015 and Schaller 2013).

The project aimed to continue the development and introduction of a yt API for SPH data that ensures all SPH fields return data defined at the locations of the particles - the initial development is discussed here. The summer project focussed on adding "scatter" and "gather" pixelization routines to a variety of yt data containers.

Below I will list the main features implemented along with links to the code, more detials can be found below about each of these features such as useage, examples and