Automatic calculation of frame and tirf factor