Exemplo n.º 1
0
def ambiguous_data_graphs():
    ''' Amb is in the form of 
     Final data structure will be a dictionary:
      amb[animal][session] = (# radial, #discrepency, total) '''
    
    logging.info(descr)
    
    amb = find_ambiguous_data()
    
    # Get a blob of data
    tmp = [(an,sess,1.0*dd[0]/dd[2], 1.0*(dd[1]-dd[0])/(dd[2]-dd[0]),dd[2]) 
           for (an, dat) in amb.items()  
           for (sess,dd) in dat.items() if dd is not None]
    
    
    tmp.sort(key=lambda x:x[3])
    print '(Animal,Session):    Fraction radial    Fraction Discrepency    Total # data points'
    for animal,sess,rad,disc,tot in tmp:
        print '(%i,%i):    %.3f    %.3f    %i'%(animal,sess,rad,disc,tot)
Exemplo n.º 2
0
def ambiguous_data_graphs():
    ''' Amb is in the form of 
     Final data structure will be a dictionary:
      amb[animal][session] = (# radial, #discrepency, total) '''

    logging.info(descr)

    amb = find_ambiguous_data()

    # Get a blob of data
    tmp = [(an, sess, 1.0 * dd[0] / dd[2],
            1.0 * (dd[1] - dd[0]) / (dd[2] - dd[0]), dd[2])
           for (an, dat) in amb.items() for (sess, dd) in dat.items()
           if dd is not None]

    tmp.sort(key=lambda x: x[3])
    print '(Animal,Session):    Fraction radial    Fraction Discrepency    Total # data points'
    for animal, sess, rad, disc, tot in tmp:
        print '(%i,%i):    %.3f    %.3f    %i' % (animal, sess, rad, disc, tot)
def investigate_angle_graphs():
    amb = find_ambiguous_data()

    # Get a blob of data
    tmp = [(an, sess, 1.0 * dd[0] / dd[2],
            1.0 * (dd[1] - dd[0]) / (dd[2] - dd[0]), dd[2])
           for (an, dat) in amb.items() for (sess, dd) in dat.items()
           if dd is not None]

    tmp.sort(key=lambda x: x[3], reverse=True)

    for i in range(len(tmp)):
        if i < 254: continue
        logging.info('%i/%i', i, len(tmp))
        (animal, session, _, _, _) = tmp[i]
        try:
            mk_grph(animal, session)
        except Exception as e:
            print e
            continue
        plt.show()
def investigate_angle_graphs():
    amb = find_ambiguous_data()

    # Get a blob of data
    tmp = [
        (an, sess, 1.0 * dd[0] / dd[2], 1.0 * (dd[1] - dd[0]) / (dd[2] - dd[0]), dd[2])
        for (an, dat) in amb.items()
        for (sess, dd) in dat.items()
        if dd is not None
    ]

    tmp.sort(key=lambda x: x[3], reverse=True)

    for i in range(len(tmp)):
        if i < 254:
            continue
        logging.info("%i/%i", i, len(tmp))
        (animal, session, _, _, _) = tmp[i]
        try:
            mk_grph(animal, session)
        except Exception as e:
            print e
            continue
        plt.show()