Giter Site home page Giter Site logo

pytroll / mpop Goto Github PK

View Code? Open in Web Editor NEW
39.0 12.0 33.0 8.12 MB

Meteorological Post Processing Package. This package is deprecated, please use satpy instead.

Home Page: http://mpop.readthedocs.org

License: GNU General Public License v3.0

Python 100.00%

mpop's Introduction

This is the Meteorological Post-Processing Package (MPoP).

A recent build of the documentation is available at http://mpop.readthedocs.org/.

mpop's People

Contributors

adybbroe avatar ch-k avatar loerum avatar mraspaud avatar oananicola avatar pnuu avatar praerien avatar spareeth avatar tparker-usgs avatar uhamann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpop's Issues

Remove unreferenced blobs/clean up repository

Currently the size of unpacked repository is about 28Mb. A big contributor to the size is the etc/world_map.ascii file, which is removed long time ago. By removing the blobs related to it the size of the (unpacked) repository drops to 8Mb.

Unfortunately removing the blob and all references using git filter-branch:

git filter-branch --index-filter 'git rm --cached --ignore-unmatch etc/world_map.ascii' HEAD

rewrites history and changes commit SHAs, therefore it might be necessary for the developers to start with a clean clone in order to avoid conflicts and pushing dirty history back.

Consider doing cleaning exercise before releasing mpop v2.0.

AttributeError: 'module' object has no attribute 'load'

This is my problem (during compiling example from readthedocs):
Traceback (most recent call last):
File "test.py", line 9, in
global_data.load([0.6, 0.8, 10.8], area_extent=europe.area_extent)
File "/usr/local/lib/python2.7/dist-packages/mpop-v0.13.0-py2.7.egg/mpop/scene.py", line 471, in load
reader_instance = self._set_reader(reader_name)
File "/usr/local/lib/python2.7/dist-packages/mpop-v0.13.0-py2.7.egg/mpop/scene.py", line 358, in _set_reader
loader = getattr(loader, "load")
AttributeError: 'module' object has no attribute 'load'
Smth wrong with the library?

Test failure with Pillow 3.4.2

Test failure with Pillow 3.4.2

  ======================================================================
  ERROR: test_pil_image (mpop.tests.test_image.TestEmptyImage)
  Return an empty PIL image.
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/lamby/temp/cdt.20161103212915.XxOo8TNjqe.db.python-mpop/python-mpop-1.3.0/mpop/tests/test_image.py", line 184, in test_pil_image
      pilimg = self.img.pil_image()
    File "/home/lamby/temp/cdt.20161103212915.XxOo8TNjqe.db.python-mpop/python-mpop-1.3.0/mpop/imageo/image.py", line 408, in pil_image
      return Pil.new(self.mode, (0, 0))
    File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2021, in new
      _check_size(size)
    File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2001, in _check_size
      raise ValueError("Width and Height must be > 0")
  ValueError: Width and Height must be > 0
  
  ----------------------------------------------------------------------
  Ran 63 tests in 0.306s
  
  FAILED (errors=1, skipped=1)

See also

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843079

and

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843107

getting the version number

print mpop.version
AttributeError: 'module' object has no attribute 'version'

mpop doesn't give the version. Would be nice to have!

New reader for FCI

The test data is available here:

ftp://ftp.eumetsat.int/pub/OPS/out/test-data/FCI_L1C_Format_Familiarisation/

Test failures on mpop 1.2.1

I'm preparing the new debian package for mpop 1.2.1 and I have the following errors when I run the test suite on debian sid:

======================================================================
FAIL: test_project (tests.test_pp_core.TestPPCore)
Test project
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antonio/debian/git/build-area/python-mpop-1.2.1/mpop/tests/test_pp_core.py", line 99, in test_project
    self.assertEquals(new_scene.area_id, area2)
AssertionError: None != 'oGuyfXoY'

======================================================================
FAIL: test_init (tests.test_projector.TestProjector)
Creation of coverage.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/antonio/debian/git/build-area/python-mpop-1.2.1/mpop/tests/test_projector.py", line 76, in test_init
    self.assertEquals(utils.parse_area_file.call_count, 2)
AssertionError: 0 != 2

======================================================================
FAIL: test_project_array (tests.test_projector.TestProjector)
Test the project_array function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/antonio/debian/git/build-area/python-mpop-1.2.1/mpop/tests/test_projector.py", line 171, in test_project_array
    data, "a", fill_value=None)
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 937, in assert_called_with
    six.raise_from(AssertionError(_error_message(cause)), cause)
  File "/usr/lib/python2.7/dist-packages/six.py", line 718, in raise_from
    raise value
AssertionError: Expected call: ImageContainer(array([[-1.50200251],
       [-0.6686467 ],
       [ 1.18901589]]), 'a', fill_value=None)
Actual call: ImageContainer(array([[-1.50200251],
       [-0.6686467 ],
       [ 1.18901589]]), <MagicMock name='mock.utils.parse_area_file().__getitem__()' id='139760093893840'>, fill_value=None)

Also I have an additional error due fact that the trollsift module is missing.
Please note that trollsift is not listed in the package dependencies in setup.py.

Add proj for raw geostationary data when writing to geotiff

from datetime import datetime, timedelta


geosSettings = {
                "met10": {'sat':"meteosat", 'num':"10", 'instr':"seviri", 'ir':'IR_108', 'freq': 15 }
}
sat = "met10"
fOut = "tst.tif"

cycles = 1
dateNow = datetime.now()
t = dateNow - timedelta(minutes=dateNow.minute % 15, seconds=dateNow.second, microseconds=dateNow.microsecond) - timedelta(15*cycles/(24.*60.))

geosSettings[sat]['meta'] = GeostationaryFactory.create_scene(geosSettings[sat]['sat'], 
                                             geosSettings[sat]['num'], 
                                             geosSettings[sat]['instr'], time_slot=t)

geosSettings[sat]['meta'].load([geosSettings[sat]['ir']])
img = geosSettings[sat]['meta'].image.ir108()
img.save(fOut)

Results in no proj information is written to tst.tif. The proj (and proj4 string) is present in meteosat10.cfg, but unless the scene is projected first (with foo.project("projection") ), this information is omitted. On my wishlist to include the raw geos projection string when writing to geotiff even if project has not been called.

Best wishes
Torleif

Wrong NaN check in satin/helper_functions.py

Hi Martin,
I've experienced some trouble when reading HRIT in conjunction with trollduction and area definitions of different extent.. I think in helper_functions.py the NaN-check in function boundaries_to_extent should be fixed.

for i in range(4):
    if extent[i] is np.nan:
        extent[i] = default_extent[i]

should be replaced with

for i in range(4):
    if np.isnan(extent[i]):
        extent[i] = default_extent[i]

Best regards,
Christian

test_boundaries_to_extent fails with PROJ 5.0.0

As reported in Debian Bug #892462, test_boundaries_to_extent fails since the update of PROJ to version 5.0.0:

======================================================================
FAIL: test_boundaries_to_extent (mpop.tests.test_satin_helpers.TestSatinHelpers)
Test conversion of area boundaries to area extent.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mpop/tests/test_satin_helpers.py", line 194, in test_boundaries_to_extent
    correct_values_afgh[i], 2)
AssertionError: 0.0 != 3053894.9120028536 within 2 places

CC: @avalentino

syntax error in sarx.py

syntax error in mpop/instruments/sarx.py

Mask and bracket are missing in line 61:

    data = np.ma.numpy(data, mask=

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.