Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Apr 29, 2024
1 parent f9b2292 commit df7632f
Showing 1 changed file with 29 additions and 72 deletions.
101 changes: 29 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,67 @@
---
title: SParse Optimization Research COde (SPORCO)
---

[![Supported Python Versions](https://img.shields.io/pypi/pyversions/sporco.svg)](https://github.com/bwohlberg/sporco)
[![Package License](https://img.shields.io/github/license/bwohlberg/sporco.svg)](https://github.com/bwohlberg/sporco/blob/master/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg)](https://dx.doi.org/10.25080/shinma-7f4c6e7-001)\
[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest)\
[![Test status](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml/badge.svg)](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml)
[![Test Coverage](https://codecov.io/gh/bwohlberg/sporco/branch/master/graph/badge.svg)](https://codecov.io/gh/bwohlberg/sporco)\
[![PyPi Release](https://badge.fury.io/py/sporco.svg)](https://badge.fury.io/py/sporco)
[![PyPi Downloads](https://static.pepy.tech/personalized-badge/sporco?period=total&left_color=grey&right_color=brightgreen&left_text=downloads)](https://pepy.tech/project/sporco)
[![Conda Forge Release](https://img.shields.io/conda/vn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco)
[![Conda Forge Downloads](https://img.shields.io/conda/dn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco)\
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb)
[![DOI](https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg)](https://dx.doi.org/10.25080/shinma-7f4c6e7-001)


|
# SParse Optimization Research COde (SPORCO)

SPORCO is a Python package for solving optimisation problems with
sparsity-inducing regularisation. These consist primarily of sparse
coding and dictionary learning problems, including convolutional sparse
coding and dictionary learning, but there is also support for other
problems such as Total Variation regularisation and Robust PCA. The
optimisation algorithms in the current version are based on the
Alternating Direction Method of Multipliers (ADMM) or on the Proximal
Gradient Method (PGM).
SPORCO is a Python package for solving optimisation problems with sparsity-inducing regularisation. These consist primarily of sparse coding and dictionary learning problems, including convolutional sparse coding and dictionary learning, but there is also support for other problems such as Total Variation regularisation and Robust PCA. The optimisation algorithms in the current version are based on the Alternating Direction Method of Multipliers (ADMM) or on the Proximal Gradient Method (PGM).

If you use this software for published work, please [cite it](http://sporco.readthedocs.io/en/latest/overview.html#citing).

If you use this software for published work, please [cite
it](http://sporco.readthedocs.io/en/latest/overview.html#citing).

# Documentation

[Documentation](http://sporco.rtfd.io/) is available online, or can be
built from the root directory of the source distribution by the command
[Documentation](http://sporco.rtfd.io/) is available online, or can be built from the root directory of the source distribution by the command

python setup.py build_sphinx

in which case the HTML documentation can be found in the
`build/sphinx/html` directory (the top-level document is `index.html`).
Although the SPORCO package itself is compatible with Python 3.x,
building the documention requires Python 3.3 or later due to the use of
[Jonga](https://github.com/bwohlberg/jonga) to construct call graph
images for the SPORCO optimisation class hierarchies.
in which case the HTML documentation can be found in the `build/sphinx/html` directory (the top-level document is `index.html`). Although the SPORCO package itself is compatible with Python 3.x, building the documention requires Python 3.3 or later due to the use of [Jonga](https://github.com/bwohlberg/jonga) to construct call graph images for the SPORCO optimisation class hierarchies.

An overview of the package design and functionality is also available in

> Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse
> representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html),
> in Proceedings of the 15th Python in Science Conference, (Austin, TX,
> USA), <doi:%6010.25080/shinma-7f4c6e7-001>
> \<<http://dx.doi.org/10.25080/shinma-7f4c6e7-001>\>\`\_, pp. 1\--8,
> Jul 2017
> Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html),
> in Proceedings of the 15th Python in Science Conference, (Austin, TX, USA), <doi:%6010.25080/shinma-7f4c6e7-001>
> \<<http://dx.doi.org/10.25080/shinma-7f4c6e7-001>\>, pp. 1--8, Jul 2017

# Usage

Scripts illustrating usage of the package can be found in the `examples`
directory of the source distribution. These examples can be run from the
root directory of the package by, for example
Scripts illustrating usage of the package can be found in the `examples` directory of the source distribution. These examples can be run from the root directory of the package by, for example

python examples/scripts/sc/bpdn.py

To run these scripts prior to installing the package it will be
necessary to first set the `PYTHONPATH` environment variable to include
the root directory of the package. For example, in a `bash` shell
To run these scripts prior to installing the package it will be necessary to first set the `PYTHONPATH` environment variable to include the root directory of the package. For example, in a `bash` shell

export PYTHONPATH=$PYTHONPATH:`pwd`

from the root directory of the package.

[Jupyter Notebook](http://jupyter.org/) examples are also
[available](https://github.com/bwohlberg/sporco-notebooks). These
examples can be viewed online via
[nbviewer](https://nbviewer.jupyter.org/github/bwohlberg/sporco-notebooks/blob/master/index.ipynb),
or run interactively at
[binder](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb).
[Jupyter Notebook](http://jupyter.org/) examples are also [available](https://github.com/bwohlberg/sporco-notebooks). These examples can be viewed online via [nbviewer](https://nbviewer.jupyter.org/github/bwohlberg/sporco-notebooks/blob/master/index.ipynb), or run interactively at [binder](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb).


# Requirements

The primary requirements are Python itself, and modules
[future](http://python-future.org), [numpy](http://www.numpy.org),
[scipy](https://www.scipy.org), [imageio](https://imageio.github.io/),
[pyfftw](https://hgomersall.github.io/pyFFTW), and
[matplotlib](http://matplotlib.org). Module
[numexpr](https://github.com/pydata/numexpr) is not required, but some
functions will be faster if it is installed. If module
[mpldatacursor](https://github.com/joferkington/mpldatacursor) is
installed, functions `plot.plot`, `plot.contour`, and `plot.imview` will
support the data cursor that it provides.

Instructions for installing these requirements are provided in the
[Requirements](http://sporco.rtfd.io/en/latest/install.html#requirements)
section of the package documentation.
The primary requirements are Python itself, and modules [future](http://python-future.org), [numpy](http://www.numpy.org), [scipy](https://www.scipy.org), [imageio](https://imageio.github.io/), [pyfftw](https://hgomersall.github.io/pyFFTW), and [matplotlib](http://matplotlib.org). Module [numexpr](https://github.com/pydata/numexpr) is not required, but some functions will be faster if it is installed. If module [mpldatacursor](https://github.com/joferkington/mpldatacursor) is installed, functions `plot.plot`, `plot.contour`, and `plot.imview` will support the data cursor that it provides.

Instructions for installing these requirements are provided in the [Requirements](http://sporco.rtfd.io/en/latest/install.html#requirements) section of the package documentation.


# Installation

To install the most recent release of SPORCO from
[PyPI](https://pypi.python.org/pypi/sporco/) do
To install the most recent release of SPORCO from [PyPI](https://pypi.python.org/pypi/sporco/) do

pip install sporco

The [development version](https://github.com/bwohlberg/sporco) on GitHub
can be installed by doing
The [development version](https://github.com/bwohlberg/sporco) on GitHub can be installed by doing

pip install git+https://github.com/bwohlberg/sporco

Expand All @@ -113,22 +75,18 @@ followed by
python setup.py build
python setup.py install

The install commands will usually have to be performed with root
privileges.
The install commands will usually have to be performed with root privileges.

SPORCO can also be installed as a [conda](https://conda.io/docs/)
package from the [conda-forge](https://conda-forge.org/) channel
SPORCO can also be installed as a [conda](https://conda.io/docs/) package from the [conda-forge](https://conda-forge.org/) channel

conda install -c conda-forge sporco

A summary of the most significant changes between SPORCO releases can be
found in the `CHANGES.rst` file. It is strongly recommended to consult
this summary when updating from a previous version.
A summary of the most significant changes between SPORCO releases can be found in the `CHANGES.rst` file. It is strongly recommended to consult this summary when updating from a previous version.


# Extensions

Some additional components of SPORCO are made available in separate
repositories:
Some additional components of SPORCO are made available in separate repositories:

- [SPORCO-CUDA](https://github.com/bwohlberg/sporco-cuda):
GPU-accelerated versions of selected convolutional sparse coding
Expand All @@ -141,5 +99,4 @@ repositories:

# License

SPORCO is distributed as open-source software under a BSD 3-Clause
License (see the `LICENSE` file for details).
SPORCO is distributed as open-source software under a BSD 3-Clause License (see the `LICENSE` file for details).

0 comments on commit df7632f

Please sign in to comment.