def exposure_time(vmag, counts, iodine=False, t1=110., v1=8., exp1=250., iodine_factor=0.7):
    """
    Expected exposure time based on the scaling from a canonical exposure time
    of 110s to get to 250k on 8th mag star with the iodine cell in the light
    path
    
    Parameters
    ----------
    expcounts : float 
        desired number of counts 
        250 = 250k, 10 = 10k (CKS) i.e. SNR = 45 per pixel.
    iodine (bool) : is iodine cell in or out? If out, throughput is higher by 30%
    
    Returns
    -------
    exptime : float
        exposure time [seconds]
    
    """

    # flux star / flux 8th mag star
    fluxfactor = 10.0**(-0.4*(vmag-v1)) 
    exptime = t1/fluxfactor 
    exptime *= counts/exp1
    if iodine == False:
        exptime *= iodine_factor
    return exptime