Skip to content

Negative weights for GMMs in InfraPy Utilities - fit-celerity #25

@an12345an

Description

@an12345an

The fit_celerity function currently allows negative weights. The following modification to add bounds ensures positive weights only. This also adds bounds to the allowable celerity limits - should these be added too to ensure the limits are physical?

popt, _ = curve_fit(rcel_func, 1.0 / cel_vals, rcel_pdf, p0=[0.0539, 0.0899, 0.8562, 1.0 / 0.327, 1.0 / 0.293, 1.0 / 0.26, 0.066, 0.08, 0.33],bounds=([0,0,0,1.0/0.375,1.0/0.375,1.0/0.375,0,0,0],[1,1,1,1.0/0.18,1.0/0.18,1.0/0.18,np.inf,np.inf,np.inf]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions