spectrum.normalise: Function to calculate reflectivity from raw Monochromator...

Description Usage Arguments Examples

View source: R/spectrum.normalise.R

Description

Divides the signal by a reference spectra

Usage

1

Arguments

data

raw variable from imported data.dat file

ref

raw variable from imported ref.dat file

dkf

raw variable from imported dkf.dat file (dark field reading)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## The function is currently defined as
function (data, ref, dkf) 
{
    d <- data[, 3] - mean(dkf[, 3])
    r <- ref[, 3] - mean(dkf[, 3])
    dr <- data[, 4] - mean(dkf[, 4])
    rr <- ref[, 4] - mean(dkf[, 4])
    normData <- (d/r)
    normRef <- (dr/rr)
    par(mfrow = c(2, 2))
    par(mfrow = c(1, 1))
    return(normData/normRef)
  }

tjconstant/photonMonkey documentation built on Feb. 19, 2018, 7:05 a.m.