Closed trappitsch closed 3 years ago
I don't think anyone ever uses mass fractions in these ways. If you have N_i (sorry, I am changing your notation now) the mass fraction is just X_i = (N_i m_i)/(rho N_A). Where rho = (1/N_A) sum(N_i m_i). That is all we would ever need. Does that make sense? A good way to verify results is NuPPN/frames/mppnp/USEEP/any file there. Thanks!
That makes a lot of sense, thanks for the input @OClarkson. Thsi would cover the linear space, any recommendations for the logarithmic return, is that something that is actually used or not?
How about this idea:
ini.abundance_unit
and replace with ini.unit
.num_lin
, num_log
, mass_fraction
mass_fraction
option automatically.mass_fraction=False
and convert to mass_fraction=None
, then can overwrite what we have so fare by setting it to bool -> overwrite whatever is set in the database as the current one.This way we could avoid having to define a logarithmic mass fraction unit that is not useful for anybody, but would also leave the door open for future extensions.
@OClarkson Capability for mass fractions should now be fully included. You can directly start of with mass fractions if you run:
from iniabu import inimf
Documentation is updated too, so there's more details. Enjoy!
Implement the possibility to return element / isotope abundances as mass fractions.
Maybe put a general
mass_fraction
toggle in there that can be called like the one for units and then set themass_fraction
bool by default for the future routines from this?Proposed by: @OClarkson @ubattino
Question: How would the abundance look like in number and in logarithmic space?
Number space:
Logarithmic space:
Would this be reasonable?