Code Monkey home page Code Monkey logo

hack-week's Introduction

PlasmaPy

PyPI version Conda version PyPI version License Contributor Covenant

Matrix Mastodon YouTube

CI weekly tests pre-commit.ci status codecov Read the Docs Status

DOI astropy pre-commit

PlasmaPy is an open source, community-developed Python package for plasma research and education. PlasmaPy intends to be for plasma science what Astropy is for astronomy — a collection of functionality commonly needed by plasma scientists and researchers globally, running within and leveraging the open source scientific Python ecosystem. The goals of PlasmaPy are more thoroughly described in this video. Many of our recent presentations are available from the PlasmaPy Community on Zenodo.

Documentation

Please check out our online documentation to learn more about PlasmaPy's capabilities.

If you would like an idea of what PlasmaPy can do, go to our example gallery of Jupyter notebooks. To learn more about how to contribute, check out PlasmaPy's contributor guide.

Installing PlasmaPy

PlasmaPy's online documentation has detailed instructions on how to install PlasmaPy.

To install PlasmaPy on macOS or Linux, open a terminal and run:

python -m pip install plasmapy

Note

On some systems, it might be necessary to specify the Python version number, for example by using python3 or python3.12 instead of python.

To install PlasmaPy on Windows, open a terminal and run

py -3.12 -m pip install plasmapy

The 3.12 may be replaced by any version of Python that is installed and supported by PlasmaPy.

Citing PlasmaPy

If you use PlasmaPy for research resulting in a publication, please cite PlasmaPy. It really helps support the project! Citing software used in research provides credit to its authors, promotes open science & scientific reproducibility, and helps open source projects demonstrate to funding agencies that continued development should be supported.

Please check out the PlasmaPy community on Zenodo for prior releases of PlasmaPy and other resources.

Requesting features

Please submit a feature request in our GitHub repository if you have an idea for new or improved functionality. PlasmaPy is community-driven, and feature requests really help guide the future of the project.

Submitting bug reports

Please submit a bug report on PlasmaPy's GitHub repository if you notice any problems. We really appreciate it!

Contributing

If you are interested in contributing, please check out our contributor guide and code of conduct. There are a number of good first issues in our GitHub repository. New contributors are very welcome!

Events

PlasmaPy has several meetings that are on our calendar. Events are usually held on PlasmaPy's Zoom room.

Last-minute changes are usually announced on the Matrix/Gitter chat room. The most up-to-date information about these meetings is on the meetings page of PlasmaPy's website.

Office hours

Our weekly informal office hours are an opportunity to chat with active members of the PlasmaPy community about topics related to Python and plasma science. If you'd like to learn more about PlasmaPy, our office hours are one of the best places to start. As of July 2024, our office hours are on most Thursdays at 3 pm Eastern. Please feel free to come by!

Community meetings

PlasmaPy's weekly community meetings are a place to talk about code development. If you have an idea for a new feature or would like to make a code contribution, community meetings are a good place to go to. As of July 2024, our community meetings are on most Tuesdays at 2 pm Eastern.

Community

Matrix chat

If you have any questions, the quickest way to get a response is to ask on our Matrix/Gitter channel. Both of these are the same chat channel; Gitter uses a bridge to link the two.

GitHub discussions

We're trying out GitHub discussions as a place to suggest ideas, bring up discussion topics, and ask questions.

Mailing list

You can subscribe to PlasmaPy's low-volume mailing list to receive PlasmaPy newsletters and other announcements.

Contact information

Please feel free to reach out to us at [email protected] or stop by our office hours with any ideas, questions, and/or puns about computational magnetohydrodynamics.

Please use these links to submit a feature request and to submit a bug report on PlasmaPy's GitHub repository.

License

PlasmaPy is permissively licensed under a 3-clause BSD license with added protections against software patents.

Acknowledgments

Development of PlasmaPy has been supported in part by the National Science Foundation, Department of Energy, NASA, and the Smithsonian Institution. For more details, please see PlasmaPy's documentation page on authors and credits.

hack-week's People

Contributors

