nmileva/starfm4py

Applying code to multiple bands

firaterdem opened this issue · 1 comments

Thanks for your valuable work. There was an issue I could not understand while applying the test.py code. How can I apply the code to multi-band images? As I understand it, in order to apply the algorithm to an image containing 6 bands, it is necessary to change the rasterio.open(....read(1)) section in the test.py and repeat this process 6 times (for earch band). Is this approach correct?

Exactly, the 1 in rasterio.open('Test_3/sim_Landsat_t1.tif').read(1) refers to the band. So, for example if you want to run the code for the second band of your images, it will look like this:

LandsatT0 = rasterio.open('fine_resolution_image_t1.tif').read(2)
MODISt0 = rasterio.open('coarse_resolution_image_t0.tif').read(2)
MODISt1 = rasterio.open('coarse_resolution_image_t0.tif').read(2)

Hope this helps!