Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn P. Serbin committed Sep 19, 2013
1 parent 10e0dc0 commit 88e681c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: FieldSpec
Type: Package
Title: Functions useful for processing field spectroscopy data
Title: Functions for processing field spectroscopy data
Version: 0.89
Date: 2013-09-17
Date: 2013-09-18
Author: Shawn P. Serbin
Maintainer: Shawn P. Serbin <[email protected]>
Description: A field spectroscopy package containing functions to process
spectral files collected with an Analytical Spectral Devices (ASD) or
Spectral Evolution instrument. The goal is to stream line and standardize
spectral data processing for use in ecology, remote sensing, and plant
Spectral Evolution instrument. The goal is to streamline and standardize
spectral data processing for use in remote sensing, ecology, and plant
ecophysiological research.
Depends:
XML,
Expand Down
4 changes: 1 addition & 3 deletions R/read.asd.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ read.asd = function(file.dir=NULL, out.dir=NULL, start.wave=NULL, end.wave=NULL,

### Close progress bar
close(pb)

### Return spectra data object if requested i.e. spec.dataframe=TRUE


} else {
to.read <- file(file.dir, "rb")

Expand Down
7 changes: 5 additions & 2 deletions inst/examples/process_spectra.r
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ settings <- settings('/Users/serbin/Data/Dropbox/SoyFACE/R_Spectra_Training/SoyF
#--------------------------------------------------------------------------------------------------#
# Run each function separately

### Get metadata
metadata <- extract.metadata(settings.file=settings,intern=TRUE)

### Import ASD binary files to ASCII format
read.asd(settings.file=settings,spec.dataframe = FALSE) # Using settings file
spectra <- read.asd(settings.file=settings,spec.dataframe = TRUE) # output a dataframe with the spectra
read.asd(settings.file=settings) # Using settings file
spectra <- read.asd(settings.file=settings) # output a dataframe with the spectra

# Look at spectra
plot(seq(350,2500,1),spectra[2,2:dim(spectra)[2]],type="l")
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<settings>
<!-- Directory of ASD files or sub-directories to process -->
<asd.dir>PATH TO ASD FILES</asd.dir>
<spec.dir>PATH TO SPECTRA FILES</spec.dir>
<!-- Main output directory -->
<output.dir>PATH TO OUTPUT</output.dir>
<instrument>
Expand Down

0 comments on commit 88e681c

Please sign in to comment.