Skip to content

Calculate irradiance#91

Merged
rcjackson merged 7 commits into
ARM-DOE:mainfrom
jtgasparik:calculate_irradiance
Jul 17, 2026
Merged

Calculate irradiance#91
rcjackson merged 7 commits into
ARM-DOE:mainfrom
jtgasparik:calculate_irradiance

Conversation

@jtgasparik

Copy link
Copy Markdown
Collaborator
  1. Function added to calculate the normalized incident irradiance from previously computed parameters $\tau$ and $\sigma$.
  2. Function to plot the normalized incident irradiance and scale according to peak irradiance.

NOTE: the scaling will have to be modified for evaporative particles. currently, the scaling is purely for visualization purposes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for computing and visualizing the (Gaussian-model) normalized incident irradiance derived from previously estimated Moteki & Kondo parameters (τ and σ), and extends the existing incident-irradiance plot to include an irradiance overlay.

Changes:

  • Added compute_normalized_incident_irradiance_moteki_kondo() to compute (I(t)/I_0) from tau_best and sigma_hat.
  • Updated plot_incident_irradiance() to plot a (scaled) incident-irradiance curve alongside the scattering signal.
  • Extended NDM tests to exercise the new irradiance computation and made small test tweaks in visualization tests.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
pysp2/util/normalized_derivative_method.py Adds the normalized irradiance computation helper and overlays the irradiance curve in the incident-irradiance plot.
tests/test_ndm.py Adds test coverage that exercises the new normalized irradiance helper against an example waveform.
tests/test_vis.py Minor tweaks to the visualization test setup (event selection comment/whitespace).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pysp2/util/normalized_derivative_method.py Outdated
Comment thread pysp2/util/normalized_derivative_method.py Outdated
Comment thread pysp2/util/normalized_derivative_method.py Outdated
Comment thread pysp2/util/normalized_derivative_method.py
Comment thread tests/test_vis.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@rcjackson rcjackson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments responding to copilot.

Comment thread pysp2/util/normalized_derivative_method.py Outdated
Comment thread tests/test_vis.py Outdated
Comment thread pysp2/util/normalized_derivative_method.py
@jtgasparik
jtgasparik requested a review from rcjackson July 16, 2026 13:56

@rcjackson rcjackson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two minor changes to request. Good job on this!

Comment thread pysp2/util/normalized_derivative_method.py Outdated
Comment thread pysp2/util/normalized_derivative_method.py
@rcjackson
rcjackson merged commit 77b5ea1 into ARM-DOE:main Jul 17, 2026
20 checks passed
@jtgasparik
jtgasparik deleted the calculate_irradiance branch July 20, 2026 18:38
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

Successfully merging this pull request may close these issues.

3 participants