def get_diff(b):
    return b['b2'].subtract(b['b1']).select(['sur_refl_b02'], ['b1'])
Just the internals of the difference method
dataset/ETHPy150Open nasa/CrisisMappingToolkit/cmt/modis/simple_modis_algorithms.py/get_diff