% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/landsat578.R
\name{landsat578}
\alias{landsat578}
\alias{landsat578.default}
\title{Radiometric correction and processing of Landsat Images}
\usage{
landsat578(
  data,
  welev,
  sensor = NULL,
  gain = "low",
  sunelev = NULL,
  date = NULL,
  weights = "auto",
  grescale = "auto",
  brescale = "auto",
  ESUNx = "auto",
  Mp = NULL,
  Ap = NULL,
  K1 = NULL,
  K2 = NULL,
  Rp = 0.91,
  Rsky = 1.32,
  tNB = 0.886,
  DOY = NULL,
  clip = NULL,
  folder = NULL
)

\method{landsat578}{default}(
  data = NULL,
  welev,
  sensor = NULL,
  gain = "low",
  sunelev = NULL,
  date = NULL,
  weights = "auto",
  grescale = "auto",
  brescale = "auto",
  ESUNx = "auto",
  Mp = NULL,
  Ap = NULL,
  K1 = NULL,
  K2 = NULL,
  Rp = 0.91,
  Rsky = 1.32,
  tNB = 0.886,
  DOY = NULL,
  clip = NULL,
  folder = NULL
)
}
\arguments{
\item{data}{An original folder containing Landsat data or
Raster \code{\link[raster]{brick}}  or raster 
\code{\link[raster]{stack}}. Arrange the bands in ascending order:
 c(band1,band2,band3,band4,band5,band6,band7) for Landsat 5 and 7.
 And a similar  order for Landsat 8.  On folder see \code{\link{sebkcstack}}
 See also details.}

\item{welev}{Weather station elevation in meters}

\item{sensor}{Numeric. Type of landsat satellite; it takes 5,7, or 8}

\item{gain}{Band-specific sensor gain. It takes either "high" or "low"}

\item{sunelev}{Angle of Sun elevation in degrees, 
as found in the meta data of the satellite image}

\item{date}{DATE_ACQUIRED of the image, see metadata}

\item{weights}{albedo bands weights for each band.
list as in order c(band1,band2,band3,band4,band5,band6,band7) 
for landsat 5 and 7.
 The default is "auto" where 
sebal weights are used.}

\item{grescale}{list as in order weights. Band-specific sensor values. 
The default for landsat 5 and 7 is from Chander et.al (2009).
For Landsat 8 use ML Radiance scale in the metadata;
i.e. Band specific multiplicative rescaling factor from the metadata 
(MTL file) (RADIANCE_MULT_BAND_x, where x is the band number).}

\item{brescale}{list. Band-specific sensor values.
The default for landsat 5 and 7 is from Chander et.al (2009).
for Landsat 8 use AL Radiance scale in the metadata;
i.e. Band specific multiplicative rescaling factor from the metadata 
(MTL file) (RADIANCE_MULT_BAND_x, where x is the band number).}

\item{ESUNx}{list. The mean solar exo-atmospheric irradiance for each band.
It is used for reflectance correction. The default is taken from SEBAL manual}

\item{Mp}{Reflectance scale for Landsat 8. Band specific multiplicative 
rescaling factor from the metadata (MTL file) (REFLECTANCE_MULT_BAND_x, 
where x is the band number).}

\item{Ap}{Reflectance scale for Landsat 8. Band specific additive rescaling
factor from the metadata (MTL file) (REFLECTANCE_ADD_BAND_x,
where x is the band number)}

\item{K1}{Temperature constants for each Landsat image. 
Default is taken from landsat handbook}

\item{K2}{Temperature constants for each Landsat image. 
Default is taken from landsat handbook}

\item{Rp}{path radiance in the 10.4-12.5 um band.
MODTRAN runs can accurately estimate this. 
The default is taken from Allen et al(2007) 
to be 0.91,}

\item{Rsky}{narrow band downward thermal radiation. 
MODTRAN runs can accurately estimate this.
The default is taken from Allen et al(2007) to be 1.32}

\item{tNB}{narrow band transmissivity of air (10.4-12.5) um range.
MODTRAN runs can accurately estimate this.
The default is taken from Allen et al(2007) to be 0.866}

\item{DOY}{Numeric or Date [YYYY-mm-dd]. Day of the Year. 
If you give data in the form of date [YYYY-mm-dd], it will be converted to DOY}

\item{clip}{extent object or raster object or polygon from which an Extent 
object can be extracted. A polygon or raster will be reprojected to 
conform the data to be cropped. for example clip can take the form of c(xmin, xmax, ymin, ymax)}

\item{folder}{An original  directory of the images that contains all 
landsat 5,7 or 8 bands and metadata.
At the moment only Landsat folder is supported}
}
\value{
\describe{
\item{albedo:}{ albedo values}
\item{Ts:}{ Surface Temperature}
\item{NDVI:}{ NDVI values}
\item{SAVI:}{ SAVI values}
\item{fc:}{ Fractional vegetation cover}
\item{radiance:}{ radiance values}
\item{reflectance:}{ TOA reflectance}
}
}
\description{
\code{landsat578} performs radiometric collection of 
landsat 5,7,and 8 images. It returns albedo, NDVI, 
fractional vegetation cover, surface temperature
SAVI,radiance and reflectance of the image
}
\details{
If you set the data to landsat folder that contains 
landsat band and meta data \code{\link{sebkcstack}} is used to
compute the parameters. The user must specify welev and may
use default parameters. 
 The data must always be a raster brick 
or stack. To use the default values please order bind the bands
 c(band1,band2,band3,band4,band5,band6,band7). 
 The defaults values are for landsat 5 and 7. 
For landsat 8, use the meta data.
}
\examples{
\dontrun{
#Automatic detection of parameters
folder=system.file("extdata","stack",package="sebkc")
modauto=landsat578(data=folder, welev=362)

#Manual estimation with input parameters
landsat7_6feb2004=brick(system.file("extdata","landsat7_6feb2004.grd",
package="sebkc"))
mod=landsat578(data=landsat7_6feb2004,welev=317.1,sensor=7,gain="high",
sunelev=50.71154048,weights="auto",grescale="auto",brescale="auto",
ESUN="auto",K1=666.09,K2=1282.71,date="2002-2-6")
#acces albedo value
albedo=mod$albedo
}
}
\references{
\itemize{
\item Chander, G., Markham, B. L., & Helder, D. L. 2009. 
Summary of current radiometric calibration coefficients for 
Landsat MSS, TM, ETM+, and EO-1 ALI sensors. 
Remote Sensing of Environment, 113(5): 893-903.
\item Waters, R. 2002. SEBAL: Surface Energy Balance Algorithms for Land. 
Idaho Implementation, Advanced Training and Users Manual. Kimberly, Idaho: 
University of Idaho.
\item Survey, U. S. G. 2015. Landsat 8 (L8) data users handbook: 97p.
 from https://landsat.usgs.gov/documents/Landsat8DataUsersHandbook.pdf
}
}
\author{
George Owusu
}
