Skip to content

Instantly share code, notes, and snippets.

View birnstiel's full-sized avatar

Til Birnstiel birnstiel

View GitHub Profile
@birnstiel
birnstiel / load_default_dsharp.py
Last active March 5, 2024 20:02
Load default DSHARP opacities
#!/usr/bin/env python
import dsharp_opac
import numpy as np
import matplotlib.pyplot as plt
# load the opacities -- values are all in CGS; first index is grain size
with np.load(dsharp_opac.get_datafile('default_opacities_smooth.npz')) as fh:
a = fh['a']
lam = fh['lam']
k_abs = fh['k_abs']