Using python with Geosoft, and Geosoft grids

JulianBoada
JulianBoada Posts: 1 Calcite Rank Badge
edited February 2023 in GeoStudio
Hello, I have a few questions regarding python and geosoft grids and any advice would be most appreciated!

I am trying to create PDF files with geosoft grid images using python. I am using Oasis Montage 8.5 so I believe I do not have access to the python modules I saw on github. The only way I know is to place the grid onto a .map file and export that map as an image, but is it possible to export the grid directly onto a pdf, or preferably, would Oasis Montage 8.5 have access to any useful python modules to do this?

If I upgrade to 9.0 in order to gain access to python modules, would I be able to make a python application / executable without any dependency so that other users do not need to install 9.0? I am extremely interested in your python package, but with our current gx's / gs' in 8.5, it would be difficult for everyone to upgrade.

Thank you for your time.

Regards,
Julian Boada
Tagged:

Comments

  • Julian

    I see no one responded, and perhaps you got this answered some other way. But I offer my perspective in case it is helpful as others may have similar questions.

    The short answer is that you will have the least friction by updating to 9.x. The Geosoft Viewer has no cost, which may be interesting, but if your usage is based on subscription/licensed 8.5 use this would be a barrier.

    Python was supported for 8.5, but the support was limited. Geosoft 8.5 is a 32-bit application and we marshaled all data and calls across to 64-bit Python via "dbus". Geosoft 9.x is our 64-bit application and we have added a lot to the Python support.

    All that said, we do have people using the 8.5 API libraries, so technically it is possible, but it would be difficult to find someone to help. This may be why no one responded to your question before now.
    Geosoft logo
  • Julian,

    Dealing with the second part of your question - "...would I be able to make a python application / executable without any dependency so that all users do not need to install 9.0?"

    The answer is yes, although users do need to install 9.x and continue to use the 8.5 they are used to. Create a stand-alone Python application that uses the 9.x API and run it from an 8.5 GX or an 8.5-compatible Python extension. For an example, see the self-organizing_map, which first collects the open database information, closes the database and runs an external Python script (at line 61 https://github.com/GeosoftInc/Geoscience/blob/master/Open research/self_organizing_maps/som_om.py).
    The GX API has a similar low-level call from GXC (iRun_SYS described at line 1408 in https://github.com/GeosoftInc/gxc/blob/9.4/include/sys.gxh).

    Note that resources open on the running 8.5 session (the grids for PDF in your case) need to be closed so the stand-alone session can open them (via the 9.x API). When finished they can be re-opened so it all feels transparent to the user.
    Geosoft logo
This discussion has been closed.