Beispiel #1
0
def test_scmos_Z():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_sc_Z.xml")
    mlist = storm_analysis.getPathOutputTest("test_sc_Z.hdf5")
    storm_analysis.removeFile(mlist)
    
    from storm_analysis.sCMOS.scmos_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1942):
        raise Exception("sCMOS Z did not find the expected number of localizations.")
Beispiel #2
0
def test_3ddao_2d():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_3d_2d.xml")
    mlist = storm_analysis.getPathOutputTest("test_3d_2d.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.daostorm_3d.mufit_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1970):
        raise Exception("3D-DAOSTORM 2D did not find the expected number of localizations.")
Beispiel #3
0
def test_scmos_Z():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_sc_Z.xml")
    mlist = storm_analysis.getPathOutputTest("test_sc_Z.bin")
    storm_analysis.removeFile(mlist)

    from storm_analysis.sCMOS.scmos_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1958):
        raise Exception(
            "sCMOS Z did not find the expected number of localizations.")
Beispiel #4
0
def test_3ddao_Z():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_3d_Z.xml")
    mlist = storm_analysis.getPathOutputTest("test_3d_Z.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.daostorm_3d.mufit_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1955):
        raise Exception(
            "3D-DAOSTORM Z did not find the expected number of localizations.")
Beispiel #5
0
def test_3ddao_2d_fixed_non_square():

    movie_name = storm_analysis.getData("test/data/test_300x200.dax")
    settings = storm_analysis.getData("test/data/test_3d_2d_fixed.xml")
    mlist = storm_analysis.getPathOutputTest("test_3d_2d_300x200.bin")
    storm_analysis.removeFile(mlist)

    from storm_analysis.daostorm_3d.mufit_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 991):
        raise Exception(
            "3D-DAOSTORM 2D fixed non square did not find the expected number of localizations."
        )
Beispiel #6
0
def test_3ddao_2d_fixed_gt_text():
    """
    Start fitting from ground truth locations (text file version).
    """
    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_3d_2d_fixed_gt_text.xml")
    mlist = storm_analysis.getPathOutputTest("test_3d_2d_fixed_gt_text.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.daostorm_3d.mufit_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 200):
        raise Exception("3D-DAOSTORM 2D fixed ground truth did not find the expected number of localizations.")    
Beispiel #7
0
def test_3ddao_2d_fixed_gt_text():
    """
    Start fitting from ground truth locations (text file version).
    """
    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_3d_2d_fixed_gt_text.xml")
    mlist = storm_analysis.getPathOutputTest("test_3d_2d_fixed_gt_text.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.daostorm_3d.mufit_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 200):
        raise Exception(
            "3D-DAOSTORM 2D fixed ground truth did not find the expected number of localizations."
        )
Beispiel #8
0
def test_scmos_3d():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_sc_3d.xml")
    mlist = storm_analysis.getPathOutputTest("test_sc_3d.hdf5")
    storm_analysis.removeFile(mlist)
    
    from storm_analysis.sCMOS.scmos_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1950):
        raise Exception("sCMOS 3D did not find the expected number of localizations.")

    # Verify that the Z values actually got calculated.
    if not veri.verifyZWasCalculated(mlist):
        raise Exception("Z values were not calculated for sCMOS 3D fitting.")
Beispiel #9
0
def test_l1h():

    # Test L1H.
    movie_name = storm_analysis.getData("test/data/test_l1h.dax")
    settings = storm_analysis.getData("test/data/test_l1h.xml")
    hres = storm_analysis.getPathOutputTest("test_l1h_list.hres")
    mlist = storm_analysis.getPathOutputTest("test_l1h_list.bin")

    storm_analysis.removeFile(hres)
    storm_analysis.removeFile(mlist)

    from storm_analysis.L1H.cs_analysis import analyze
    analyze(movie_name, settings, hres, mlist)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1986):
        raise Exception(
            "L1H did not find the expected number of localizations.")
Beispiel #10
0
def test_scmos_3d():

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_sc_3d.xml")
    mlist = storm_analysis.getPathOutputTest("test_sc_3d.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.sCMOS.scmos_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 1950):
        raise Exception(
            "sCMOS 3D did not find the expected number of localizations.")

    # Verify that the Z values actually got calculated.
    if not veri.verifyZWasCalculated(mlist):
        raise Exception("Z values were not calculated for sCMOS 3D fitting.")
Beispiel #11
0
def test_spliner_std_2D():

    # Only test for Python3 due to pickle incompatibility issues.
    if (sys.version_info < (3, 0)):
        return

    movie_name = storm_analysis.getData("test/data/test.dax")
    settings = storm_analysis.getData("test/data/test_spliner_2D.xml")
    mlist = storm_analysis.getPathOutputTest("test_spliner_2D.hdf5")
    storm_analysis.removeFile(mlist)

    from storm_analysis.spliner.spline_analysis import analyze
    analyze(movie_name, mlist, settings)

    # Verify number of localizations found.
    num_locs = veri.verifyNumberLocalizations(mlist)
    if not veri.verifyIsCloseEnough(num_locs, 2004):
        raise Exception(
            "Spliner 2D did not find the expected number of localizations.")