subimage.py is some very simple code which is the idea of how to extract a subimage