Metadata-Version: 2.4
Name: solarwindpy
Version: 0.4.1
Summary: Python package for solar wind data analysis.
Author-email: "B. L. Alterman" <blaltermanphd@gmail.com>
License: BSD 3-Clause License
        
        Copyright (c) 2019, B. L. Alterman
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of the copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Bug Tracker, https://github.com/blalterman/SolarWindPy/issues
Project-URL: Source, https://github.com/blalterman/SolarWindPy
Project-URL: Documentation, https://solarwindpy.readthedocs.io
Keywords: plasma,physics,solar wind,measurements,in situ,spacecraft
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: <4,>=3.12
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy<3.0,>=1.26
Requires-Dist: scipy>=1.16
Requires-Dist: pandas<4,>=3
Requires-Dist: numexpr>=2.8
Requires-Dist: bottleneck>=1.3
Requires-Dist: tables>=3.9
Requires-Dist: matplotlib>=3.10
Requires-Dist: astropy>=8
Requires-Dist: numba>=0.59
Requires-Dist: tabulate>=0.9
Requires-Dist: docstring-inheritance<4,>=3.0
Provides-Extra: test
Requires-Dist: pytest>=9.0; extra == "test"
Requires-Dist: pytest-cov>=6.0; extra == "test"
Requires-Dist: packaging>=23.0; extra == "test"
Requires-Dist: pyyaml>=6.0; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: sphinx_rtd_theme>=2.0; extra == "docs"
Requires-Dist: sphinxcontrib-spelling>=8.0; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex>=2.6; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
Requires-Dist: numpydoc>=1.6; extra == "docs"
Requires-Dist: docstring-inheritance<4,>=3.0; extra == "docs"
Requires-Dist: doc8>=1.1; extra == "docs"
Provides-Extra: dev
Requires-Dist: pytest>=9.0; extra == "dev"
Requires-Dist: pytest-cov>=6.0; extra == "dev"
Requires-Dist: pyyaml>=6.0; extra == "dev"
Requires-Dist: sphinx>=7.0; extra == "dev"
Requires-Dist: sphinx_rtd_theme>=2.0; extra == "dev"
Requires-Dist: sphinxcontrib-spelling>=8.0; extra == "dev"
Requires-Dist: sphinxcontrib-bibtex>=2.6; extra == "dev"
Requires-Dist: sphinx-copybutton>=0.5; extra == "dev"
Requires-Dist: numpydoc>=1.6; extra == "dev"
Requires-Dist: docstring-inheritance<4,>=3.0; extra == "dev"
Requires-Dist: doc8>=1.1; extra == "dev"
Requires-Dist: import-linter>=2.6; extra == "dev"
Requires-Dist: pre-commit>=3.5; extra == "dev"
Requires-Dist: griffe>=2.3; extra == "dev"
Requires-Dist: mutmut>=3.8; extra == "dev"
Requires-Dist: sybil>=10.1; extra == "dev"
Requires-Dist: pytest-randomly>=5.0; extra == "dev"
Requires-Dist: vulture>=2.16; extra == "dev"
Requires-Dist: ruff>=0.16; extra == "dev"
Provides-Extra: analysis
Requires-Dist: jupyterlab>=4.0; extra == "analysis"
Requires-Dist: tqdm>=4.0; extra == "analysis"
Requires-Dist: ipywidgets>=8.0; extra == "analysis"
Dynamic: license-file

###########
SolarWindPy
###########

|Build Status| |Docs Status| |Ruff|

|PyPI| |Conda|

|Python| |License| |Zenodo|

Python data analysis tools for solar wind measurements.

Quick Start
-----------

After installation, import the package and create a plasma object with sample data:

>>> import pandas as pd
>>> from solarwindpy.core.plasma import Plasma

>>> # Create sample solar wind data (3 time points)
>>> epoch = pd.date_range('2023-01-01', periods=3, freq='1h')
>>> columns = pd.MultiIndex.from_tuples([
...     ('n', '', 'p1'), ('n', '', 'a'),           # Number density
...     ('v', 'x', 'p1'), ('v', 'x', 'a'),         # Velocity components
...     ('v', 'y', 'p1'), ('v', 'y', 'a'),
...     ('v', 'z', 'p1'), ('v', 'z', 'a'),
...     ('w', 'par', 'p1'), ('w', 'par', 'a'),     # Thermal speeds
...     ('w', 'per', 'p1'), ('w', 'per', 'a'),
...     ('b', 'x', ''), ('b', 'y', ''), ('b', 'z', '')  # Magnetic field
... ], names=['M', 'C', 'S'])

