Bit of code that uses a couple of different edge detection algorithms to determine the edges of a fits file to provide edges which can be directly plotted in matplotlib.
jradcliffe5/generate_survey_areas
Generates survey areas from fits images ready for plotting in matplotlib
PythonGPL-3.0