# Path: picasso/__main__.py
# def picasso_logo():
# def _average(args):
# def _hdf2visp(path, pixel_size):
# def _csv2hdf(path, pixelsize):
# def _hdf2csv(path):
# def _link(files, d_max, tolerance):
# def _cluster_combine(files):
# def _cluster_combine_dist(files):
# def _clusterfilter(files, clusterfile, parameter, minval, maxval):
# def _undrift(files, segmentation, display=True, fromfile=None):
# def _density(files, radius):
# def _dbscan(files, radius, min_density):
# def _hdbscan(files, min_cluster, min_samples):
# def _nneighbor(files):
# def _dark(files):
# def _align(files, display):
# def _join(files, keep_index=True):
# def _groupprops(files):
# def _pair_correlation(files, bin_size, r_max):
# def _nanotron(args):
# def _localize(args):
#     def check_consecutive_tif(filepath):
#     def prompt_info():
# def _render(args):
#     def render_many(
#         locs,
#         info,
#         path,
#         oversampling,
#         blur_method,
#         min_blur_width,
#         vmin,
#         vmax,
#         scaling,
#         cmap,
#         silent,
#     ):
# def main():
#                     LOCS_DTYPE = [
#                         ("frame", "u4"),
#                         ("x", "f4"),
#                         ("y", "f4"),
#                         ("z", "f4"),
#                         ("photons", "f4"),
#                         ("sx", "f4"),
#                         ("sy", "f4"),
#                         ("bg", "f4"),
#                         ("lpx", "f4"),
#                         ("lpy", "f4"),
#                     ]
#                     LOCS_DTYPE = [
#                         ("frame", "u4"),
#                         ("x", "f4"),
#                         ("y", "f4"),
#                         ("photons", "f4"),
#                         ("sx", "f4"),
#                         ("sy", "f4"),
#                         ("bg", "f4"),
#                         ("lpx", "f4"),
#                         ("lpy", "f4"),
#                     ]


from picasso import __main__ as main
    import argparse
    import os
"""
Some rudimentary tests.
"""



def test_localize():
    """
    Test localization with mle and drift correction
    """

    cwd = os.getcwd()
    print(cwd)

    parser = argparse.ArgumentParser()
    args = parser.parse_args()

    args.files = "./tests/data/testdata.raw"
    args.fit_method = "mle"
    args.box_side_length = 7
    args.gradient = 5000
    args.baseline = 0
    args.sensitivity = 1
    args.gain = 1
    args.qe = 1
    args.drift = 100

    for fit_method in ["mle"]:
        args.fit_method = fit_method

# Path: picasso/__main__.py
# def picasso_logo():
# def _average(args):
# def _hdf2visp(path, pixel_size):
# def _csv2hdf(path, pixelsize):
# def _hdf2csv(path):
# def _link(files, d_max, tolerance):
# def _cluster_combine(files):
# def _cluster_combine_dist(files):
# def _clusterfilter(files, clusterfile, parameter, minval, maxval):
# def _undrift(files, segmentation, display=True, fromfile=None):
# def _density(files, radius):
# def _dbscan(files, radius, min_density):
# def _hdbscan(files, min_cluster, min_samples):
# def _nneighbor(files):
# def _dark(files):
# def _align(files, display):
# def _join(files, keep_index=True):
# def _groupprops(files):
# def _pair_correlation(files, bin_size, r_max):
# def _nanotron(args):
# def _localize(args):
#     def check_consecutive_tif(filepath):
#     def prompt_info():
# def _render(args):
#     def render_many(
#         locs,
#         info,
#         path,
#         oversampling,
#         blur_method,
#         min_blur_width,
#         vmin,
#         vmax,
#         scaling,
#         cmap,
#         silent,
#     ):
# def main():
#                     LOCS_DTYPE = [
#                         ("frame", "u4"),
#                         ("x", "f4"),
#                         ("y", "f4"),
#                         ("z", "f4"),
#                         ("photons", "f4"),
#                         ("sx", "f4"),
#                         ("sy", "f4"),
#                         ("bg", "f4"),
#                         ("lpx", "f4"),
#                         ("lpy", "f4"),
#                     ]
#                     LOCS_DTYPE = [
#                         ("frame", "u4"),
#                         ("x", "f4"),
#                         ("y", "f4"),
#                         ("photons", "f4"),
#                         ("sx", "f4"),
#                         ("sy", "f4"),
#                         ("bg", "f4"),
#                         ("lpx", "f4"),
#                         ("lpy", "f4"),
#                     ]


# Path: tests/test_localize.py
from picasso import __main__ as main
    import argparse
    import os

"""
Some rudimentary tests.
"""



def test_localize():
    """
    Test localization with mle and drift correction
    """

    cwd = os.getcwd()
    print(cwd)

    parser = argparse.ArgumentParser()
    args = parser.parse_args()

    args.files = "./tests/data/testdata.raw"
    args.fit_method = "mle"
    args.box_side_length = 7
    args.gradient = 5000
    args.baseline = 0
    args.sensitivity = 1
    args.gain = 1
    args.qe = 1
    args.drift = 100

    for fit_method in ["mle"]:
        args.fit_method = fit_method

        main._localize(args)