Beispiel #1
0
        saxs.write_mrc(aligned[i], sides[0], ioutput + ".mrc")
        print("%s.mrc written. Score = %0.3f %s " %
              (ioutput, scores[i], filtered[i]))
        logging.info('Correlation score to reference: %s.mrc %.3f %s', ioutput,
                     scores[i], filtered[i])

    aligned = aligned[scores > threshold]
    average_rho = np.mean(aligned, axis=0)

    superlogger.info('Mean of correlation scores: %.3f', mean)
    superlogger.info('Standard deviation of the scores: %.3f', std)
    superlogger.info('Total number of input maps for alignment: %i',
                     allrhos.shape[0])
    superlogger.info('Number of aligned maps accepted: %i', aligned.shape[0])
    superlogger.info('Correlation score between average and reference: %.3f',
                     -saxs.rho_overlap_score(average_rho, refrho))
    saxs.write_mrc(average_rho, sides[0], output + '_avg.mrc')
    """
    #split maps into 2 halves--> enan, align, average independently with same refrho
    avg_rho1 = np.mean(aligned[::2],axis=0)
    avg_rho2 = np.mean(aligned[1::2],axis=0)
    fsc = saxs.calc_fsc(avg_rho1,avg_rho2,sides[0])
    np.savetxt(output+'_fsc.dat',fsc,delimiter=" ",fmt="%.5e",header="qbins, FSC")
    """
    #rather than compare two halves, average all fsc's to the reference
    fscs = []
    for calc_map in range(len(aligned)):
        fscs.append(saxs.calc_fsc(aligned[calc_map], refrho, sides[0]))
    fscs = np.array(fscs)
    fsc = np.mean(fscs, axis=0)
    np.savetxt(output + '_fsc.dat',
Beispiel #2
0
        else:
            filtered[i] = ' '
        basename, ext = os.path.splitext(args.files[i])
        ioutput = basename+"_aligned"
        saxs.write_mrc(aligned[i], sides[0], ioutput+'.mrc')
        print("%s.mrc written. Score = %0.3f %s " % (ioutput,scores[i],filtered[i]))
        logging.info('Correlation score to reference: %s.mrc %.3f %s', ioutput, scores[i], filtered[i])

    aligned = aligned[scores>threshold]
    average_rho = np.mean(aligned,axis=0)

    logging.info('Mean of correlation scores: %.3f', mean)
    logging.info('Standard deviation of the scores: %.3f', std)
    logging.info('Total number of input maps for alignment: %i',allrhos.shape[0])
    logging.info('Number of aligned maps accepted: %i', aligned.shape[0])
    logging.info('Correlation score between average and reference: %.3f', 1/saxs.rho_overlap_score(average_rho, refrho))
    saxs.write_mrc(average_rho, sides[0], output+'_avg.mrc')
    logging.info('END')

    """
    #split maps into 2 halves--> enan, align, average independently with same refrho
    avg_rho1 = np.mean(aligned[::2],axis=0)
    avg_rho2 = np.mean(aligned[1::2],axis=0)
    fsc = saxs.calc_fsc(avg_rho1,avg_rho2,sides[0])
    np.savetxt(output+'_fsc.dat',fsc,delimiter=" ",fmt="%.5e",header="qbins, FSC")
    """
    #rather than compare two halves, average all fsc's to the reference
    fscs = []
    for map in range(len(aligned)):
        fscs.append(saxs.calc_fsc(aligned[map],refrho,sides[0]))
    fscs = np.array(fscs)