Skip to content

Commit fdc9411

Browse files
committed
updates readme and docs
1 parent 2154a22 commit fdc9411

File tree

3 files changed

+72
-14
lines changed

3 files changed

+72
-14
lines changed

README.md

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,33 @@ Briefly, the tools include:
1111
auto-scaling options, rounding to integer zoom factors to avoid
1212
resampling artifacts, and useful labeling (dimensions and gray-range).
1313

14+
This is a python 3 port of Eero Simoncelli's matlabPyrTools, but it
15+
does not attempt to recreate all of the matlab code from
16+
matlabPyrTools. The goal is to create a Python interface for the C
17+
code at the heart of matlabPyrTools.
18+
1419
# Installation
1520

1621
It's recommended you install from pip: `pip install pyrtools`. The pip
17-
install has been tested on Linux and on OSX. Windowsis NOT supported
22+
install has been tested on Linux and on OSX. Windows is NOT supported
1823
because of issues with the C compiler (`gcc` isn't necessarily
1924
installed); if you have experience with C compilation on Windows,
20-
please open a pull request.
21-
25+
please open a pull request. It's possible that the way to fix this is
26+
to use Cython, ensuring that Cython is installed before attempting to
27+
run the pip command, and then adding: `from Cython.Build import
28+
cythonize` and wrapping the `ext_modules` in the `setup` call with
29+
`cythonize`, but I'm not sure.
30+
31+
If you wish to install from the master branch, it's still recommended
32+
to use pip, just run `pip install .` (or `pip install -e .` if you
33+
want the changes you make in the directory to be reflected in your
34+
install) from the root directory of this project. The core of this
35+
code is the C code, and the pip install will compile it nicely.
2236

2337
## Dependencies
38+
39+
Python 3.5, 3.6, and 3.7 all officially supported.
40+
2441
Other requirements:
2542
- numpy
2643
- scipy
@@ -34,16 +51,24 @@ IPython is optional. If it's not installed,
3451
(but since this is for displaying the animated image in a Jupyter /
3552
IPython notebook, you probably won't need that functionality).
3653

54+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LabForComputationalVision/pyrtools/blob/master/LICENSE)
55+
56+
[![Python version](https://img.shields.io/badge/python-3.5%7C3.6%7C3.7-blue.svg)]
57+
58+
[![Build Status](https://travis-ci.com/LabForComputationalVision/pyrtools.svg?branch=master)](https://travis-ci.com/LabForComputationalVision/pyrtools)
59+
60+
[![Documentation Status](https://readthedocs.org/projects/pyrtools/badge/?version=latest)](https://pyrtools.readthedocs.io/en/latest/?badge=latest)
61+
62+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/master?filepath=TUTORIALS%2F)
63+
3764
# Authors
3865

3966
Rob Young and Eero Simoncelli, 7/13
4067

4168
William Broderick, 6/17
4269

43-
A python 3.6 port of Eero Simoncelli's matlabPyrTools. This port does
44-
not attempt to recreate all of the matlab code from matlabPyrTools.
45-
The goal is to create a Python interface for the C code at the heart
46-
of matlabPyrTools.
70+
William Broderick, Pierre-Étienne Fiquet, Zhuo Wang, Zahra Kadkhodaie,
71+
Nikhil Parthasarathy, and the Lab for Computational Vision, 4/19
4772

4873
# Usage:
4974

@@ -83,3 +108,24 @@ If you're using functions or parameters that do not have associated unit
83108
tests you should test this yourself to make sure the results are correct.
84109
You could then submit your test code, so that we can build more complete
85110
unit tests.
111+
112+
# Build the documentation
113+
114+
Documentation is built automatically on readthedocs, but can be built
115+
locally as well. The virtual environment required to do so is defined
116+
in `docs/environment.yml`, so to create that environment and build the
117+
docs, do the following from the project's root directory:
118+
119+
```
120+
# install sphinx and required packages to build documentation
121+
conda env create -f docs/environment.yml
122+
# install pyrtools
123+
pip install .
124+
# build documentation
125+
cd docs/
126+
make html
127+
```
128+
129+
The index page of the documentation will then be located at
130+
`docs/_build/html/index.html`, open it in your browser to navigate
131+
around.

docs/index.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
.. |license-shield| image:: https://img.shields.io/badge/license-MIT-blue.svg
1+
.. |license-shield| image:: https://img.shields.io/badge/license-MIT-yellow.svg
2+
:target: https://github.com/LabForComputationalVision/pyrtools/blob/master/LICENSE
23

34
.. |python-version-shield| image:: https://img.shields.io/badge/python-3.5%7C3.6%7C3.7-blue.svg
45

6+
.. |travis| image:: https://travis-ci.com/LabForComputationalVision/pyrtools.svg?branch=master
7+
:target: https://travis-ci.com/LabForComputationalVision/pyrtools
8+
9+
.. |binder| image:: https://mybinder.org/badge_logo.svg
10+
:target: https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/master?filepath=TUTORIALS%2F
11+
512
.. pyrtools documentation master file, created by
613
sphinx-quickstart on Mon Mar 25 17:57:12 2019.
714
You can adapt this file completely to your liking, but it should at least
@@ -10,7 +17,7 @@
1017
pyrtools
1118
====================================
1219

13-
|license-shield| |python-version-shield|
20+
|license-shield| |python-version-shield| |travis| |binder|
1421

1522
Pyrtools is a python package for multi-scale image processing, adapted
1623
from Eero Simoncelli's `matlabPyrTools

docs/quickstart.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ In the python interpreter, then call::
1111

1212
import pyrtools as pt
1313

14-
which should run without errors if the install worked correctly.
15-
16-
Method parameters mimic the matlab function parameters except that
17-
there's no need to pass `pyr` or `pind`.
14+
which should run without errors if the install worked correctly. If
15+
you have an issue with the installation, it will most likely be with
16+
the compilation of the C code. There is hopefully a warning of this
17+
when you import the library, but if you get an error message along the
18+
lines of `lib not defined` when attempting to build a pyramid or call
19+
the functions `corrDn`, `upConv`, or `pointOp`, this is probably
20+
what's at fault.
1821

1922
Create pyramid::
2023

@@ -26,4 +29,6 @@ Reconstruct image from pyramid::
2629

2730
For more details, see the jupyter notebooks included in the
2831
`TUTORIALS/` directory, static versions of which are linked in the
29-
navigation sidebar.
32+
navigation sidebar. You can play around with a live version of them in
33+
order to test out the code before downloading on `binder
34+
<https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/master?filepath=TUTORIALS%2F>`_

0 commit comments

Comments
 (0)