Commit 13a069bc authored by Gregory Ashton's avatar Gregory Ashton

Rename to gridcorner

parent 401a0268
......@@ -12,7 +12,7 @@ Generating some fake data and plotting:
```python
import numpy as np
import projection_matrix.projection_matrix as pmp
import gridcorner
# Generate example data
x = np.linspace(0, 1, 50)
......@@ -27,8 +27,8 @@ D = (np.exp(-(X-x0)**2/sigmax**2)
+ np.exp(-(Y-y0)**2/sigmay**2)
+ np.exp(-(Z-z0)**2/sigmaz**2))
fig, axes = pmp(
D, xyz=[x, y, z], labels=['x', 'y', 'z', 'D'], projection=np.max)
fig, axes = gridcorner.gridcorner(
D, xyz=[x, y, z], labels=['x', 'y', 'z', 'D'], projection='log_mean')
fig.savefig('example')
```
![Example plot](example.png)
......
example.png

70.7 KB | W: | H:

example.png

66.8 KB | W: | H:

example.png
example.png
example.png
example.png
  • 2-up
  • Swipe
  • Onion skin
import numpy as np
import projection_matrix as pmp
import gridcorner
# Generate example data
x = np.linspace(0, 1, 50)
......@@ -15,10 +15,7 @@ D = (np.exp(-(X-x0)**2/sigmax**2)
+ np.exp(-(Y-y0)**2/sigmay**2)
+ np.exp(-(Z-z0)**2/sigmaz**2))
fig, axes = pmp.projection_matrix(
D, xyz=[x, y, z], labels=['x', 'y', 'z', 'D'],
projection=pmp.slice_max,
#projection=np.max
)
fig, axes = gridcorner.gridcorner(
D, xyz=[x, y, z], labels=['x', 'y', 'z', 'D'], projection='log_mean')
fig.savefig('example')
......@@ -47,9 +47,9 @@ def idx_array_slice(D, axis, slice_idx):
return res
def projection_matrix(D, xyz, labels=None, projection='max_slice',
max_n_ticks=4, factor=3, whspace=0.05, **kwargs):
""" Generate a projection matrix plot
def gridcorner(D, xyz, labels=None, projection='max_slice', max_n_ticks=4,
factor=3, whspace=0.05, **kwargs):
""" Generate a grid corner plot
Parameters
----------
......@@ -66,7 +66,7 @@ def projection_matrix(D, xyz, labels=None, projection='max_slice',
If a string, one of `{"log_mean", "max_slice"} to use inbuilt functions
to calculate either the logged mean or maximum slice projection. Else
a function to use for projection, must take an `axis` argument. Default
is `projection_matrix.max_slice()`, to project out a slice along the
is `gridcorner.max_slice()`, to project out a slice along the
maximum.
max_n_ticks: int
Number of ticks for x and y axis of the `pcolormesh` plots
......
from .projection_matrix import projection_matrix
......@@ -2,9 +2,9 @@
from distutils.core import setup
setup(name='projection_matrix',
setup(name='gridcorner',
version='0.1',
author='Gregory Ashton',
author_email='gregory.ashton@ligo.org',
packages=['projection_matrix'],
py_modules=['gridcorner'],
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment