Skip to content

Instantly share code, notes, and snippets.

@rth
Last active September 23, 2021 07:46
Show Gist options
  • Save rth/83a52122426611b0a2d6 to your computer and use it in GitHub Desktop.
Save rth/83a52122426611b0a2d6 to your computer and use it in GitHub Desktop.
import opacplot2 as opp
# create a dictionary op with opacity data from a TOPS file
# check that units are consistent
# write to Ionmix format
opp.writeIonmixFile(fname,
op['Znum'], op['Xnum'],
numDens=op['idens'][:], # electron density
temps=op['temp'][:],
ngroups=Ng,
opac_bounds=groups_array,
planck_absorb=res['opp_mg'][:],
rosseland=res['opr_mg'][:],
planck_emiss=res['emp_mg'][:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment