metalz: Metallicity conversor

View source: R/metalz.R

metalzR Documentation

Metallicity conversor

Description

metalz returns the conversion from Fe/H to Z and viceversa

Usage

metalz(metallicity, z = FALSE, ypr = NULL, dydz = NULL, szx = NULL, prec = 8)

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.

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).

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.

Examples

metalz(feh = 0.0)
metalz(z = 0.02)
metalz(feh = 0.0, ypr = 0.26, prec = 4)

## Not run: 
metalz(feh = 0.25, z=0.02)

## End(Not run)

juancasy/tostada documentation built on March 13, 2024, 10:57 p.m.