Script to rotate the foremost image captured on the GIF CCD to align its rotation with that on the TEM fluorescent screen. Use this tool to aid finding features in the CCD image originally sighted on the TEM screen. The magic angle variable is the variable which determines the rotation between the TEM and the CCD. This angles was determined for a JEOL 2010F and a GIF2000 system at a magnification of 1000x (GIF button depressed). The rotation does change slightly with magnification so the match may not be perfect. Rotation is expressed as number of degrees of clockwise rotation required to bring the CCD image in alignment the image on the TEM screen. The bit of maths at the end is because the rotation function uses radians of anticlockwise rotation as its input. Find a vertical (or horizontal) feature on the TEM - take a CCD image of it and estimate the rotation - edit the magic angle variable to suit this system. This script may be handy when probing in EDS or E! ELS mode, identifying features of interest on a CCD image (rotated to match the TEM), then tracking back to the image on the TEM screen to position the probe.