Beispiel #1
0
def avemlist(input_filename, output_filename):
    argc = 3
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [asciiString(elt) for elt in ["avemlist",
                                            input_filename,
                                            output_filename]]
    c_avemlist.avemlist(argc, argv)
Beispiel #2
0
def applyDriftCorrection(mlist_filename, drift_filename):
    argc = 3
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [asciiString(elt) for elt in ["apply-drift-correction",
                                            mlist_filename,
                                            drift_filename]]
    adc.applyDriftCorrection(argc, argv)
Beispiel #3
0
def fitz(i3_filename, cutoff, wx_params, wy_params, z_min, z_max, z_step=1.0):
    """
    This expects all z related parameters to be in nanometers.
    """
    c_fitz.fitz(asciiString(i3_filename), numpy.ascontiguousarray(wx_params),
                numpy.ascontiguousarray(wy_params), cutoff, z_min, z_max,
                z_step)
Beispiel #4
0
def applyDriftCorrection(mlist_filename, drift_filename):
    argc = 3
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [
        asciiString(elt)
        for elt in ["apply-drift-correction", mlist_filename, drift_filename]
    ]
    adc.applyDriftCorrection(argc, argv)
Beispiel #5
0
def avemlist(input_filename, output_filename):
    argc = 3
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [
        asciiString(elt)
        for elt in ["avemlist", input_filename, output_filename]
    ]
    c_avemlist.avemlist(argc, argv)
Beispiel #6
0
def tracker(mlist_filename, descriptor, radius, zmin, zmax, save_track_id = 0):
    argc = 7
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [asciiString(elt) for elt in ["tracker",
                                            mlist_filename,
                                            descriptor,
                                            radius,
                                            zmin,
                                            zmax,
                                            save_track_id]]
    c_tracker.tracker(argc, argv)
Beispiel #7
0
def fitz(i3_filename, cutoff, wx_params, wy_params, z_min, z_max, z_step = 1.0):
    """
    This expects all z related parameters to be in nanometers.
    """
    c_fitz.fitz(asciiString(i3_filename),
                numpy.ascontiguousarray(wx_params),
                numpy.ascontiguousarray(wy_params),
                cutoff,
                z_min,
                z_max,
                z_step)
Beispiel #8
0
def avemlist(input_filename, output_filename):

    # Load input file meta data (if any).
    meta_data = readinsight3.loadI3Metadata(input_filename)

    argc = 3
    argv = (ctypes.c_char_p * argc)()
    argv[:] = [
        asciiString(elt)
        for elt in ["avemlist", input_filename, output_filename]
    ]
    c_avemlist.avemlist(argc, argv)

    # Add the same meta data to the output file.
    if meta_data is not None:
        with open(output_filename, 'ab') as fp:
            fp.write(ElementTree.tostring(meta_data, 'ISO-8859-1'))