def calc_duration_time(num_groups, num_integrations, num_reset_frames, frame_time, frames_per_group=1):
    """Calculates duration time (or exposure duration as told by APT)

    Parameters
    ----------
    num_groups : int
        Groups per integration
    num_integrations : int
        Integrations per exposure
    num_reset_frames : int
        Reset frames per integration
    frame_time : float
        Frame time (in seconds)
    frames_per_group : int, optional
        Frames per group -- always one except brown dwarves

    Returns
    -------
    duration_time : float
        Duration time (in seconds).
    """

    duration_time = frame_time * (num_groups * frames_per_group + num_reset_frames) * num_integrations

    return duration_time