jump.correction: apply a jump (splice) correction to imported ASD spectra...

View source: R/overlap.corrections.R

jump.correctionR Documentation

apply a jump (splice) correction to imported ASD spectra files. This splice or jump occurs at the boundaries between detectors

Description

A function to apply a jump (splice) correction to imported ASD spectra files

Usage

jump.correction(
  file.dir = NULL,
  out.dir = NULL,
  spec.type = NULL,
  start.wave = NULL,
  end.wave = NULL,
  step.size = NULL,
  jumploc1 = NULL,
  jumploc2 = NULL,
  firstJumpMax = NULL,
  secondJumpMax = NULL,
  output.file.ext = NULL,
  metadata.file = NULL,
  image = FALSE,
  settings.file = NULL
)

Arguments

file.dir

directory of spectra files to process

out.dir

output directory for processed spectra files

spec.type

[Optional] Option to set the type of spectra being processed. Options: "Reflectance" or "Transmittance" Defaults to "Reflectance"

start.wave

starting wavelength of spectra files. Not needed if specified in XML settings file.

end.wave

ending wavelength of spectra files. Not needed if specified in XML settings file.

step.size

resolution of spectra files. E.g. 1 for 1nm, 5 for 5nm. Not needed if specified in settings file.

jumploc1

Wavelength location of the first jump in the spectra to correct. Not needed if specified in XML settings file.

jumploc2

Wavelength location of the second jump in the spectra to correct. Not needed if specified in XML settings file.

firstJumpMax

maximum jump threshold for the first jump location. Determines whether spectra will be corrected or flaged as bad. (Optional. Default is 0.02)

secondJumpMax

maximum jump threshold for the second jump location. Determines whether spectra will be corrected or flaged as bad. (Optional. Default is 0.02)

output.file.ext

option to set file extension of the output files. Defaults to .csv

metadata.file

Option to select custom metadata file for use in processing. If not set then the information is either read from default metadata file, the settings file or at the function call. Need to set this as the full qualified path to the spectral metadata file is using a custom file/location

image

Logical. Whether to produce .png images of each spectrum (TRUE) or not (FALSE). Default is FALSE. Useful for diagnosing spectral observations during processing.

settings.file

settings file used for spectral processing options (OPTIONAL). Contains information related to the spectra collection instrument, output directories, and processing options such as applying a jump correction to the spectra files.

Value

output list containing processed spectra and associated diagnostic information

Author(s)

Shawn P. Serbin

Examples

## Not run: 
jump.correction(file.dir,out.dir='~', start.wave=350,end.wave=2500,step.size=1,jumploc1=651,jumploc2=1451,
output.file.ext=".csv",settings.file=NULL)

## End(Not run)


serbinsh/R-FieldSpectra documentation built on March 31, 2022, 10:08 p.m.