In Google Earth Engine, I have an image with 400+ bands that represent probabilities through time when they are group by 3. The bands look something like this
- prob1_0
- prob2_0
- prob3_0
- prob1_1
- prob2_1
- prob3_1 ...
- prob1_152
- prob2_152
- prob3_152
I want to select the 3 bands starting with 0 to get a separate image that I can add to an image collection. I understand how to do it for 1 image (as coded below) but I want to be able to loop over the list variable to create an image collection with 153 images.
var list = ee.List.sequence(0, 152)
var matchKey = '.*' + list.get(0)
var event0 = ee.Image(image400).select(matchKey).clip(studyArea)
var imageCollection = ee.ImageCollection([event0])
How should I go about it?