I am using the bfastSpatial package in R. One of the parameters that I have to set is the QC_val=0x 'a number'. I do not understand what number I have to insert. I am using MOD11A2 product (MODIS LST 8-day product). I have read that QC values to KEEP in the data. But what I can not understand is what are the values. For example, the range of the values in the QC images that I use is [2-90].
Numeric or vector of numerics. Quality control values to keep in the data. If bit is set to TRUE QC_val is a BYTE (hexadecimal or decimal) where each bit refers to a bit in the QC layer element (i.e.: bitpos = 0xA1 targets bits 7, 5 and 0 --- 1010 0001). When bits targetted by QC_val are activated, the corresponding observation in the data layer is filtered out.
Check product documentation to know which QA flag you need to preserve: https://lpdaac.usgs.gov/sites/default/files/public/product_documentation/mod11_user_guide.pdf
If you still don't know how to handle QA Flags, convert QA flags to layers and mask layers after: MOD09A1 QC layer