Converting between Z/Z_solar and 12+log[O/H]

Cressida Cleland
  • 12 Jan '23


I started off by using SubhaloGasMetallicity to get metallicities for galaxies, and divided by 0.0127 to get solar metallicities. However to compare to literature I wanted to instead use [O/H] metallicities, with a solar value of about 8.6. I think I am getting completely mixed up on how to do this though, and the locations of 'solar' on each plot are different.

I am now using SubhaloGasMetalFractions to pull out the O abundances and the H abundances, dividing those to get O/H, taking the log and adding 12. Am I missing a step? Are the two plots (total metallicity in solar units vs O/H in solar units) just not comparable?


Dylan Nelson
  • 14 Jan '23

Does this thread answer your question?

Cressida Cleland
  • 1
  • 16 Jan '23

Not really, as I've gotten to the final step of directly using the chemical abundances. I guess my question is, to get to 12+log[O/H] is there any other step besides just dividing the O abundance over the H abundance and taking the log?

Screenshot from 2023-01-16 14-44-49.png

My metallicites just seem to be about +0.5 - +1 than they should be.

Edit: I didn't realise I was supposed to divide by 16 to get the abundance in number rather than mass, now everything looks good :D

Julia Fernandez
  • 15 May '23

I've been wondering the same thing, so to obtain 12+log(O/H), do we simply need to do 12+log(O/H*16) where O and H are the metal fractions?

Cressida Cleland
  • 1
  • 16 May '23

@Julia, yes, I divided the O by 16 and then divided by H, and then took the log, but I guess it works out the same if you multiply H by 16

  • Page 1 of 1