-
Notifications
You must be signed in to change notification settings - Fork 24
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
Make EFITequilibrium class variables public #349
Comments
Could you expand on what it is you are attempting to do with the EFITEquilibrium class? This class is meant to be immutable as it is representing the state of an EFIT run. If it is being used to pass data around, rather than passing the functions held on its attributes then it is being used incorrectly. |
I actually apply the results of Tokamak Simulation Code (TSC) to |
I should have defined the original one, but the methods implemented on |
Hi @munechika-koyo , I'm sorry but I still don't understand the issue. Could you please help me a bit more? Is it that you would like to be able to define the equilibrium with a different set of parameters? |
Thank you for your reply @Mateasek! |
If you have your magnetic field in 3D, you should be able to calculate most of the values the EFITEquilibrium needs to be initialised, shouldn't you? |
Actually, I suppose so. |
If the problem is only with |
The EFITEquilibrium is for EFIT data. Don't break it's abstractions to support another data source. The correct approach would be to pull all the common functionality into a base class (or set of base classes) and derive a new equilibrium object from that, clean base. If you solve problems by breaking abstractions you will destroy the protections cherab provides to reduce the risk of unexpected behaviours. Do not do it! |
Matt and I always intended for the equilibrium tools to be expanded. The EFITEquilibrium was just the first step. The next stages were, as @Mateasek has suggested, to generalise the code. 2D and 3D Equilibrium objects should provide a common interface and subclasses ahould be provided for each data source. The subclasses would likely contain additional attributes/methods to cover the "extra" data specific to each source. |
I agree to the @CnlPepper's opinion. |
For now I would really suggest @munechika-koyo to make function, which calculates all the needed parameters for EFITEquilibrium, from the parameters you have and returns the EFITEquilibrium object, if this is what you need. I did this several times, when there was something missing/defined through different physical quantity. I'm not an equilibrium expert, so maybe there can be a different path. But I thought the first thing we could do is to define a set of functions, which calculate equilibrium quantities from other equilibrium inputs and other data. This is given by physics and imo is the most general thing. Then, we can start defining equilibrium objects, which would be a sort of a data and function containers, using the defined functions. As far as I know, there are more ways how to get a working equilibrium class, with certain input data. Some may be more numerically accurate than other. This approach may give us and users all the needed building blocks. |
Thank you @Mateasek |
As mentioned in PR #348, I threw the issue about it.
Why I proposed this issue is that I need to reconstruct some function classes (e.g.
MagneticField
) and apply them toEFITequilibrium
variables to use my own tokamak device and calculated equilibrium information.The text was updated successfully, but these errors were encountered: