Skip to content

Instantly share code, notes, and snippets.

@threads for j ∈ eachindex(𝒯.R)
Rⱼ = 𝒯.R[j]
αⱼ = real(𝒯.α[j])
ð̄²α = real(𝒯.ð̄²α[j])
κ⁻¹ = γ * (1 - v⃗ ⋅ Rⱼ(𝐤))
spline = @view 𝒯.splines[:, :, j]
guess = firstindex(𝒯.u)
for (i, u′) ∈ enumerate(𝒯.u′)
u = κ⁻¹ * u′ + αⱼ
d, guess = interpolate(𝒯.u, 𝒯.h, spline, u, guess)
#%%
"""
This script shows how to load CCE data into a `scri.AsymptoticBondiData` object
and evaluate a set of constraints that should be satisfied involving the strain
and the Newman-Penrose quantities (assuming the waveform is in Bondi gauge).
These constraints are listed in the plot legend (see below) as equations to be
satisfied at each instant. The violation is just one side minus the other, and
the norm is that difference squared integrated over the sphere (and
square-rooted).
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moble
moble / doi2bibtex.sh
Created December 13, 2023 17:13
doi2bibtex
# This bash/zsh function queries for the input DOI's bibtex entry. When the DOI points
# to a journal article, this usually resolves to the journal's own bibtex output.
doi2bibtex () {
curl -fsSLH "Accept: application/x-bibtex" "https://doi.org/$1" | sed -e 's|%2F|/|g'
}
@moble
moble / make_plots.out
Last active June 9, 2023 19:45
Compare results of `to_coprecessing_frame` before and after CoM correction with old and new versions of scri/sxs/...
=======================================
Running in CoprecessingFrameTransients1
=======================================
/Users/boyle/.continuum/mambaforge/envs/CoprecessingFrameTransients1/lib/python3.9/site-packages/quaternion/calculus.py:310: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def fd_indefinite_integral(f, t):
python.__version__ = 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:42:20)
[Clang 14.0.6 ]
numpy.__version__ = 1.21.0
scipy.__version__ = 1.7.0
@moble
moble / CompareSquads.ipynb
Last active May 30, 2023 19:52
Compare quaternion interpolation methods
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# The vector method is roughly 2.5x than the existing code with a
# sorted t′, and about 15% slower with a worst-case-disordered t′.
using BenchmarkTools
using DataInterpolations
shuffle(v) = collect(Iterators.flatten(zip(v[begin:length(v)÷2], v[length(v)÷2+1:end])))
function inplace(u, interp, t)
@assert length(u) == length(t)