I'm working with 52 rasters of a specific region over a period of one year in python. I also have a mask raster of the same area that is a binary color (250 black pixels for disparate areas of interest, nothing for everything else).
I'm trying to use a black pixel from the mask raster as bounds to grab a single pixel over time (52 rasters/weeks) as a numpy array, and I'd like to do this for all 250 black pixels, grabbing their corresponding pixels over time into separate arrays.
Unfortunately I cannot seem to find a method to pull this off. The closest thing I've found is using a shapefile to clip a raster. Any suggestions on how to achieve this in python would be golden.