I'd really like an answer to this question that was posted here: https://community.esri.com/message/557007
I too am trying to iterate through sub directories and extractbymask my study area from bands of Landsat data.
I'm getting the same weird output of erroneous NoData values: 0 and -37268.
Not sure why the arcpy version of this code won't work since the GUI tool works fine in arc, but I need to use arcpy to run this process on about 2000 rasters.
Thanks for your help and let me know if I can provide anymore info. I'm using 10.4.1
I was able to get around this by using a bounding box that is orthogonal to the projection I'm using (as opposed to diagonal). This can be accomplished by calculating a bounding box using the Envelope option rather than the Rectangle by Area option in the Minimum bounding Geometry tool. This reduces the area to be mislabeled as 0 or -37286 to nothing!