Git Product home page Git Product logo

gmtpy's People

Contributors

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

Watchers

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

gmtpy's Issues

failing for GMT5.1.1

Hi,
I can get to gmt=GMT() happily when using GMT version 4.5.5 , but it fails for GMT version 5.1.1 with the following :

Traceback (most recent call last):
File "test1.py", line 29, in
gmt = GMT()
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 2850, in init
self.installation = get_gmt_installation(version)
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 1161, in get_gmt_installation
setup_gmt_installations()
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 1045, in setup_gmt_installations
gmtversion, gmthome, gmtbin = check_detect_gmt_installation()
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 976, in check_detect_gmt_installation
return detect_gmt_installation()
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 963, in detect_gmt_installation
gmtversion = get_gmt_version(pjoin(gmtbin, 'gmtdefaults'), gmthome)
File "/sp/prj/tvz95/mypython2/lib/python2.7/site-packages/gmtpy.py", line 946, in get_gmt_version
gmtdefaultsbinary)
Exception: Can't extract version number from output of /opt/local/gmt/GMT5.1.1/bin/gmtdefaults

any suggestions ?

Perhaps the top of "gmtdefaults" under GMT 5.1.1 is different to previous earlier GMT v4 ??

A command-line ">gmtdefaults" (using v5.1.1) results in :

GMT 5.1.1 Defaults file

vim:sw=8:ts=8:sts=8

$Revision: 12822 $

$LastChangedDate: 2014-02-01 00:39:56 +0100 (Sat, 01 Feb 2014) $

how to read grdfile with command 'gmt.grdimage'

I tried to plot some maps with gmt.grdimage, here is my command:
gmt.grdimage(C='cpt', J='m125/35/1:35000000', R='103/153/10/50', B=15, V=True, P=True, in_filename = '/Volumes/work/data/abc.nc')

while it throws an error: "grdimage: Your grid y's or latitudes appear to be outside the map region and will be skipped."

This command works well in bash. I don't quite understand, is the command wrong?
Thanks :-)

Issue whith grdreformat

When I try to use gmtpy with grdreformat, a -K option is add and according to the official documentation of GMT 5.1 this option does not exist. Is it a bad use from me of your module?

Here's my code:
gmt = GMT()
gmt.surface(T=0.25, G="toto.nc", I="0.25m", C=0.1, R="55/56/-21.5/-20.75", in_columns=(xx, yy, zz), out_discard=True)
gmt.grdreformat("toto.nc", "toto.tiff", V="d")

best regards,

Simon

Example 5 fails when using GMT 5.4.5

This is the traceback:

vic@onyx:/mnt/vic/Documents/Coding/GitHub/python-gmtpy$ python examples/example5.py
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter TIME_LANGUAGE is deprecated. Use GMT_LANGUAGE instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
gmt: Warning: Parameter PAGE_COLOR is deprecated. Use PS_PAGE_COLOR instead.
Please see http://gmt.soest.hawaii.edu/doc/5.4.5/GMT_Docs.html#new-features-in-gmt-5 for more information.
Traceback (most recent call last):
  File "examples/example5.py", line 95, in <module>
    gmtpy.nice_palette( gmt, palette_widget, guru, cptfile )
  File "/mnt/vic/Documents/Coding/GitHub/python-gmtpy/gmtpy.py", line 4204, in nice_palette
    label_font = gmt.label_font()
  File "/mnt/vic/Documents/Coding/GitHub/python-gmtpy/gmtpy.py", line 3248, in label_font
    return font_tab_rev(self.gmt_config['FONT_LABEL'].split(',')[1])
TypeError: 'dict' object is not callable

Apart from the deprecation warnings which are caused by not having a specific defaults string for this GMT version, the error of this issue appears because font_tab_rev is defined in the library as a dict object but later the library tries to access an item of this dict using parentheses instead of brackets.

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.