1# Get data for example
2data = et.data.get_data("vignette-landsat")
3
4# Set working directory
5os.chdir(os.path.join(et.io.HOME, "earth-analytics"))
6
7# Stack the Landsat 8 bands
8# This creates a numpy array with each "layer" representing a single band
9# You can use the nodata= parameter to mask nodata values
10landsat_path = glob(
11 os.path.join(
12 "data",
13 "vignette-landsat",
14 "LC08_L1TP_034032_20160621_20170221_01_T1_sr_band*_crop.tif",
15 )
16)
17landsat_path.sort()
18array_stack, meta_data = es.stack(landsat_path, nodata=-9999)
19