Skip to content

Conversation

@eitan-weinstein
Copy link
Contributor

@eitan-weinstein eitan-weinstein commented Dec 23, 2025

Closes #216.
Closes #203.
Closes #202 .

This PR follows the inclusion of half-lives into the canonical structure of ALARADFrames in #206. I've introduced filtering capabilities in alara_output_processing.filter_rows() for users to filter on the stability or lack thereof of the nuclides in the ALARADFrame, as well as filtering half-lives against time thresholds (i.e. preserving all nuclides with a half-live greater than 1e6 seconds).

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

Perhaps we should discuss as a group (incl. via slack) whether we need any half-life operators that include equality. Since this is float data, it is always dubious to use any real equality comparison anyway.

Comment on lines 439 to 442
half_lives = set(self.loc[
self['half_life'].apply(lambda x: isinstance(x, float)),
'half_life'
])
Copy link
Member

Choose a reason for hiding this comment

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

While this isn't too complicated, it makes we wonder if it isn't better to use some special float to indicate stable nuclides, e.g. -1? Then this could just be a simpler filter for half_life >= 0?

Comment on lines 13 to 16
'>=' : operator.ge,
'<=' : operator.le,
'==' : operator.eq,
'!=' : operator.ne
Copy link
Member

Choose a reason for hiding this comment

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

Given the precision of floating point operations I wonder if we need any of these that include equality? Limiting it to just < and > might make it all a little simpler, too.

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

LGTM - thanks @eitan-weinstein

@gonuke gonuke merged commit 5bf40cd into svalinn:main Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants