DataPipeline/Utilities.py
def createCDData(fname, names, tm, noise=0.2):
    """Create some simulated cd data with noise as a function of temp"""

    cw = csv.writer(open(fname,'w'))
    cw.writerow(['temp']+names)
    for x in range(250,350,1):
        val = 10/(1+exp((tm-x)/2))
        vals = [round(val+random.normalvariate(0,noise),2) for j in range(len(names))]
        vals.insert(0,x)
        cw.writerow(vals)
    return
Create some simulated cd data with noise as a function of temp
Create some simulated cd data with noise as a function of temp
Create some simulated cd data with noise as a function of temp
def createCDData(fname, names, tm, noise=0.2):
    cw = csv.writer(open(fname,'w'))
    cw.writerow(['temp']+names)
    for x in range(250,350,1):
        val = 10/(1+exp((tm-x)/2))
        vals = [round(val+random.normalvariate(0,noise),2) for j in range(len(names))]
        vals.insert(0,x)
        cw.writerow(vals)
    return
def createCDData ( fname , names , tm , noise = 0.2 ) : cw = csv . writer ( open ( fname , 'w' ) ) cw . writerow ( [ 'temp' ] + names ) for x in range ( 250 , 350 , 1 ) : val = 10 / ( 1 + exp ( ( tm - x ) / 2 ) ) vals = [ round ( val + random . normalvariate ( 0 , noise ) , 2 ) for j in range ( len ( names ) ) ] vals . insert ( 0 , x ) cw . writerow ( vals ) return
Create some simulated cd data with noise as a function of temp
Create some simulated cd data with noise as a function of temp
"""Create some simulated cd data with noise as a function of temp"""
fname
names
tm
noise