Esempio n. 1
0
def mufit_run(mufit, dax, binfile, paramfile):
    global src_dir
    src_dir = mufit
    print src_dir
    parameters = params.Parameters(paramfile)
    mlist_file = binfile

    finder = find_peaks.initFindAndFit(parameters)
    std_analysis.standardAnalysis(finder, dax, mlist_file, parameters)
    print "Analysis complete"
Esempio n. 2
0

if (__name__ == "__main__"):

    import sys

    import sa_library.datareader as datareader
    import sa_library.parameters as parameters
    import setup_A_matrix

    if (len(sys.argv) != 3):
        print("usage <dax> <xml>")
        exit()

    dax_file = datareader.DaxReader(sys.argv[1])
    params = parameters.Parameters(sys.argv[2])

    a_mat_file = params.a_matrix

    print("Using A matrix file:", a_mat_file)
    a_mat = setup_A_matrix.loadAMatrix(a_mat_file)

    image = dax_file.loadAFrame(30)
    htia = HomotopyIA(a_mat, params.epsilon, image.shape)

    hres_image = htia.analyzeImage(image)
    [cs_x, cs_y, cs_a, cs_i] = htia.getPeaks(hres_image)
    print("Number peaks:", cs_x.size)

    htia.printProfilingData()
Esempio n. 3
0
#!/usr/bin/python
#
# Perform mufit analysis on a dax file given parameters.
#
# Hazen 10/13
#

import sys

import find_peaks
import sa_library.parameters as params
import sa_utilities.std_analysis as std_analysis

# setup
if (len(sys.argv) == 3):
    parameters = params.Parameters(sys.argv[2])
    mlist_file = sys.argv[1][:-4] + "_mlist.bin"
elif (len(sys.argv) == 4):
    parameters = params.Parameters(sys.argv[3])
    mlist_file = sys.argv[2]
else:
    print "usage: <movie> <bin> <parameters.xml>"
    exit()

finder = find_peaks.initFindAndFit(parameters)
std_analysis.standardAnalysis(finder, sys.argv[1], mlist_file, parameters)

#
# The MIT License
#
# Copyright (c) 2013 Zhuang Lab, Harvard University
def loadParms(xml_file):
    parms = params.Parameters(xml_file)
    return parms