Skip to content

Instantly share code, notes, and snippets.

@andycasey
Created January 12, 2016 17:25
Show Gist options
  • Select an option

  • Save andycasey/7f322bec408da5d80106 to your computer and use it in GitHub Desktop.

Select an option

Save andycasey/7f322bec408da5d80106 to your computer and use it in GitHub Desktop.
finite_abundances.py
In [30]: ok = image[1].data["physical"]
In [31]: elements = [_ for _ in image[1].data.dtype.names if _.endswith("_H") and _ not in ("SRC_H", "PARAM_M_H")]
In [32]: for element in elements:
print(element, np.sum(np.isfinite(image[1].data[element][ok])))
....:
('AL_H', 99127)
('CA_H', 99127)
('C_H', 99127)
('FE_H', 99127)
('K_H', 99127)
('MG_H', 99127)
('MN_H', 99127)
('NA_H', 99127)
('NI_H', 99127)
('N_H', 99127)
('O_H', 99127)
('SI_H', 99127)
('S_H', 99127)
('TI_H', 99127)
('V_H', 99127)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment