GithubHelp home page GithubHelp logo

nansencenter / nansat-lectures Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 9.0 48.33 MB

Tutorial material on the Nansat and Nansen-Cloud systems

License: GNU General Public License v3.0

Python 0.01% Jupyter Notebook 99.99% Dockerfile 0.01%

nansat-lectures's People

Contributors

akorosov avatar azamifard avatar mortenwh avatar

Stargazers

 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  avatar  avatar  avatar  avatar

nansat-lectures's Issues

Issue while creating new vagrant VM using windows 7 64

Hi,
I tried to create a new VM using vagrant "course", on a windows 7-64 machine. I got the following error message while provisioning (testing phase):
Best Regards,
Philippe

TASK [nansat : nansat | Nosetests] *********************************************

task path: /vagrant/provisioning/roles/nansat/tasks/nansat.yml:32
<192.168.33.11> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
<192.168.33.11> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo $HOME/.ansible/t mp/ansible-tmp-1473889556.72-17548293941933" && echo ansible-tmp-1473889556.72
-17548293941933="echo $HOME/.ansible/tmp/ansible-tmp-1473889556.72-17548293941 933" ) && sleep 0'
<192.168.33.11> PUT /tmp/tmpbX1s59 TO /home/vagrant/.ansible/tmp/ansible-tmp-147
3889556.72-17548293941933/command
<192.168.33.11> EXEC /bin/sh -c 'LANG=en_US.UTF-8 GDAL_DATA=/home/vagrant/minico
nda/share/gdal LC_MESSAGES=en_US.UTF-8 PATH=/home/vagrant/miniconda/bin:/usr/sbi
n:/usr/bin:/sbin:/bin LC_ALL=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/
tmp/ansible-tmp-1473889556.72-17548293941933/command; rm -rf "/home/vagrant/.ans
ible/tmp/ansible-tmp-1473889556.72-17548293941933/" > /dev/null 2>&1 && sleep 0'

fatal: [192.168.33.11]: FAILED! => {"changed": true, "cmd": "nosetests nansat",
"delta": "0:00:02.362462", "end": "2016-09-14 21:45:59.200374", "failed": true,
"invocation": {"module_args": {"_raw_params": "nosetests nansat", "_uses_shell":
true, "chdir": null, "creates": null, "executable": null, "removes": null, "war
n": true}, "module_name": "command"}, "rc": 1, "start": "2016-09-14 21:45:56.837
912", "stderr": "E\n============================================================
==========\nERROR: Failure: ImportError (/home/vagrant/miniconda/lib/python2.7/s
ite-packages/PyQt4/QtGui.so: undefined symbol: _ZN15QSessionManager16staticMetaO
bjectE)\n----------------------------------------------------------------------
nTraceback (most recent call last):\n File "/home/vagrant/miniconda/lib/python
2.7/site-packages/nose/loader.py", line 407, in loadTestsFromName\n module =
resolve_name(addr.module)\n File "/home/vagrant/miniconda/lib/python2.7/site-
packages/nose/util.py", line 312, in resolve_name\n module = import('.'.
join(parts_copy))\n File "/home/vagrant/miniconda/lib/python2.7/site-packages/
nansat/init.py", line 24, in \n import matplotlib.pyplot as plt
n File "/home/vagrant/miniconda/lib/python2.7/site-packages/matplotlib/pyplot.
py", line 114, in \n _backend_mod, new_figure_manager, draw_if_inter
active, _show = pylab_setup()\n File "/home/vagrant/miniconda/lib/python2.7/si
te-packages/matplotlib/backends/init.py", line 32, in pylab_setup\n glob
als(),locals(),[backend_name],0)\n File "/home/vagrant/miniconda/lib/python2.7
/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in \n
from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase\n
File "/home/vagrant/miniconda/lib/python2.7/site-packages/matplotlib/backends/
backend_qt5agg.py", line 16, in \n from .backend_qt5 import QtCore\n
File "/home/vagrant/miniconda/lib/python2.7/site-packages/matplotlib/backends
/backend_qt5.py", line 31, in \n from .qt_compat import QtCore, QtGu
i, QtWidgets, _getSaveFileName, version\n File "/home/vagrant/miniconda/li
b/python2.7/site-packages/matplotlib/backends/qt_compat.py", line 137, in \n from PyQt4 import QtCore, QtGui\nImportError: /home/vagrant/miniconda/l
ib/python2.7/site-packages/PyQt4/QtGui.so: undefined symbol: _ZN15QSessionManage
r16staticMetaObjectE\n\n--------------------------------------------------------
--------------\nRan 1 test in 0.004s\n\nFAILED (errors=1)", "stdout": "", "stdou
t_lines": [], "warnings": []}

NO MORE HOSTS LEFT *************************************************************

    to retry, use: --limit @provisioning/site.retry

PLAY RECAP *********************************************************************

192.168.33.11 : ok=27 changed=7 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Suggestion: Make objects immutable

In notebook 10, after the call

n.reproject(d, 2)

n is no longer the datasource, it is a reprojection of same. I'd suggest that this method call not modify n, but instead return a new object representing the result of the reprojection operation. This is especially valuable given that the reprojection is not performed until necessary.

Two advantages:

  1. it is possible to reason about n without tracing all possible mutations
  2. you can express multiple processors starting at n without worrying that one will mutate n and make it unusable for the other

One trivial example: Produce an overlay image with a (grayscale) background and a lower-resolution overlay with coloring based on higher-order product and alpha based on confidence of product

d = Nansen(...) # datasource
g = grid_definition(..., '10 m')
d_g = d.reproject(g, ...) # reprojected data source
d_bg = np.log10(d_g.data) # or whatever -- an intensity image at full resolution
d_res = nansat.resample(d_g, '50 m') # downsampled
dr_hop = mylib.higher_order_product(d_res)

nansat.write_alphablend_figure(d_bg, dr_hop.rgb, alpha=dr_hop.confidence)

Nansat lectrues installation

I tried to install the lectures and I encountered this problem after this line

vagrant up course

Bringing machine 'course' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

ansible local provisioner:

  • The following settings shouldn't exist: install_mode

JavaScript not enabled?

Entering the running virtual machine ("vagrant ssh") followed by
the command "ipython notebook" yields an error response
that JavaScript must be enabled first...

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.