コード例 #1
0
ファイル: emagefit_score.py プロジェクト: drussel/imp
res:     Resolution to generate the projections
nimg:    Images per batch used when scoring a lot of images (to avoid memory
         problems)
""",
                              description="EMageFit scoring",
                              imp_module=em2d)
    opts, args = parser.parse_args()
    if len(args) != 6:
        parser.error("wrong number of arguments")
    return args


if __name__ == "__main__":
    args = parse_args()
    complete_fn_model  = args[0]
    images_sel_file = args[1]
    pixel_size = float(args[2])
    n_projections= int(args[3])
    resolution= float(args[4])
    images_per_batch= int(args[5])

    all_regs =  score_model(complete_fn_model,
                images_sel_file,
                pixel_size,
                n_projections,
                resolution,
                images_per_batch)
    for i, reg in enumerate(all_regs):
        print "Score for image %s: %f" % (i, reg.get_score())
    print "Global score ", em2d.get_global_score(all_regs)
コード例 #2
0

if __name__ == "__main__":
    import sys
    if(len(sys.argv) != 7 ):
        print "Parameters"
        print "[1] - PDB name"
        print "[2] - images selection file"
        print "[3] - pixel size"
        print "[4] - number of projections used for registering"
        print "[5] - resolution to generate the projections"
        print "[6] - images per batch used when scoring (avoid memory problems)"
        sys.exit()

    complete_fn_model  = sys.argv[1]
    images_sel_file = sys.argv[2]
    pixel_size = float(sys.argv[3] )
    n_projections= int(sys.argv[4])
    resolution= float(sys.argv[5])
    images_per_batch= int(sys.argv[6])

    all_regs =  score_model(complete_fn_model,
                images_sel_file,
                pixel_size,
                n_projections,
                resolution,
                images_per_batch)
    for reg in all_regs:
        print reg.get_score()
    print em2d.get_global_score(all_regs)