akym avatar cmoissar avatar cuphyalex avatar dschaffner avatar fsciortino avatar gh012eed avatar hackmd-deploy avatar hayesla avatar johntkappel avatar junoravin avatar namurphy avatar pheuer avatar qudsiramiz avatar remdelaportemathurin avatar rocco8773 avatar sevans711 avatar snekcharmer avatar stanczakdominik avatar svincena avatar trestansimon avatar userr2232 avatar xuan-sun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hack-week's Issues

Implement a Mach Probe analysis module

Setup a Mach probe processing module. Inputs would be 2 or 6 channels of ion saturation current. Compute Mach number based on standard Mach probe model.

Implement the relaxation rates (collision frequencies) in the NRL formulary

The NRL formulary includes relaxation rates/collision frequencies (pg. 31 in this version) for several collision processes. These are expressed as functions of an integral Phi, which itself is a function of the ratio between the bulk flow energy (1/2 mv^2) and the thermal energy (kT) of the plasma: x.

The next page (pg. 32) expresses these four frequencies for different combinations of ions and electrons in both the fast (x>>1) and slow (x<<1) limits (in which the integral of x is approximately constant). However, numerically it is easy enough to just evaluate the integral Phi and get one expression for both regimes.

It would be great to have the integral Phi and the four expressions for the relaxation rates $\nu$ in the PlasmaPy collisions package! In the fast beam limit these are particularly useful for estimating collisionality in shock experiments.

image

Create a `Photon` class

It would be really helpful to have a Photon class that would include the energy, frequency, wavelength, and momentum of a photon. This would behave similarly to a Particle object from PlasmaPy. To do the conversion between those physical quantities, it might be helpful to look into Astropy equivalencies. There's a bit more information in PlasmaPy/PlasmaPy#1175. Thank you!

[EPIC] 2022 Needed Resources

This issue outlines the resources we need to put together and include in resources/...

  1. Installing Python (pip/Anaconda)
  2. Learning Python - @namurphy
  3. Outline IDEs
  4. Terminals (Unix/MacOS/Windows)
  5. Virtual Envornments
  6. git & Github
    • probably software-carpentry with any additions from us

Other topics:

  1. Jupyter notebooks
  2. notebook on PlasmaPy
  3. How to structure Python packages.
  4. How to get git...

Implement an X-Ray Thomson Scattering (XRTS) module

We already have some optical Thomson Scattering features in PlasmaPy, but it would be good to extend these into the XRTS and warm dense matter regimes, where Compton scattering features, and electron degeneracy, and chemical potentials become important.

Functions to get electrostatic fields from known solutions (infinite charged wires, infinite charge sheet)

In addition to the Biot-Savart law solver proposed in #99 and other one in #100, we should have a way of calculating the electric fields resulting from simple charge distributions using Coulomb's Law. This would include the electric field from an finite/infinite linear charge (which has a simple exact solution) and the electric field resulting from an infinite sheet or dipole (which has a complicated exact solution) for boundary conditions at infinity. There might be other analytical solutions worth including, but these two are probably the most important ones.

This can get added to plasmapy.formulary.electrostatistics

PS: Was suggested by Daniel Prater

Update (or delete) binder link

I just got the following error when clicking on the binder link:

ERROR: Package 'hack' requires a different Python: 3.7.12 not in '>=3.8'
Removing intermediate container 0fb81a6b4ae4
The command '/bin/sh -c ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir .' returned a non-zero code: 1Built image, launching...

I'll try to look into this tomorrow...should be a quick fix.

CMA diagrams

Create functionality for plotting CMA diagrams. This will likely take two parts:

  1. A class or series of functionality to calculated the various parameters (L, P, R, etc.), cutoffs, and resonences of the Stix cold plasma dispersion relation.
  2. A plotter to create the figures.

plasmapy's Stix dispersion relation (PR PlasmaPy/PlasmaPy#1511 when merged) can be used to generate the contours.

Create educational Jupyter notebooks

Jupyter notebooks are a great way to use Python to introduce educational concepts. For example, PlasmaPy has a gallery of example notebooks, including a few that use plasmapy.formulary that introduce plasma beta in the solar atmosphere and length scales for reconnection in Earth's magnetosphere.

