def _create_learning_image(domain, b):

    outputBands = _get_modis_learning_bands(domain, b) # Get the standard set of MODIS learning bands
    #outputBands = _get_extensive_modis_learning_bands(domain, b) # Get the standard set of MODIS learning bands
    
    
    # Try to add a DEM
    try:
        dem = domain.get_dem().image
        outputBands.addBands(dem)
        #outputBands = dem
    except AttributeError:
        pass # Suppress error if there is no DEM data
    
    # Try to add Skybox RGB info (NIR is handled seperately because not all Skybox images have it)
    # - Use all the base bands plus a grayscale texture measure
    try:
        try: # The Skybox data can be in one of two names
            skyboxSensor = domain.skybox
        except:
            skyboxSensor = domain.skybox_nir
            
        rgbBands    = skyboxSensor.Red.addBands(skyboxSensor.Green).addBands(skyboxSensor.Blue)
        grayBand    = rgbBands.select('Red').add(rgbBands.select('Green')).add(rgbBands.select('Blue')).divide(ee.Image(3.0)).uint16()
        edges       = grayBand.convolve(ee.Kernel.laplacian8(normalize=True)).abs()
        texture     = edges.convolve(ee.Kernel.square(3, 'pixels')).select(['Red'], ['Texture'])
        texture2Raw = grayBand.glcmTexture()
        bandList    = safe_get_info(texture2Raw)['bands']
        bandName    = [x['id'] for x in bandList if 'idm' in x['id']]
        texture2    = texture2Raw.select(bandName).convolve(ee.Kernel.square(5, 'pixels'))
        #skyboxBands = rgbBands.addBands(texture).addBands(texture2)
        skyboxBands = rgbBands.addBands(texture2)
        outputBands = outputBands.addBands(skyboxBands)
        #outputBands = skyboxBands
        
        #addToMap(grayBand, {'min': 0, 'max': 1200}, 'grayBand')       
        #addToMap(edges, {'min': 0, 'max': 250}, 'edges')
        #addToMap(texture, {'min': 0, 'max': 250}, 'texture')
        #addToMap(texture2, {'min': 0, 'max': 1}, 'texture2')
        
    except AttributeError:
        pass # Suppress error if there is no Skybox data
    
    # Try to add Skybox Near IR band
    try:
        outputBands = outputBands.addBands(domain.skybox_nir.NIR)       
        #addToMap(domain.skybox.NIR, {'min': 0, 'max': 1200}, 'Near IR')       
    except AttributeError:
        pass # Suppress error if there is no Skybox NIR data
    
    return outputBands
Set up features for the classifier to be trained on
dataset/ETHPy150Open nasa/CrisisMappingToolkit/cmt/modis/ee_classifiers.py/_create_learning_image