by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Leonardo Uieda
    @leouieda
    Thanks for the reminder of specifying version numbers. They're loose right now so we can more easily test but once we're getting ready for a release we'll pin them more tightly. Would you mind opening an issue for that so we can keep track?
    Wei Ji
    @weiji14

    Hi! Very nice and useful initiative. I'm implementing laser altimetry simulations in python and happen to need the GMT grdtrack function to extract elevation data from a topography basemap. Is this function already implemented in pygmt or do you plan to implement it at some point? Thanks!

    Hi @steo85it, I'm using grdtrack myself and would be happy to implement it. Already have some code and will submit an issue and pull request which you're more than welcome to contribute to :)

    Wei Ji
    @weiji14
    Done! See Issue at #307 and PR at #308.
    At the moment the pygmt.grdtrack implementation requires you to load the table data into a pandas.DataFrame and the grid into an xarray.DataArray. Would it be better to have grdtrack work directly on files as well, or would this be the way to go? Thoughts?
    pedromarting
    @pedromarting
    Hello! A simple question. Can i use pygm with gmt6 (I read that is an obligated condition) and by the other hand use gmt5.4 without pygm (with the classic gmt script). The idea is to use an estable version of gmt and also try this incredible tool pygmt. Thanks!
    Eric Fielding
    @EJFielding
    Hello Pedro, Yes you should be able to install GMT 6 and GMT5 in separate directories on the same computer. You will need to change your environment variables to adjust the GMTHOME and other variables when you want to switch. I have both installed on my Mac.
    Leonardo Uieda
    @leouieda
    Hi Pedro, as Eric said, it is possible to do that. We're working on a conda package for the 6.0.0rc3 so that you could install in a separate environment without having to manipulate your PATH. We're having of trouble getting that to work still but I'll post here when we have it.
    titi-dev
    @titi-dev
    Hii,good afternoon I am titu from India. I need some suggestions.Actually I know gmt for plotting maps but it is based on the shell scripting which is quite tidious in nature.So i need a python based gmt tool for making the script easier for map plottings.So is this pygmt can help me ???
    pedromarting
    @pedromarting
    Cool @EJFielding ! Can you tell me how to do that thing about changing environment variables?(if is not a problem for you. I'm just a student of science). And obviously @leouieda I wait to that conda package too!! Thanks guys you're amaaazing.
    Chiara Marieni
    @ChiaraMarieni_twitter
    Hello, I have installed pygmt with conda on a new environment, but when I am trying to import pygmt in jupyter I get this error message: Error loading the GMT shared library 'gmt_w64.dll'. Can you help me?
    Leonardo Uieda
    @leouieda
    @titi-dev that is exactly what pygmt is designed to do. Keep in mind, though, that we're still designing the package and lot of GMT features aren't yet supported. But please feel free to give it a try and let us know if there is anything you find missing.
    @ChiaraMarieni_twitter are you using Windows? Make sure you have GMT installed as well. See https://www.pygmt.org/dev/install.html#finding-the-gmt-shared-library. PyGMT doesn't yet work well on Windows. We're having some issues and progress is slow since most developers are on Mac and Linux.
    titi-dev
    @titi-dev
    Thanks
    Mark Wieczorek
    @MarkWieczorek
    I just have a small comment/request about the option projection="W8i". For people who are only interested in running pygmt in a notebook, the size of the image isn't too important: just as you don't specify an image size when using things like imshow, it would probably be best to set this to some default value. Perhaps a better way to specify the options would be to use something like projection="W", size="8i".
    Leonardo Uieda
    @leouieda
    Hi @MarkWieczorek you've read my mind :) In reality, I kind of want to move the figure width argument to pygmt.Figure and have it add the value to projection.
    zjq02010
    @zjq02010
    Hello, I have installed GMT6 on window10, and I can start it by cmd, then I installed pygmt through pycharm. I'm sure I have installed the dependency packages. When I run "import pygmt" "pygmt.test()", some error information appear:“est.py: error: unrecognized arguments: --mpl;inifile: None; assert status == 0, "Some tests have failed."; AssertionError: Some tests have failed. ”. Can anybody help me? Thank you.
    Dongdong Tian
    @seisman
    @zjq02010 To run the pygmt.test(), you also need to install the development dependency packages, which are listed in requirements-dev.txt.
    Leonardo Uieda
    @leouieda
    @seisman @weiji14 thanks for picking up PyGMT development in my absence. I owe you both a beer/coffee (to be claimed at AGU?). I'm just coming back and going through my notifications to see what was done in the mean time. One thing we should discuss is the underlying pygmt.clib module. I'm not very happy with it and I think you both probably have noticed that it has some design flaws. A priority for me for the following months is to see what could be done about it. Since that's the core of our package, it would be great to have that be pretty stable for our 0.1 release after GMT 6 is finally out. What do you think?
    egayer
    @egayer
    Hi guys, just for info, I installed pygmt and GMT 6rc20460 on osX following instructions . Works fine so far with jupyter qt console and within spyder
    egayer
    @egayer
    Is there any discussion group for "how to" questions ? I am having problems using pygmt.Figure.grdimage with xarray.DataArray returned by xarray.open_rasterio. I am reading a geotiff file using xarray.open_rasterio, and when putting the result (named "da") into pygmt.Figure.grdimage, it gives me the following error :"GMTInvalidInput: Invalid number of grid dimensions '3'. Must be 2." I tried using "da[0]" but nothing happens expect eventually the crash of the kernel. I think it is more because I am not sure of what should we put into pygmt.Figure.grdimage than a problem with the function... did anyone ever plot a geotiff with pygmt ? thanks
    Liam Toney
    @liamtoney
    @egayer can you provide the output of what is printed when you type da?
    it could be that you need to squeeze an empty third dimension with da.squeeze()
    egayer
    @egayer
    @liamtoney here is what I get for da:
    `<xarray.DataArray (band: 1, y: 2450, x: 2872)>
    [7036400 values with dtype=float32]
    Coordinates:
    • band (band) int64 1
    • y (y) float64 -20.84 -20.84 -20.84 -20.85 ... -21.42 -21.42 -21.42
    • x (x) float64 55.19 55.19 55.19 55.19 ... 55.86 55.86 55.86 55.86
      Attributes:
      transform: (0.00023395274717030208, 0.0, 55.19145732801233, 0.0, -0....
      crs: +init=epsg:4326
      res: (0.00023395274717030208, 0.00023395274717030208)
      is_tiled: 0
      nodatavals: (-9999.0,)
      scales: (1.0,)
      offsets: (0.0,)
      AREA_OR_POINT: Area`
    Liam Toney
    @liamtoney
    @egayer I see. As-is, your da has three dimensions: band, x, and y. You should be able to use da.squeeze() to remove the length-1 dimension band. Then your grdimage command should work since you'll have a legitimately 2D array. xarray docs are not great on this, so here's the docs for the equivalent numpy command documentation. Let me know if that helps!
    khaynie-usgs
    @khaynie-usgs
    Hi! I am an avid user of GMT, but new to python and PyGMT. Two questions: 1) is there a xyz2grd equivalent? and 2) what is the status for adding in legends/colour bars? Thanks and great work!
    Liam Toney
    @liamtoney
    Hi @khaynie-usgs, thanks for your interest! Legends/colorbars are in the works currently and I believe are set for the 0.1 release (core devs please correct me if I'm wrong). I'm not sure about xyz2grd, maybe @leouieda or @weiji14 can comment on that. The Python package xarray may be able to handle some of the cases you use xyz2grd for, I'd recommend checking it out.
    Wei Ji
    @weiji14
    Oops, just catching up on the activity here. Thanks for the offer @leouieda :laughing:, GMT6 is pretty much out now (see release) so we can start doing some major work. Personally I'd like to not refactor the clib too much in the short-term because of the PyGMT workshop I'm hosting on Nov 12, but I agree that long-term there could be some improvements on that front.
    Wei Ji
    @weiji14
    @khaynie-usgs, the legend module has just been implemented today (thanks @liamtoney!) and colorbar is just awaiting review (see GenericMappingTools/pygmt#332) before it gets merged in so hopefully soon. As for xyz2grd, if you'd like to open an feature request on Github here we can start working on it (though I must warn you it might take a while...). Depending on your use case though, @liamtoney is right that xarray might have a way to do it.
    By the way everyone, there's a new GMT community forum at https://forum.generic-mapping-tools.org/ you can sign up for with your Github account or by email. It's still a bit new but I recommend checking it out.
    EqualMa
    @EqualMa
    hello, I wonder whether there is a way to set a gmt.config for a project or a figure in pygmt?
    Wei Ji
    @weiji14
    @EqualMa, it's certainly been raised before at GenericMappingTools/pygmt#288 and I think @seisman has tried to implement it in GenericMappingTools/pygmt#293.
    EqualMa
    @EqualMa
    Thank you!
    khaynie-usgs
    @khaynie-usgs
    @weiji14 and @liamtoney thanks for the info! Glad to hear that legend is working and colorbar will be up soon. I will test those out when I can. I am trying to write something to do xyz2grd. I will keep you all posted on the new GMT community forum!
    Leonardo Uieda
    @leouieda

    I will keep you all posted on the new GMT community forum!

    Yay! Please do! @weiji14 @seisman and @liamtoney have been doing a stellar job pushing PyGMT forward

    titi-dev
    @titi-dev
    Sir pygmt is now stable ??
    Leonardo Uieda
    @leouieda
    @titi-dev not yet, sorry. We're still catching up. We'll make releases in 0.* series for a while still. Truly stable will only come with 1.0 down the line.
    titi-dev
    @titi-dev
    Can i use pygmt now make basemap of an area, wiggle plots and seismic image plots.
    af0974
    @af0974
    Hello there, I am contemplating the possibility of using pygmt. Could you please tell me whether the hammer projection is available? Thanks, Alex
    Leonardo Uieda
    @leouieda
    Hi Alex, any projection available in GMT is also available in PyGMT: https://docs.generic-mapping-tools.org/latest/gmt.html#j-full
    Mark Wieczorek
    @MarkWieczorek
    For info, pyshtools now has implemented geopgraphic projections with both pygmt and cartopy. Here is a notebook showing how everything works: https://htmlpreview.github.io/?https://github.com/MarkWieczorek/SHTOOLS/blob/cartopy/docs/pages/mydoc/notebooks/Introduction-4.html
    If you have any comments, let me know.
    seismoprocess
    @seismoprocess
    Hii Leonardo sir. Is pygmt ready for use ...or its still under development..I need to plots some seismic station maps and wiggle plots using this. please suggest
    seismoprocess
    @seismoprocess
    @seismoprocess Hii...How can i get the high resolution grd file for beautiful map...please suggest .Thanks
    Mark Wieczorek
    @MarkWieczorek
    FYI, we just put out a new release of pyshtools, which is our first to include experimental support for map projections using pygmt! If you would like to check out how this was implemented, please see this notebook: https://shtools.oca.eu/shtools/public/pages/mydoc/notebooks/Introduction-4.html
    Leonardo Uieda
    @leouieda
    :confetti_ball: that's great, Mark! Looking forward to trying it out
    geophysics91
    @geophysics91
    hii @leouieda i want to make a beautiful seismic station map...how can i do it using pygmt..please suggest.
    geophysics91
    @geophysics91
    @leouieda u r not responding why??? any problem.
    matrixbot
    @matrixbot
    mark-wieczorek Have you looked at the documentation on pygmt.org ?
    mark-wieczorek You can also check out the numerous examples on https://www.generic-mapping-tools.org/ if you are ok with using the command line.
    Liam Toney
    @liamtoney
    Looks like @matrixbot is a little confused.
    @geophysics91 please start with this tutorial, I think it will help you achieve your goal.