Skip to content
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

Create a class to represent arbitrary particle distribution functions #634

Open
namurphy opened this issue May 31, 2019 · 4 comments
Open
Labels
plasmapy.formulary Related to the plasmapy.formulary subpackage priority: high Issues & PRs with significant urgency and importance that should be addressed soon

Comments

@namurphy
Copy link
Member

Plasmas often have particle distribution functions that differ from the standard analytic distribution functions (e.g., Maxwell-Boltzmann, kappa, etc.). PlasmaPy should have a way to represent arbitrary particle distribution functions. This would enable PlasmaPy to be used for the analysis of in situ spacecraft data. It would be helpful to have this done before #11.

@namurphy namurphy added the plasmapy.formulary Related to the plasmapy.formulary subpackage label May 31, 2019
@namurphy namurphy added this to the v0.3.0 milestone May 31, 2019
@namurphy namurphy added the priority: high Issues & PRs with significant urgency and importance that should be addressed soon label May 31, 2019
@namurphy
Copy link
Member Author

Hm...one possibility would be to create a ParticleDistributionFunction base class (maybe an abstract base class?) and then have subclasses for the different distribution types. Might need to distinguish between 1D and 3D.

@StanczakDominik
Copy link
Member

What API would you imagine this with?

@namurphy
Copy link
Member Author

I'm not really sure yet. It'd probably be helpful to come up with some use cases and design it from there. I personally use a fluid approximation for most of my research, so I may not be the best person to ask!

@diego7319
Copy link
Contributor

Maybe using a design pattern should be helpful in this case, particularly https://refactoring.guru/design-patterns/factory-method "Factory method". One Abstract mother class and a child distribution class.
A second option could be using the "adapter method" (https://refactoring.guru/design-patterns/adapter/python/example#lang-features, I think this is clearer https://www.djangospin.com/design-patterns-python/adapter/ )

@namurphy namurphy added this to Large scale issues in Potential Student Projects Feb 19, 2020
@rocco8773 rocco8773 moved this from To-Do to Backlog in Formulary Development Jul 9, 2020
@StanczakDominik StanczakDominik removed this from the v0.3.0 milestone Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.formulary Related to the plasmapy.formulary subpackage priority: high Issues & PRs with significant urgency and importance that should be addressed soon
Projects
Potential Student Projects
Large scale issues
Development

No branches or pull requests

3 participants