>>> # Realistic solar wind values
>>> data = pd.DataFrame([
...     [5.0, 0.25, 400, 380, 10, 5, -20, -15, 30, 15, 25, 12, 3.5, -1.2, 0.8],
...     [8.0, 0.40, 450, 420, 15, 8, -25, -18, 35, 18, 28, 14, 4.1, -1.5, 1.2],
...     [7.1, 0.30, 420, 400, 12, 6, -22, -16, 32, 16, 26, 13, 3.8, -1.3, 0.9],
... ], index=epoch, columns=columns)

>>> # Create plasma object with protons and alphas
>>> plasma = Plasma(data, 'p1', 'a')

>>> # Access ion species
>>> print(plasma.species)
('a', 'p1')

>>> # Mean proton density: (5.0 + 8.0 + 7.1) / 3 = 6.7
>>> print(f"Proton density: {plasma.p1.n.mean():.1f} cm⁻³")
Proton density: 6.7 cm⁻³

See the `documentation <https://solarwindpy.readthedocs.io>`_ for the
quickstart, usage examples and the API reference.

Installation
============

The supported Python versions and dependency ranges are declared in
`pyproject.toml <https://github.com/blalterman/SolarWindPy/blob/master/pyproject.toml>`_
(``requires-python`` and ``dependencies``); the PyPI page
shows them for each published release.

SolarWindPy is available via PyPI and conda-forge:

User
----

Install from PyPI:

.. code-block:: bash

   pip install solarwindpy

Or install from conda-forge:

.. code-block:: bash

   conda install -c conda-forge solarwindpy

Development
-----------

1. Fork the repository and clone your fork.
2. Install development dependencies:

   .. code-block:: bash

      git clone https://github.com/YOUR-USERNAME/SolarWindPy.git
      cd SolarWindPy
      pip install -e ".[dev]"  # Includes all dev tools

   **Alternative (Conda environment)**:

   .. code-block:: bash

      conda env create -f solarwindpy.yml
      conda activate solarwindpy
      pip install -e ".[dev]"

3. Run the test suite with ``pytest``:

   .. code-block:: bash

      pytest -q

**Note**: ``pyproject.toml`` is the only dependency declaration; there are no lockfiles.

4. Optionally install the pre-commit hooks:

   .. code-block:: bash

      pre-commit install

   Each commit then runs the hooks that ``.pre-commit-config.yaml`` lists, and
   that file is the full list. Expect a commit that stages a ``.py`` file to
   run the full test suite.

5. Build the documentation and fail on warnings:

   .. code-block:: bash

      cd docs
      make html SPHINXOPTS="-W --keep-going -n"


License
=======

SolarWindPy is licensed under a standard 3-clause BSD license. See
`LICENSE`_.

Acknowledging and Citing SolarWindPy
====================================

See `CITATION.rst`_ for instructions on citing SolarWindPy.

.. _LICENSE: ./LICENSE
.. _CITATION.rst: ./CITATION.rst

.. |Build Status| image:: https://github.com/blalterman/SolarWindPy/actions/workflows/ci-master.yml/badge.svg?branch=master
   :target: https://github.com/blalterman/SolarWindPy/actions/workflows/ci-master.yml
.. |Docs Status| image:: https://readthedocs.org/projects/solarwindpy/badge/?version=latest
   :target: https://solarwindpy.readthedocs.io/en/latest/?badge=latest
.. |License| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
   :target: ./LICENSE
.. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :target: https://github.com/astral-sh/ruff
.. |Zenodo| image:: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.17042839-blue.svg
   :target: https://doi.org/10.5281/zenodo.17042839
.. |PyPI| image:: https://img.shields.io/pypi/v/solarwindpy.svg
   :target: https://pypi.org/project/solarwindpy/
.. |Python| image:: https://img.shields.io/pypi/pyversions/solarwindpy.svg
   :target: https://pypi.org/project/solarwindpy/
.. |Conda| image:: https://img.shields.io/conda/vn/conda-forge/solarwindpy.svg
   :target: https://anaconda.org/conda-forge/solarwindpy
