Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: LASY-org
- License: other
- Language: Python
- Default Branch: development
- Homepage: https://lasydoc.readthedocs.io
- Size: 1.07 MB
Statistics
- Stars: 45
- Watchers: 9
- Forks: 36
- Open Issues: 68
- Releases: 9
Metadata Files
README.md
lasy
Overview
lasy is a Python library that facilitates the initialization of complex laser pulses, in simulations of laser-plasma interactions.
More specifically, lasy offers many ways to define complex laser pulses (e.g. from commonly-known analytical formulas, from experimental measurements, etc.) and offers pre-processing functionalities (e.g. propagation, re-normalization, geometry conversion). The laser field is then exported in a standardized file, that can be read by external simulation codes.
Installation
For the standard release of the code simply run:
python3 -m pip install lasy
If you would prefer the most recent version of the code with the latest functionalities, then run:
python3 -m pip install git+https://github.com/LASY-org/lasy.git
Tutorials
An interactive Google Colab tutorial showing some of the main functionalities of lasy can be found here.
This document is updated on a best-effort basis to keep track with developments in the lasy code base.
Additionally, a set of static (automatically tested) examples can be found here.
Documentation
LASY manipulates laser pulses, and operates on the laser envelope. In 3D (x,y,t) Cartesian coordinates, the definition used is:
math
\begin{aligned}
E_x(x,y,t) = \mathrm{Re}\left( \mathcal{E}(x,y,t) e^{-i\omega_0t}p_x\right)\\
E_y(x,y,t) = \mathrm{Re}\left( \mathcal{E}(x,y,t) e^{-i\omega_0t}p_y\right)\end{aligned}
where $\mathrm{Re}$ stands for real part, $Ex$ (resp. $Ey$) is the laser electric field in the x (resp. y) direction, $\mathcal{E}$ is the complex laser envelope stored and used in lasy, $\omega0 = 2\pi c/\lambda0$ is the angular frequency defined from the laser wavelength $\lambda0$ and $(px,p_y)$ is the (complex and normalized) polarization vector.
In cylindrical coordinates, the envelope is decomposed in $N_m$ azimuthal modes ( see Ref. [A. Lifschitz et al., J. Comp. Phys. 228.5: 1803-1814 (2009)]). Each mode is stored on a 2D grid (r,t), using the following definition:
math
\begin{aligned}
E_x (r,\theta,t) = \mathrm{Re}\left( \sum_{-N_m+1}^{N_m-1}\mathcal{E}_m(r,t) e^{-im\theta}e^{-i\omega_0t}p_x\right)\\
E_y (r,\theta,t) = \mathrm{Re}\left( \sum_{-N_m+1}^{N_m-1}\mathcal{E}_m(r,t) e^{-im\theta}e^{-i\omega_0t}p_y\right).\end{aligned}
For more information, please check our arXiv preprint.
Workflow
How to contribute
All contributions are welcome! For a new contribution, we use pull requests from forks. Below is a very rough summary, please have a look at the appropriate documentation at https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks and around.
First, setup your fork workflow (only once):
- Fork the repo by clicking the Fork button on the top right, and follow the prompts. This will create your own (remote) copy of the main https://github.com/LASY-org/LASY repo, located at https://github.com/[yourusername]/LASY.
- Make your local copy aware of your fork: from your local repository, do git remote add [some-name] https://github.com/[your username]/LASY. For [some-name] it can be convenient to use e.g. your username.
Then, for each contribution:
- Get the last version of branch development from the main repo (e.g. git checkout development && git pull).
- Create a new branch (e.g. git checkout -b my_contribution).
- Do usual git add and git commit operations.
- Push your branch to your own fork: git push -u [some-name] my_contribution
- Whenever you're ready, open a PR from branch my_contribution on your fork to branch development on the main repo. Github typically suggests this very well.
Style conventions
- Docstrings are written using the Numpy style.
- Functions in
utils/laser_utils.pyonly depend on standard types (Python & Numpy) and on theGridclass. That way, they are relatively stand-alone and can be used on different data structures. A simple Grid factory is provided for that purpose. - A PR should be open for any contribution: the description helps to explain the code and open dicussion.
Testing
For tests, you need to have a few extra packages, such as pytest and openpmd-viewer installed:
bash
python3 -m pip install -r tests/requirements.txt
After successful installation, you can run the unit tests: ```bash
Run all tests
python3 -m pytest tests/
Run tests from a single file
python3 -m pytest tests/testlaserprofiles.py
Run a single test (useful during debugging)
python3 -m pytest tests/testlaserprofiles.py::testprofilegaussian3dcartesian
Run all tests, do not capture "print" output and be verbose
python3 -m pytest -s -vvvv tests/ ```
Creating Documentation
Install sphinx (https://www.sphinx-doc.org/en/master/usage/installation.html)
bash
python -m pip install --upgrade -r docs/requirements.txt
cd docs
sphinx-build -b html source _build
GitHub Events
Total
- Create event: 32
- Release event: 3
- Issues event: 40
- Watch event: 17
- Delete event: 18
- Issue comment event: 101
- Push event: 137
- Pull request review event: 266
- Pull request review comment event: 315
- Pull request event: 194
- Fork event: 13
Last Year
- Create event: 32
- Release event: 3
- Issues event: 40
- Watch event: 17
- Delete event: 18
- Issue comment event: 101
- Push event: 137
- Pull request review event: 266
- Pull request review comment event: 315
- Pull request event: 194
- Fork event: 13
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 29
- Total pull requests: 125
- Average time to close issues: about 2 months
- Average time to close pull requests: 29 days
- Total issue authors: 19
- Total pull request authors: 22
- Average comments per issue: 0.83
- Average comments per pull request: 0.32
- Merged pull requests: 77
- Bot issues: 0
- Bot pull requests: 25
Past Year
- Issues: 19
- Pull requests: 83
- Average time to close issues: about 1 month
- Average time to close pull requests: 12 days
- Issue authors: 13
- Pull request authors: 16
- Average comments per issue: 1.11
- Average comments per pull request: 0.33
- Merged pull requests: 53
- Bot issues: 0
- Bot pull requests: 21
Top Authors
Issue Authors
- MaxThevenet (8)
- koesterf (4)
- alexanatoly (3)
- rob-shalloo (3)
- RemiLehe (3)
- n01r (2)
- delaossa (2)
- JessicaTiebel (2)
- kale-j (1)
- Zhengjle1 (1)
- keehong1 (1)
- dmargarone (1)
- TimoEichner (1)
- CriMariani (1)
- Jaykim9206 (1)
Pull Request Authors
- pre-commit-ci[bot] (42)
- MaxThevenet (25)
- RemiLehe (17)
- Paaaaarth (15)
- rob-shalloo (12)
- hightower8083 (12)
- em-archer (6)
- huixingjian (6)
- ax3l (6)
- delaossa (5)
- TimoEichner (5)
- soerenjalas (4)
- kale-j (3)
- RTSandberg (3)
- NadezhdaKHACHAT (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 3,228 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 7
- Total maintainers: 5
pypi.org: lasy
LAser pulse manipulation made eaSY
- Homepage: https://github.com/LASY-org/lasy
- Documentation: https://lasydoc.readthedocs.io
- License: BSD-3-Clause-LBNL
-
Latest release: 0.6.2
published about 1 year ago
Rankings
Maintainers (5)
Dependencies
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v2 composite
- matplotlib *
- numpydoc *
- pydata-sphinx-theme *
- sphinx-gallery *
- sphinx-panels *
- numpy *
- openpmd-api *
- scipy *
- openpmd-viewer * test
- pytest * test