sampleBinStar {SCEPtERbinary}R Documentation

Sample a set of binary systems out of a grid

Description

The function extracts, without replacement, a sample of binary systems out of a grid.

Usage

    sampleBinStar(n, grid, block, restrict=TRUE, parallel=FALSE)
     

Arguments

n

the number of objects to be sampled.

grid

the grid from which the objects are sampled.

block

the length of blocks of the same initial metallicity [Fe/H]

restrict

logical flag indicating if only models younger than 14 Gyr should be considered.

parallel

logical flag indicating if the estimations should be performed in parallel on a multi-core architecture.

Value

sampleBinStar returns a matrix of n rows, sampled without replacement from grid. A maximum age difference of 10 Myr is allowed in the binary system selection.

Examples

require(SCEPtER)
data(stdGrid)

bl <- block(stdGrid)
sam <- sampleBinStar(10, stdGrid, bl, restrict=TRUE)

[Package SCEPtERbinary version 0.1-1 Index]