metalz
returns the conversion from Fe/H to Z and viceversa
Arguments
- metallicity
Numeric, scalar. Input metallicty value (default Fe/H).
- z
Logic, scalar. If TRUE then metallicity is provided as Z (default F).
- ypr
Numeric, scalar. Primordial Helium. If not provided, default is 0.26627.
- dydz
Numeric, scalar. Dy/Dz value. IF not provided, default is 2.2
- szx
Numeric, scalar. Solar Z/H value. IF not provided, default is 0.0245
- prec
Numeric, scalar. Required output precision (default input precision). It indicates the number of decimals in output.
Value
A numeric vector containing c(X, Y, Z, Fe/H). If Fe/H is provided then Z will be returned. Likewise if Z is provided then Fe/H will be returned.
Details
This function requires at least one argument to work, either the metallicity as Fe/H or as Z. Avoid to modify default values for primordial helium or variation of Y or X with Z (see details in parameter description).
Examples
metalz(feh = 0.0)
#> Error in metalz(feh = 0): unused argument (feh = 0)
metalz(z = 0.02)
#> Error in metalz(z = 0.02): argument "metallicity" is missing, with no default
metalz(feh = 0.0, ypr = 0.26, prec = 4)
#> Error in metalz(feh = 0, ypr = 0.26, prec = 4): unused argument (feh = 0)
if (FALSE) {
metalz(feh = 0.25, z=0.02)
}