fixed whitespaces. added some doc
#!/usr/bin/python
# -*- coding: UTF-8 -*-
-
"""
Definition of pyrsa's colors
@author: iancharest
@@ -19,9 +18,11 @@ def color_scale(n_cols, anchor_cols=None, monitor=None):
if monitor is set
Args:
- n_cols ([type]): [description]
- anchor_cols ([type], optional): [description]. Defaults to None.
- monitor ([type], optional): [description]. Defaults to None.
+ n_cols ([type]): number of colors for the colormap
+ anchor_cols ([type], optional): what color space to
+ interpolate. Defaults to None.
+ monitor (boolean, optional): quick visualisation of the
+ resulting colormap. Defaults to None.
Returns:
[array]: n_cols x 3 RGB array.
@@ -61,7 +62,8 @@ def rdm_colormap(n_cols=256, monitor=None):
intermediate values.
Args:
- n_cols (int, optional): precision of the colormap. Defaults to 256.
+ n_cols (int, optional): precision of the colormap.
+ Defaults to 256.
Returns:
[matplotlib ListedColormap]: this matplotlib color object can be
@@ -89,7 +91,8 @@ def rdm_colormap(n_cols=256, monitor=None):
])
# skimage rgb2hsv is intended for 3d images (RGB)
- # here we add a new axis to our 2d anchorCols to satisfy skimage, and then squeeze
+ # here we add a new axis to our 2d anchorCols to satisfy
+ # skimage, and then squeeze
anchor_cols_hsv = rgb2hsv(anchor_cols[np.newaxis, :]).squeeze()
inc_v_weight = 1
