def calc_dynamic_range_dr(minor_cycle_list, minor_cycle, dynamic_range_minimum
    ):
    """
    Calculates the dynamic range hreshold
    imax (float): the maximum in the input image
    dynamic_range (float): the dynamic range you want to calculate the threshold for
    returns (float): the dynamic range threshold
    """
    dynamic_range_dr = minor_cycle_list[minor_cycle]
    if dynamic_range_dr == 0:
        dynamic_range_dr = dynamic_range_minimum
    return dynamic_range_dr
