process.HyperSAS: Process a HyperSAS data folder

View source: R/process.HyperSAS.R

process.HyperSASR Documentation

Process a HyperSAS data folder

Description

This function is called by the higher level function HyperSAS.go. . It can be also called in the command line to process a given data directory.

Arguments

dirdat

is the current directory path contaning the files to process.

TYPE

is either equal to "STATION" or "TRANSIT" depending whether the folder gather replicate Rrs of the same station, or the data collected during the course of a ship transit. If the function is called from HyperSAS.go, the TYPE will be read in the file named directories.for.HyperSAS.dat. Otherwise the default is "STATION".

use.SAS.RData

is a logical parameter indicating whether or not a SAS.raw.RData file already exists in the data directory and do not need to be generated again. Note that SAS.raw.RData is an output of the function process.HyperSAS. Default is FALSE.

use.COMPASS

is a logical parameter indicating whether or not the azimuth difference between the sun and the view geometry is calculated using the SAS compass data. When FALSE, the azimuth angle difference is taken from the cast.info.dat file. NOTE: The Default is FALSE because compass usually doesn't work on ship.

COPS

is logical parameter to force the water reflectance to pass through the COPS reflectance measurements made a priori. It must be turn on only if COPS data have been processed and validated

Details

The function first looks into the cast.info.dat file found in the dirdat and check whether all the mandatory fields are present. If not, the processing may be stop or a default value is taken. Next the HyperSAS files to process are red and stored in a list of lists named SAS. Finally, the function calls compute.Rrs.SAS to compute an Rrs spectrum for each data file.

Value

The function returns a list containing the Rrs data. The same list (RRS) is saved into a RRS.RData file in dirdat. If use.SAS.RData is set to FALSE, a list with raw data (SAS) will be saved in file SAS.raw.RData in dirdar.

Author(s)

Simon Bélanger

See Also

compute.Rrs.SAS and HyperSAS.go


belasi01/HyperocR documentation built on June 11, 2024, 7:21 a.m.