Introduction
This is a help file for using the cross_cal_resourcesat
package.
Install the library if not installed before.
%pip install cross_cal_resourcesat
pip install cross_cal_resourcesat
will generally install the dependencies too. If not, install the dependencies.
%pip install gdal rasterio numpy glob2 regex
Many a times installing gdal
from pip
fails. In that case either use other channels like conda-forge
or use a direct link.
%pip install --find-links = https://girder.github.io/large_image_wheels --no-cache GDAL
Import the dependency libraries in the environment.
import rasterio, os, re, math, glob, shutil
from osgeo import gdal, osr, gdalconst
import numpy as np
Import cross_cal_resourcesat
library.
import cross_cal_resourcesat
Set the paths to folder containing LISS III/AWiFS and reference sensors (Landsat 8/Sentinel 2). Use the absolute path.
Note: If reference sensor is not Landsat 8 or Sentinel 2, then inpf_ref
should point to folder containing reflectance images of reference sensor and not the radiance image.
inpf_liss = r'\docs\Examples\liss'
inpf_s2 = r'\docs\Examples\ref_s2'
inpf_l8 = r'\docs\Examples\ref_l8'
inpf_others = r'\docs\Examples\ref_others\reflectance'
If reference_sensor
is Landsat 8, use:
cross_cal_resourcesat.do_calibration(inpf_liss = inpf_liss, inpf_ref = inpf_l8, reference_sensor = 'Landsat 8')
If reference_sensor
is Sentinel 2, use:
cross_cal_resourcesat.do_calibration(inpf_liss = inpf_liss, inpf_ref = inpf_s2, reference_sensor = 'Sentinel 2')
For other reference sensors, set reference_sensor = 'Others'
cross_cal_resourcesat.do_calibration(inpf_liss = inpf_liss, inpf_ref = inpf_others, reference_sensor = 'Others')