Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wavelength range arguments to spectrum.average_photon_energy #2300

Open
RDaxini opened this issue Nov 18, 2024 · 2 comments
Open

Add wavelength range arguments to spectrum.average_photon_energy #2300

RDaxini opened this issue Nov 18, 2024 · 2 comments

Comments

@RDaxini
Copy link
Contributor

RDaxini commented Nov 18, 2024

Is your feature request related to a problem? Please describe.
The calculated APE value depends on the integration (wavelength) limits. Currently, spectrum.average_photon_energy performs the calculation for the full wavelength range of the input. The user is unable to calculate the APE based on a limited section of the spectrum.

Describe the solution you'd like
Add two new arguments to the function: upper_wavelength and lower_wavelength
Argument names are open for discussion
Default values: None, if value is None then the APE is calculated based on the full wavelength range of the input. Are there any alternative suggestions for this behaviour?

Additional context
I will open a PR soon for this, after wrapping up a couple of other open PRs first.

@adriesse
Copy link
Member

It's pretty easy to limit the wavelength range already by adjusting the input, isn't it?

@RDaxini
Copy link
Contributor Author

RDaxini commented Nov 19, 2024

@adriesse I agree it is, but I thought it might be a more nicely packed 'complete package' if this functionality was integrated into this function? Just an idea though, I don't have to go ahead with it if it seems unnecessary:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants