Skip to content

Commit

Permalink
Switch to lgplv3, and bump up version number.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
  • Loading branch information
mraspaud committed Feb 3, 2015
1 parent 0cca3c1 commit 4526e84
Show file tree
Hide file tree
Showing 16 changed files with 604 additions and 1,066 deletions.
829 changes: 160 additions & 669 deletions LICENSE.txt

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions README.md
Expand Up @@ -9,18 +9,21 @@ Pyresample is designed for resampling of remote sensing data and supports resamp
Several types of resampling are supported including nearest neighbour, gaussian weighting and weighting with a user defined radial function.
Pyresample works with Numpy arrays including support for masked arrays.
Support for parallel resampling using multiple processor cores.
Plotting capablity using Basemap. As of v0.8.0 [https://github.com/storpipfugl/pykdtree pykdtree] can be used to speed up processing.
Plotting capablity using Basemap. As of v0.8.0 [pykdtree](https://github.com/storpipfugl/pykdtree) can be used to speed up processing.

Pyresample is tested with Python 2.5, 2.6 and 2.7.
Pyresample is tested with Python 2.6, 2.7, 3.2, 3.3, and 3.4.

Note: For numpy >= 1.6.2 use pyresample >= 0.7.13

[https://pyresample.readthedocs.org/en/latest/ Documentation]
[http://code.google.com/p/pyresample/downloads/detail?name=pyresample-1.1.0.tar.gz Latest download]
Look at http://code.google.com/p/pyresample/ and http://pytroll.org/ for more information.
[Documentation](https://pyresample.readthedocs.org/en/latest/)
Look at [pytroll.org](http://pytroll.org/) for more information.


===News===
* *2015-02-03*: Pyresample-1.1.3 released. Switch to LGPLv3.

* *2014-12-17*: Pyresample-1.1.2 released. Fix to allow tests to run on travis.

* *2014-12-10*: Pyresample-1.1.1 released. Wrapping of longitudes and latitudes is now implemented.

* *2013-10-23*: Pyresample-1.1.0 released. Added option for calculating uncertainties for weighted kd-tree resampling. From now on pyresample will adhere to [http://semver.org/ semantic versioning].
Expand Down
16 changes: 8 additions & 8 deletions pyresample/__init__.py
@@ -1,19 +1,19 @@
# pyresample, Resampling of remote sensing image data in python
#
# Copyright (C) 2010, 2014 Esben S. Nielsen
# Copyright (C) 2010, 2014, 2015 Esben S. Nielsen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import

Expand Down
37 changes: 19 additions & 18 deletions pyresample/_multi_proc.py
@@ -1,19 +1,19 @@
#pyresample, Resampling of remote sensing image data in python
#
#Copyright (C) 2010 Esben S. Nielsen
# pyresample, Resampling of remote sensing image data in python
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
# Copyright (C) 2010, 2015 Esben S. Nielsen
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
#You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import

Expand All @@ -24,17 +24,17 @@


class Scheduler(object):

def __init__(self, ndata, nprocs, chunk=None, schedule='guided'):
if not schedule in ['guided','dynamic', 'static']:
if not schedule in ['guided', 'dynamic', 'static']:
raise ValueError('unknown scheduling strategy')
self._ndata = mp.RawValue(ctypes.c_int, ndata)
self._start = mp.RawValue(ctypes.c_int, 0)
self._lock = mp.Lock()
self._schedule = schedule
self._nprocs = nprocs
if schedule == 'guided' or schedule == 'dynamic':
min_chunk = ndata // (10*nprocs)
min_chunk = ndata // (10 * nprocs)
if chunk:
min_chunk = chunk
min_chunk = max(min_chunk, 1)
Expand All @@ -45,7 +45,7 @@ def __init__(self, ndata, nprocs, chunk=None, schedule='guided'):
min_chunk = max(chunk, min_chunk)
min_chunk = max(min_chunk, 1)
self._chunk = min_chunk

def __iter__(self):
while True:
self._lock.acquire()
Expand Down Expand Up @@ -73,6 +73,7 @@ def __iter__(self):
self._lock.release()
raise StopIteration


def shmem_as_ndarray(raw_array):
_ctypes_to_numpy = {
ctypes.c_char: np.int8,
Expand All @@ -95,4 +96,4 @@ def shmem_as_ndarray(raw_array):
# and appears to be slower.
# return np.ctypeslib.as_array(raw_array)

return np.frombuffer(raw_array, dtype=dtype)
return np.frombuffer(raw_array, dtype=dtype)

0 comments on commit 4526e84

Please sign in to comment.