import math


def convertValueToOD(value, baseline_values, converstion_constants):
    """
    Convert values read from A to D to nanoDrop OD
    baseline_value is the calibrated (min, max) reading from the sensor
    when the LED is off and on with an empty bottle in place
    
    -log10( current_value - offset / calibrated_value )
    """
    evo_od = -math.log10(float(value-baseline_values[0])/(baseline_values[1]-baseline_values[0]))
    nano_drop_od = converstion_constants[0]*(evo_od**2)+converstion_constants[1]*(evo_od)+converstion_constants[2]
    return nano_drop_od