Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Eric Fielding
    @EJFielding
    I had another question, I was trying to run data = pygmt.datasets.load_japan_quakes() and I got an error message. I notice that gmt.soest.hawaii.edu is offline at the moment. Does all the data come from that server?
    `
    Liam Toney
    @liamtoney
    Thanks for making an issue on GitHub, Eric. I've responded to it there.
    (As an aside, I see from your profile that you do SAR stuff. I'm currently working with Franz Meyer at UAF to bring in some GMT tools to the SARVIEWS framework. Let me know if you have any ideas or "wish list" items for the SARVIEWS user interface!)
    Eric Fielding
    @EJFielding
    @liamtoney Yes, I work on SAR and InSAR. I only looked at SARVIEWS once or twice as I work with the JPL ARIA project and use their products for most of my InSAR needs. The ARIA data products website (new one is ARIA products) uses Leaflet to show preview images so they can be zoomed, etc.
    Leonardo Uieda
    @leouieda
    @EJFielding thanks for bringing this up! It's good to have people with different setups trying things. I'll follow up on #291
    Stefano
    @steo85it
    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!
    Leonardo Uieda
    @leouieda
    Hi @steo85it, grdtrack is still not implemented by we intend to have all of GMT accessible in the future. We're focusing more on establishing a basis for the package right now than implementing everything. That said, we are open for contributions and would more than welcome your knowledge and use case when designing the grdtrack function. Keep posted on the Github repository https://github.com/GenericMappingTools/pygmt
    Stefano
    @steo85it
    @leouieda Ok, thanks! Makes total sense to proceed in this way. I'll just "subprocess" grdtrack for the moment, then, but keep track of your advances and eventually help when it'll be time. Cheers!
    Leonardo Uieda
    @leouieda
    :+1:
    Charles
    @iceseismic
    Just starting with the "load_japan-quakes" example ; I can get an output plot, but also receive 8 error messages as follows : any idea ?? : pygmt-session [ERROR]: GMT_COMPATIBILITY: Expects values from 6 to 6; reset to 6.
    Leonardo Uieda
    @leouieda
    Hi @iceseismic thanks for reporting. Wow, that's a new one :) Would you mind opening an issue here https://github.com/GenericMappingTools/pygmt/issues/new?template=bug_report.md ? Please fill out the template with some more info about your setup so we can try to figure it out.
    Sean
    @sean0921

    Hello. I'm wondering if there's any plan to add some require version info on requirement.txt requirement-dev.txt to let dependencies more clarify,

    because recently I'd like to trying package pygmt via PKGBUILD for makepkg tools in ArchLinux,
    https://github.com/sean0921/pygmt-aur.git

    as another python package built by makepkg, in build(), package() procedure, it seems ok,
    but when I try to use pygmt.test() in check() procedure,
    it encouters some error,
    related message: https://gist.github.com/sean0921/66eb9e45220ad20b3e1b0d355f67d199

    although it seems like that only Anaconda(Miniconda) Python is supported, I still curious that if it's possible to packaging it in the way of distribution package manager, let it more friendly and accessible for more users and developers. :)

    Leonardo Uieda
    @leouieda
    Hi @sean0921, thanks for trying this out! I was thinking of the AUR just yesterday. Right now, packaging would work because we don't really have a release yet and we still rely on the master branch of GMT. Once GMT 6 is released and we make a release of our own, then it would be great to have.
    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.