# Problem with Band Maths in Graph Builder

Hello everybody, i’m experiencing problems with BandMaths in Graph Builder. I calculated the reflection of the red and near- infrared band in the normal band math tool already (refl_red & refl_nir). In the Graph Builder, I then first display all negative pixels and all above 1 as error pixels by setting them to 999 (refl_red/nir_neg/ü1). Then I limit the reflection to values between 0 and 1 (refl_red/nir_0-1). Then I use this to calculate the NDVI and then the percentage of vegetation (P_v). Up to this point everything works well, when I write the result all bands are correctly included in the new product.

But then I want to calculate the Land Surface Emissivity (LSE) (I changed Write to Bandmath(9) at this point; last two images). The formula I use works fine in the normal Bandmath tool and does not cause any problems. But in the graph builder when pasting it i get first the first error and then when I click somewhere else the second ‘Expression is invalid’ error.
The second error also appears after I have successfully performed and written the graph up to P_v. Directly after writing the result here there are suddenly problems with refl_nir_0-1 and NDVI, which worked fine until then. Wassermaske (Watermask) also works fine in the normal band math. Am I doing something wrong or is there an error here? I am using Band Math in Graph Builder for the first time. My complete Workflow looks like this:

So i guess there must be a problem in the graph. Because when i use the bands i calculated with the graph above until P_v to calculate LSE with the formula above, the result looks like image [2]. When i calculate the same bands with the same formula step by step in band maths and then calculate the LSE with the same formula, the LSE result is image [1]. So image [1] looks really good, while image [2] has lots of NaN values. I don’t know what happend here, but the problem must be eather in my way of building the graph or in the graph tool combined with bandmath itself. I will now do it step by step for all images, but maybe someone knows a way why this happens and how to propper use the graph builder for band maths here?