Hello,
Did you try following the examples here Soil and plant masking w/ Pix4Dfields?
The clue under the workaround described in the community post I shared above is to produce a 0/0 that is defined as “Not a Number” (NaN), and considered as transparent, or just sum 0, that leaves the value the same. Any number operated with NaN is NaN. There you are computing NDVI + 0 = NDVI for the valid points, and NDVI + NaN = NaN for the “invalid”.
I am not sure if I understand your question. Do you want values between this range 0 to 1? If yes, you can take as example the community post I shared and do:
(nir-red)/(nir+red) + 0/max(0; (nir-red)/(nir+red) - 0)
Note: In this formula, using max() will mask everything lower 0. Since the NDVI goes up to 1 then you will get values from 0 to 1
Let us know if you have any question
Best,