Skip to content

Conversation

@kpentland
Copy link
Collaborator

I've added a function to calculate the 1D jtor profile from the equilibrium. Please do check it makes sense.

This is required for the IMASification work.

@kpentland kpentland added the enhancement New feature or request label Apr 1, 2025
@georgeholt1 georgeholt1 requested a review from nicamo April 16, 2025 15:15
@theo-brown
Copy link
Contributor

I'd be interested in this @nicamo!

F_Q2[i] = np.sum(
(F2 * dV * mask) * self._profiles.limiter_core_mask
)
except AttributeError as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be catching TypeError? Or maybe both TypeError and AttributeError?
Sometimes limiter_core_mask can be None, and then you get a type error from trying to multiply a float by a None.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you have an example of this? Typically, this error pops up because self._profiles is not an attribute of the equilibrium object unless the equilibrium has been solved. Not sure I've seen a case where self._profiles.limiter_core_mask = None

@kpentland kpentland closed this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants