fit_athena: Porting of 'ATHENA' linear combination fitting

Description Usage Arguments Examples

Description

The function can be used to check which combinations of standards produce a good fit and if output from 'ATHENA' is similar.

Usage

1
2
fit_athena(all.samples, all.standards, LC.vals, amoSTD, ex.smaller = NULL,
  file.output = NULL, best.fits = NULL)

Arguments

all.samples

List of all samples

all.standards

List of all standards

LC.vals

The fitting range values for the linear combination fitting

amoSTD

Use at most X standards

ex.smaller

Exclude portions smaller than a given value (decimal form), default to NULL

file.output

Possibility to have a file output, default to NULL

best.fits

Possibility to output more than the best fit (e.g. the first 10 best fits), default to 1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(stdmix)
corr.spec.standards  <- initial_load(specdat[1:4], 
  corr.norm = c(-36, -15, 37, 58))
corr.spec.samples    <- initial_load(specdat[5:8], 
  corr.norm = c(-36, -15, 37, 58))
athena.fit <- fit_athena(all.samples = corr.spec.samples, 
  all.standards = corr.spec.standards, LC.vals = c(-14, 46), amoSTD = 4)
## exclude portions smaller 5% = 0.05
athena.fit.exlcude <- fit_athena(all.samples = corr.spec.samples, 
  all.standards = corr.spec.standards, 
  LC.vals = c(-14, 46), amoSTD = 4, ex.smaller = 0.05)

Example output

[1] "Sample: Mi01, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi02, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi03, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi04, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi01, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi02, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi03, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"
[1] "Sample: Mi04, start date: 2019-01-14 13:13:21"
[1] "Fitting 11 combinations"

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
[1] "Finished: 2019-01-14 13:13:21"

LCF documentation built on May 2, 2019, 6:08 a.m.

Related to fit_athena in LCF...