Skip to content

Conversation

@shimwell
Copy link
Member

@shimwell shimwell commented Oct 2, 2025

Description

speeds up the time_correction_factors function by vectorizing more of the calculation.

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
  • I have followed the style guidelines for Python source files (if applicable)

@shimwell shimwell requested a review from paulromano as a code owner October 2, 2025 12:36
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

What is the motivation to speed this up? In my experience, computing these time correction factors takes a fraction of a second.

@shimwell
Copy link
Member Author

shimwell commented Oct 2, 2025

What is the motivation to speed this up? In my experience, computing these time correction factors takes a fraction of a second.

I was originally tring to speed up the apply_time_correction function. Unfortunatly I couldn't see any way to speed it up. I call it around 1000 times when running post processing on d1s results (tens of plasma shots with extra data points between and cooling dasta points). Speed up in this function would be helpful as the post processing time is not insignificant for this use case. Then i got distracted and tried to speed up the wrong function :-)

@paulromano paulromano enabled auto-merge (squash) October 3, 2025 13:02
@paulromano paulromano merged commit 50071aa into openmc-dev:develop Oct 3, 2025
14 checks passed
Grego01-biot pushed a commit to Grego01-biot/openmc that referenced this pull request Oct 27, 2025
Co-authored-by: Jon Shimwell <[email protected]>
Co-authored-by: Paul Romano <[email protected]>
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