Metadata-Version: 2.4
Name: solarwindpy
Version: 0.3.0
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
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.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: <4,>=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy<3.0,>=1.26
Requires-Dist: scipy>=1.13
Requires-Dist: pandas>=2.0
Requires-Dist: numexpr>=2.8
Requires-Dist: bottleneck>=1.3
Requires-Dist: h5py>=3.8
Requires-Dist: pyyaml>=6.0
Requires-Dist: matplotlib>=3.5
Requires-Dist: astropy>=5.0
Requires-Dist: numba>=0.59
Requires-Dist: tabulate>=0.9
Requires-Dist: docstring-inheritance<3.0,>=2.2.0
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: pytest-cov>=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: numpydoc>=1.6; extra == "docs"
Requires-Dist: docstring-inheritance<3.0,>=2.2.0; extra == "docs"
Requires-Dist: doc8>=1.1; extra == "docs"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=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: numpydoc>=1.6; extra == "dev"
Requires-Dist: docstring-inheritance<3.0,>=2.2.0; extra == "dev"
Requires-Dist: doc8>=1.1; extra == "dev"
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: flake8>=7.0; extra == "dev"
Requires-Dist: flake8-docstrings>=1.7; extra == "dev"
Requires-Dist: pydocstyle>=6.3; extra == "dev"
Requires-Dist: tables>=3.9; extra == "dev"
Requires-Dist: psutil>=5.9.0; extra == "dev"
Dynamic: license-file

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

|Build Status| |Docs Status| |Black Code|

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

.. code-block:: python

   import solarwindpy as swp
   import pandas as pd

   # 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],
       [6.5, 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 = swp.Plasma(data, 'p1', 'a')

   # Access ion species
   print(plasma.species)  # ['p1', 'a']
   print(f"Proton density: {plasma.p1.n.mean():.1f} cm⁻³")

See the documentation for detailed usage examples and API reference.

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

SolarWindPy requires Python 3.11 or later.

SolarWindPy is available via PyPI and conda-forge:

User
----

Install from PyPI:

.. code-block:: bash

   pip install solarwindpy  # Requires Python 3.11+

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 -r requirements-dev.lock  # Includes all dev tools
      pip install -e .

   **Alternative (Conda environment)**:

   .. code-block:: bash

      conda env create -f solarwindpy.yml  # Python 3.11+
      conda activate solarwindpy
      pip install -r requirements-dev.lock
      pip install -e .

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

   .. code-block:: bash

      pytest -q

**Note**: As of v0.3.0, dependency management uses ``pip-tools`` lockfiles. See `docs/MIGRATION-DEPENDENCY-OVERHAUL.md <docs/MIGRATION-DEPENDENCY-OVERHAUL.md>`_ for migration details

4. Regenerate the Conda recipe if the version or dependencies change:

   .. code-block:: bash

      python scripts/update_conda_recipe.py

5. Optionally install the pre-commit hooks:

   .. code-block:: bash

      pre-commit install

   This will run ``black`` and ``flake8`` automatically when committing.

6. Build the documentation and fail on warnings:

   .. code-block:: bash

      cd docs
      make html SPHINXOPTS=-W


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
.. |Black Code| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
.. |Zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.17042839.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
