Eric,
I got your point. To remove soil, we are using vegetation indices that recognize what is green in the image, right. During the senescence time, the majority of the pixels are brown and they will be removed by fieldMask(). Then, when you use this mask to select pixels and calculate the CHM you will get the error. That’s happening because you removed all pixels and there is no information to compare with the soil base.
My suggestion is (1) to not use the mask to calculate CHM, or (2) to use the same mask made with the flight with greater canopy (flowering time) for all flights. In other words, you must adjust the pipeline using one flight from Flowering time, get and save the mask to use it during the removing soil step before calculating the CHM. In some cases, the flights will have some soil area, but I don’t think this is a problem here.
Hope it helps… Let us know if this strategy works.
All the best,
Filipe