QualityCheck: Remove unreliable data and no fill values from MODIS data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/QualityCheck.R

Description

Designed as an internal function for MODISSummaries, but can also be used independently. MODIS data of a given product band are screened for poor quality pixels, using the reliability data available for that product. The missing data values are also filtered out. The output is the same MODIS data, with screened poor quality and missing data converted to NAs.

Usage

1
2
QualityCheck(Data, Product, Band, NoDataFill, QualityBand, QualityScores,
              QualityThreshold)

Arguments

Data

Numeric vector or matrix; the input MODIS data, for QualityCheck to screen for poor quality and missing data.

Product

Character; the product code for Data (e.g. "MOD15A2" if you want to screen the quality of a downloaded data band from the leaf area index product).

Band

Character; the shortname code for the data band that you are quality screening.

NoDataFill

Numeric; the missing data fill value for the data band (Data) that you are screening.

QualityBand

Character; the shortname code for the quality data band that you are using to screen Band for poor quality data.

QualityScores

Numeric integer vector or matrix; the quality control control that matches your Data input. QualityScores should be the same length/dimensions as Data.

QualityThreshold

Numeric integer; set the threshold between acceptable and unacceptable quality. Any pixels of lower quality than the class set by QualityThreshold will be removed, and those equal to or of higher quality will be kept. QualityThreshold should be a number within the range of possible QualityScores for the given Product QA data.

Details

Although there are several data bands within each MODIS product, only one band type of data should be passed to QualityCheck at a given time, as different bands within a product may have different NoDataFill values, and may even have different data bands that contain their relevant quality information.

Value

Data, as it was, but with poor quality data and no data fill values replaced with NAs.

Author(s)

Sean Tuck

References

https://daacmodis.ornl.gov/cgi-bin/MODIS/GLBVIZ_1_Glb/modis_subset_order_global_col5.pl

See Also

MODISSummaries

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# dontrun() used because running the example requires internet access.
data(QualityCheckExample)
EVIdata <- QualityCheckExample[1:5, ]
QAdata <- QualityCheckExample[6:10, ]

QualityCheck(Data=EVIdata, Product="MOD13Q1", Band="250m_16_days_EVI",
              NoDataFill=-3000, QualityBand="250m_16_days_pixel_reliability",
              QualityScores=QAdata, QualityThreshold=0)
        
## End(Not run)

seantuck12/MODISTools documentation built on May 29, 2019, 4:55 p.m.