Skip to content

broad peak documentation does not match the code #756

Description

@pkienzle

Broad peak model documentation says $I(q) = \frac{A}{q^n} + \frac{C}{1 + (|q - q_0|\xi)^m}^p + B$ but the implementation is

    z = abs(q - peak_pos) * correlation_length
    with errstate(divide='ignore'):
        inten = (porod_scale / q ** porod_exp
                 + peak_scale / (1 + z ** width_exp)) ** shape_exp

I suspect both should be changed, with $I(q) = \frac{A}{q^n} + \frac{C}{(1 + (|q - q_0|\xi)^m)^p} + B$ implemented as

    z = abs(q - peak_pos) * correlation_length
    with errstate(divide='ignore'):
        inten = (porod_scale / q ** porod_exp
                 + peak_scale / (1 + z ** width_exp) ** shape_exp)

Also note that the DAB model is not identical to broad peak with $m = p = 2$ unless $A=0$, $q_0 = 0$ and $C = \xi^3$

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