Giter Site home page Giter Site logo

hack-week's Introduction

PlasmaPy

PyPI version Conda version PyPI version License Contributor Covenant

Matrix Mastodon YouTube

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

DOI astropy pre-commit Open Source Helpers

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. Current functionality is described in PlasmaPy's online documentation. If you would like an idea of what PlasmaPy can do, check out our example gallery of Jupyter notebooks. Many of our recent presentations are available from the PlasmaPy Community on Zenodo.

Please submit a feature request in our GitHub repository if you have an idea for new functionality. PlasmaPy is community-driven, and feature requests really help guide the direction of software development. Please also submit a bug report if you notice any problems. We really appreciate it!

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

Important

PlasmaPy recently switched to an src layout. Source code that was in plasmapy/ is now in src/plasmapy/. Tests are now located in a top-level tests/ directory. Existing pull requests should pull in the changes from the main branch with git pull upstream main (assuming the remote for the primary PlasmaPy repo is named upstream). Because git does not automatically remove directories, the plasmapy/ directory in older clones must be manually deleted. If you previously did an editable installation of PlasmaPy, it will likely need to be redone by running pip install -e .[tests,docs] in the top-level directory of the repository.

Installation

PlasmaPy requires Python 3.10 or newer. If you do not have Python installed already, here are the instructions to download and install Python.

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

python -m pip install plasmapy

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 supported by PlasmaPy.

If you have installed Conda, then you can also install PlasmaPy into an activated Conda environment by running:

conda install -c conda-forge plasmapy

PlasmaPy can also be installed using Anaconda Navigator so long as conda-forge is added as a channel.

Check out our instructions on installing PlasmaPy for more details.

Please check out our documentation for more information on how to install PlasmaPy. To contribute to the package or use the most recent version, check out our instructions on installing PlasmaPy from source.

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 February 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 February 2024, our community meetings are on most Tuesdays at 2 pm Eastern.

Project meetings

PlasmaPy's weekly project meetings are a place to discuss education, outreach, and project coordination. Topics might range from creating educational notebooks to organizing community events. As of February 2024, project meetings are held on most Wednesdays at 3 pm Eastern.

Working group meetings

PlasmaPy has started several working groups, including on diagnostics, dispersion relations, and simulation. These working groups usually meet fortnightly, and their meeting times can be found in PlasmaPy's event calendar. If you would like to join a PlasmaPy working group or even start a new one, please email us at [email protected]!

Plasma Hack Week

A hack week is a mix of a hackathon and a summer school. Hack weeks provide an opportunity to learn from each other and code together. Plasma Hack Week was held virtually in the summers of 2021 and 2022, and we hope to hold this again in the future. If you would like to help organize a future Plasma Hack Week, please email [email protected].

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.

Suggestion box

We have a suggestion box if you would like to (optionally anonymously) suggest a feature/topic for consideration. These suggestions might be changed into GitHub issues for further discussion.

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.

License

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

Citing PlasmaPy

An emerging best practice for software citation is to cite the specific version of each software package used in a research project (instead of only citing a journal article, website, or GitHub repository). The citation should include a persistent identifier that uniquely identifies which version of the software was used. We therefore ask that you cite the specific version of PlasmaPy used in your research project. Releases of PlasmaPy are available from the PlasmaPy community on Zenodo, along with many other PlasmaPy resources. Please check our documentation for more detailed citation instructions.

Acknowledgments

Early development on PlasmaPy was supported in part by the U.S. Department of Energy, the Smithsonian Institution, NASA, and Google Summer of Code. Ongoing PlasmaPy development is being supported through a collaborative award from the Cyberinfrastructure for Sustained Scientific Innovation program of the U.S. National Science Foundation.

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 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.

[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...

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!

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

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.

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 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

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.

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 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.

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!

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

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 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 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.

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.

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.