I have a multiband image with the bands labelled t1 to t12 representing 12 timesteps. I want to know the timestep (band) of the minimum and maximum values for each pixel and convert this timestep to an integer e.g. t7 = 7. Some timesteps have masked values.
Link to the code is here https://code.earthengine.google.com/c9e145f1be528339e1b96d03da12b3ab