It would be great to add more educational notebooks using plasmapy.particles, plasmapy.formulary, and other packages in the scientific pythoniverse. If you interested in creating such a notebook, please mention your idea below and/or link to this issue in a pull request (by typing out #61). If you have an idea for a notebook, please feel free to mention it below or to create a new issue.

Thank you!

Formulary Plasma Parameter Calculator

Create a Jupyter Notebook interface with inputs to calculate a range of plasma parameters given various input values.
Example: Return Alfven speed given magnetic field and density.

Ideal Final version: Put in all inputs and have calculator return all possible calculated components.
Example: If I put in a magnetic field and a density, calculator will return Alfven Speed, plasma frequency, gyrofrequncy, but not ion speed (since T is not given).

Implement a bdot probe/magnetic pickup probe module

A module that would take raw magnetic probe data (usually voltage from a scope or DAQ), into magnetic field. Inputs would be raw data, timescale, loop area. Requires time integration of raw data. Could have optional functionality for mean subtractions, calibration, filtering, integration start.

Implement a Fusion Power Balance Formulary

The plasma power balance in a basic form can be written as:

fusion heating + external heating >= radiation loss + transport loss. (Stacey, Weston "Fusion" 2010)

Relatively simple models for these various elements, many of which can be found in the aforementioned reference, can be collected and implemented in PlamaPy module resources so that plasma power balance studies could be done.

As an example, the fusion heating calculation is based on a fusion reactivity model that is fairly easy to implement (I have my own implementation in Mathcad that could be ported to python). The models exist for several fusion relevant reactions and can be extended for ones that I am not familiar with.

The radiation and transport losses have simple models as well that would not be too hard to implement.

External heating sources such as Neutral Beam Injection (NBI) Electron Cyclotron Resonance Heating (ECRH), and Ion Cyclotron Resonance Heating (ICRH) at a simple level just get modeled as a heat source. The community might have suggestions on how this part could be enriched.

Implement the practical fit formula for ionization rate coefficients by Voronov (1997)

The paper by Voronov (1997) includes practical fit formulae for ionization rate coefficients of atoms and ions by electron impact for hydrogen through nickel (e.g., for atomic numbers 1–28). The main benefit of these formulae is that the ionization rates can be calculated efficiently without needing a full database. The rates are accurate to a few percentage points to the best known data at the time, which is good since errors on atomic data are usually quite a bit larger than that.

The fit parameters are given in Table 1 of Voronov (1997). Fortunately, there are programs that can extract tables from pdf files, like camelot. This would be preferable to typing in the data directly since it'll be a lot less work and typos won't sneak in.

Implement a diagnostic coordinate transformation tool

Many photon-based diagnostics (e.g. radiography, x-ray spectroscopy, etc.) require applying corrections at different spatial locations of the instrument. For example, the filters are located in a different spot than the Bragg crystal, and the microchannel plate, the scintillator, the CCD, etc. I was listening to a podcast about AstroConda and one of the speakers mentioned that they have a tool for transforming between different spatial locations within a diagnostic for their telescopes. They can apply calibration corrections, make photometric simulations/estimates, and even apply point-spread functions to simulate the end to end instrument response to a given light source. I think it would be excellent if we could implement a similar type of tool, but more relevant for laboratory plasma experiments.

Implement the plasma critical density in the formulary

The critical plasma density for a given frequency of light is the electron density at which the laser frequency equals the electron plasma frequency. This is an important quantity because light will not propagate above the critical density. As a result, laser light is deposited around this density in laser-solid interactions and optical plasma diagnostics only work below it.

It would be great if this formula was added to the PlasmaPy formulary.

Implement a spectral density analysis for mode identification.

Using two point correlation methods, implement a code to produce a spectral density plot (wavenumber vs frequency). Requires computing cross phase from FFT. Takes data from two spatially separated diagnostic points (Isat, Bdot, etc), computes a cross phase, then an estimated wavenumber using crossphase and separation distance, then histogram power as a function of wavenumber and frequency.

Ref paper: https://aip.scitation.org/doi/10.1063/1.1686491

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.