def calculateFrameTime(speed, ratio):
    """
    Calculates the frame time interval from chopper parameters.

    Chopper speed in rpm given, but calculations are in Hz.
    The interval is the time between pulses of chopper 5 because chopper 5
    has only 2 slits

    returns the frame time in s
    """
    speed /= 60.0
    if speed == 0:
        return 0.052
    # 2 * speed since we have 2 identical slits in chopper 5
    return ratio / (2 * speed)