Beispiel #1
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    base_dir = RetinalUtil._landscape_base()
    step = Pipeline.Step.REDUCED
    in_dir = Pipeline._cache_dir(base=base_dir, enum=Pipeline.Step.SANITIZED)
    out_dir = Pipeline._cache_dir(base=base_dir, enum=step)
    force = True
    limit = None
    functor = lambda: to_iwt(in_dir)
    data = CheckpointUtilities.multi_load(cache_dir=out_dir,
                                          load_func=functor,
                                          force=force,
                                          limit=limit,
                                          name_func=FEC_Util.fec_name_func)
    ProcessingUtil.plot_data(base_dir, step, data, xlim=[-50, 150])
    plot_subdir = Pipeline._plot_subdir(base_dir, step)
    out_name = plot_subdir + "heatmap.png"
    ProcessingUtil.heatmap_ensemble_plot(data, out_name=out_name)
Beispiel #2
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    default_base = "../../../Data/170321FEC/"
    base_dir = Pipeline._base_dir_from_cmd(default=default_base)
    step = Pipeline.Step.FILTERED
    in_dir = Pipeline._cache_dir(base=base_dir, enum=Pipeline.Step.READ)
    out_dir = Pipeline._cache_dir(base=base_dir, enum=step)
    force = True
    limit = None
    f_filter_Hz = 5e3
    # filter to X s
    t_filter_s = 1 / f_filter_Hz
    # t_filter -> n_filter_points
    # after filtering, take every N points, where
    # N = f_decimate * n_filter_points
    # in other words, we oversample by 1/f_decimate
    f_decimate = 0.33
    assert f_decimate < 1 and f_decimate > 0
    data = filter_data(in_dir, out_dir, force, t_filter_s, f_decimate)
    ProcessingUtil.plot_data(base_dir, step, data, markevery=1)
Beispiel #3
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    base_input_processing = RetinalUtil._processing_base()
    base_dir = RetinalUtil._landscape_base()
    step = Pipeline.Step.MANUAL
    in_dir = Pipeline._cache_dir(base=base_input_processing,
                                 enum=Pipeline.Step.POLISH)
    out_dir = Pipeline._cache_dir(base=base_dir,enum=step)
    data_input = CheckpointUtilities.lazy_multi_load(in_dir)
    force = True
    functor = lambda : ProcessingUtil.\
        _filter_by_bl(data_input,base_input_processing)
    data = CheckpointUtilities.multi_load(cache_dir=out_dir,load_func=functor,
                                          force=force,
                                          name_func=FEC_Util.fec_name_func)
    # plot each individual
    ProcessingUtil.plot_data(base_dir,step,data,xlim=[-50,150])
    plot_subdir = Pipeline._plot_subdir(base_dir, step)
    out_name = plot_subdir + "heatmap.png"
    ProcessingUtil.heatmap_ensemble_plot(data, out_name=out_name)
Beispiel #4
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    base_dir = RetinalUtil._landscape_base()
    step = Pipeline.Step.SANITIZED
    in_dir = Pipeline._cache_dir(base=base_dir, enum=Pipeline.Step.MANUAL)
    out_dir = Pipeline._cache_dir(base=base_dir, enum=step)
    force = True
    limit = None
    min_sep = RetinalUtil.min_sep_landscape()
    max_sep = min_sep + 100e-9
    functor = lambda: slice_data(in_dir, min_sep=min_sep, max_sep=max_sep)
    data = CheckpointUtilities.multi_load(cache_dir=out_dir,
                                          load_func=functor,
                                          force=force,
                                          limit=limit,
                                          name_func=FEC_Util.fec_name_func)
    plot_dir = Pipeline._plot_subdir(base=base_dir, enum=step)
    ProcessingUtil.heatmap_ensemble_plot(data,
                                         out_name=plot_dir + "heatmap.png",
                                         xlim=[-20, max_sep * 1e9])
    # plot each individual
    ProcessingUtil.plot_data(base_dir, step, data)
Beispiel #5
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    default_base = "../../../Data/170321FEC/"
    base_dir = Pipeline._base_dir_from_cmd(default=default_base)
    step = Pipeline.Step.CORRECTED
    in_dir = Pipeline._cache_dir(base=base_dir, enum=Pipeline.Step.FILTERED)
    out_dir = Pipeline._cache_dir(base=base_dir, enum=step)
    force = True
    n_filter = 10
    data = filter_data(in_dir, out_dir, force, n_filter)
    ProcessingUtil.plot_data(base_dir, step, data, markevery=1)
Beispiel #6
0
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    default_base = "../../../Data/170321FEC/"
    base_dir = Pipeline._base_dir_from_cmd(default=default_base)
    step = Pipeline.Step.READ
    cache_dir = Pipeline._cache_dir(base=base_dir, enum=step)
    force = True
    limit = None
    functor = lambda: read_all_data(base_dir)
    data = CheckpointUtilities.multi_load(cache_dir=cache_dir,
                                          load_func=functor,
                                          force=force,
                                          limit=limit,
                                          name_func=FEC_Util.fec_name_func)
    ProcessingUtil.plot_data(base_dir, step, data, markevery=100)