Skip to content

Bremsstrahlung trapezium rule bug #384

@Mateasek

Description

@Mateasek

I think that here we have a bug in the trapezium evaluation, don't we?

upper_wavelength = spectrum.min_wavelength + spectrum.delta_wavelength * i

I think that there should be (i + 1) term here, otherwise for the 1st iteration the lower_wavelength and upper_wavelength are equal, aren't they?

The line should look like:
upper_wavelength = spectrum.min_wavelength + spectrum.delta_wavelength * (i + 1)

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