Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
barriern committed Oct 16, 2020
2 parents 71953d4 + fd4203b commit 424ae6f
Show file tree
Hide file tree
Showing 11 changed files with 742 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
**/build
**/send_to_ftp.sh
*.pyc
docs/build
send_to_ftp.sh
**/.*.swp
build
dist
envtoolkit.egg-info
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
Environmental toolkit that contains modules for:
![License](https://img.shields.io/github/license/barriern/Environmental-toolkit)
[![DOI](https://zenodo.org/badge/154453680.svg)](https://zenodo.org/badge/latestdoi/154453680)
[![PyPI](https://img.shields.io/pypi/v/envtoolkit)](https://pypi.org/project/envtoolkit/)
[![Latest Release](https://img.shields.io/github/release/barriern/Environmental-toolkit)](https://github.com/barriern/Environmental-toolkit/issues)
[![GitHub Issues](https://img.shields.io/github/issues/barriern/Environmental-toolkit)](https://github.com/barriern/Environmental-toolkit/releases)


# Environmental toolkit

## Description

Contains some code to analyse and represent environmental datasets

- Generating masked lambert projections
- Working with fancy colormaps from hEnvironmental toolkit that contains modules for:
- Generating masked lambert projections
- Working with fancy colormaps from [cpt-city](http://soliton.vm.bytemark.co.uk/pub/cpt-city/)
- Spectral analysis using multitaper
- Computation of monthly/daily climatologies

## Documentation

Full documentation is available in http://envtoolkit.nicolasbarrier.fr/
Binary file removed envtoolkit/__init__.pyc
Binary file not shown.
24 changes: 19 additions & 5 deletions envtoolkit/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def generate_cbticks(self, cbar):
"""

if self.smooth:
print "Warning: This function cannot be used with smoothed colormap."
print "Nothing has been changed"
print ("Warning: This function cannot be used with smoothed colormap.")
print ("Nothing has been changed")
return

cmin, cmax = cbar.get_clim()
Expand Down Expand Up @@ -451,7 +451,8 @@ def subspan_default_cmap(cmapname, nbcol):
"""

from matplotlib._cm import datad
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.colors import LinearSegmentedColormap, ListedColormap
import matplotlib.cm as cm

if not(isinstance(nbcol, int)):
raise IOError("The nbcol must be an integer")
Expand All @@ -466,6 +467,19 @@ def subspan_default_cmap(cmapname, nbcol):

# Matplotlib function that creates the colormap from
# the mapping directory
cmap = LinearSegmentedColormap('', dictout, N=nbcol)

#if(isinstance(dictout, dict)):
#cmap = LinearSegmentedColormap('', dictout, N=nbcol)
#else:
#base = cm.get_cmap(cmapname)
#outlist = np.linspace(0, 1, nbcol + 1)
#newcolors = base(outlist)
#print(newcolors)
#cmap = ListedColormap(newcolors, N=nbcol)
#return cmap

# https://gist.github.com/jakevdp/91077b0cae40f8f8244a
base = cm.get_cmap(cmapname)
outlist = np.linspace(0, 1, nbcol)
newcolors = base(outlist)
cmap = ListedColormap(newcolors, N=nbcol)
return cmap
Binary file removed envtoolkit/colors.pyc
Binary file not shown.
Binary file removed envtoolkit/map.pyc
Binary file not shown.
Binary file removed envtoolkit/nc.pyc
Binary file not shown.
Binary file removed envtoolkit/spectral.pyc
Binary file not shown.
Binary file removed envtoolkit/ts.pyc
Binary file not shown.
28 changes: 25 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
import os
from setuptools import setup, find_packages

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name="envtoolkit",
version="1.0.0",
version="1.0.1",
author="Nicolas Barrier",
author_email="[email protected]",
description=("Python package dedicated to the Earth Scientists. It contains a module for the processing of time-series (filtering, anomalies), a module for spatial analysis, a module with color-specific functions, a module for NetCDF processing and a module for spectral analysis"),
license=None,
long_description_content_type="text/markdown",
packages=find_packages(),
url="https://github.com/barriern/Environmental-toolkit",
requires=['numpy',
'netCDF4',
'matplotlib',
're',
'mpl_toolkits.basemap',
'datetime.datetime',
'spectrum'],
)

classifiers = [
#"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Unix",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
],

)


0 comments on commit 424ae6f

Please sign in to comment.