This script is used to calculate and compensate for field rotation in astronomical images and timelapses.
The use of this script allows astrophotographers with alt-az mounts to gather data over a far longer period of time without encountering processing issues, greatly increasing the theoretical maximum integration time.
The script can also be used to stabilise timelapses, providing an aligned axis of rotation in each frame - as seen below.
This timelapse of Mars' axial rotation contains roughly 1hr 15m of data, consisting of 36 frames taken at two-minute intervals.
Field rotation within the same image series prior to processing.
The original code that this script is based on was developed by the user M63 in the /r/astrophotography Discord server, who provided it to the community for free usage. He has generously given me permission to further develop the project here.