f0d30a85976a5cf5709df9335ff2744283f08f69,trackpy/refine/brightfield_ring.py,,refine_brightfield_ring,#Any#Any#Any#Any#,7

Before Change


    columns = pos_columns + ["size"]

    if len(coords_df) == 0:
        return pd.DataFrame(columns=columns)

    refined = coords_df

    return refined

After Change


        where r means the radius of the fitted circle of dark pixels around
        the bright interior of the particle. Returns None on failure.
    
    if not isinstance(coords_df, pd.core.series.Series) or len(coords_df) != 2:
        raise ValueError("Refine brightfield ring only supports a Series" +
                         " of 1 particle with values x, y")

    if pos_columns is None:
        pos_columns = guess_pos_columns(coords_df)

    radius = validate_tuple(radius, image.ndim)

    if pos_columns is None:
        pos_columns = default_pos_columns(image.ndim)

    columns = pos_columns + ["r"]

    r = radius[0]
    refined_r, refined_x, refined_y = _refine_brightfield_ring(image, r,
                                                               coords_df)

    if refined_r is None or refined_y is None or refined_x is None:
        return None

    coords_df["x"] = refined_x
    coords_df["y"] = refined_y
    coords_df["r"] = refined_r

    return coords_df

def _refine_brightfield_ring(image, radius, coords_df, threshold=0.5,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: soft-matter/trackpy
Commit Name: f0d30a85976a5cf5709df9335ff2744283f08f69
Time: 2019-02-12
Author: ruben@lighthacking.nl
File Name: trackpy/refine/brightfield_ring.py
Class Name:
Method Name: refine_brightfield_ring


Project Name: has2k1/plotnine
Commit Name: 329dfcea129f72eb3ea741dfc343d4c28c513c69
Time: 2014-02-06
Author: jasc@gmx.net
File Name: ggplot/ggplot.py
Class Name: ggplot
Method Name: _get_layers


Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: 006ae2c4ab6dcd9ba511fe4cb857acfd5441a3bc
Time: 2019-06-17
Author: jonas.rothfuss@gmx.de
File Name: cde/model_fitting/GoodnessOfFitResults.py
Class Name: GoodnessOfFitResults
Method Name: generate_results_dataframe