mix.EM {EMMAgeo} R Documentation

## Function to mix sample spectres.

### Description

This functions allows to mix grain-size distributions with specified proportions and defined noise levels, for example to test the goodness of the EMMA algorithm.

### Usage

mix.EM(EM, proportion, noise, autocorrelation)


### Arguments

 EM Numeric matrix, grain-size distribution definitions. Each definition is in a separate row with variable contributions in columns. proportion Numeric vector, relative proportions of each distribution per sample. noise Numeric scalar, optional relative white noise levels. autocorrelation Numeric scalar, the degree of autocorrelation among classes. Autocorrelation is realised as running mean of the specified length. Only odd values are allowed.

### Details

The function multiplies each end-member with the respective proportion value, sums the resulting variables, adds uniform noise and normalises the resulting mixed sample to 100 %.

### Value

Numeric vector, a sample composed of known proportions of end-members.

### Author(s)

Michael Dietze, Elisabeth Dietze

create.EM

### Examples


EMa.1 <- create.EM(p1 = c(2, 8), p2 = c(1, 0.8), s = c(0.7, 0.3),
boundaries = c(0, 11), n = 80)
EMa.2 <- create.EM(p1 = c(4, 7), p2 = c(1.1, 1.4), s = c(0.5, 0.5),
boundaries = c(0, 11), n = 80)
EMa   <- rbind(EMa.1, EMa.2)

phi   <- seq(0, 11, length.out = 80)