Skip to content

Compilation of issues for revamping #23

@HagaiHargil

Description

@HagaiHargil

Summarizing the questions I have:

  1. result[vv, i] = lifetime if lifetime < 1000 else 1000 # normalize long lifetimes to 1000

    How could you reach a lifetime of 1000? A value larger than 70 (in bins) is irrelevant and should be made an NA. Also, use np.min() instead of a ternary. Also also, I'm not sure how you're accessing result as a 2D array (i.e. with only 2 indices). Isn't result 3D? Not sure what is going on, I might need a debugger here.

NA, not 0.0.

  1. lowest_bin_idx = hist[:bins_lowest_idx_upper_bound].argmin()

Why can't the smallest bin be after slot 65?

😱

  1. popt, _ = curve_fit(_exp_decay, x, sg_hist, p0=[max(sg_hist), 1/np.average(sg_hist), min(sg_hist)],

You're using many Python built-in functions here. It will be better if you use their numpy equivalents.

  1. np.zeros([Vdim, nbin.prod()], dtype=np.float32), values)

Start with a numpy array full of nans instead of zeros.

  1. def _bin_edges(sample, bins=None, range=None):

Was this copied from scipy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions