How to convert a SEG-Y file to oVDS

In this article, you will learn how to convert SEG-Y formatted data to the Open VDS (oVDS) format. Seismic data stored in the industry standard SEG-Y format can be converted to oVDS format for use in applications via the Seismic DMS.

OSDU™ SEG-Y to oVDS conversation

Important

Microsoft Energy Data Services is currently in preview. For legal terms that apply to features that are in beta, in preview, or otherwise not yet released into general availability, see the Supplemental Terms of Use for Microsoft Azure Previews.

Microsoft Energy Data Services requires registration and is available to only approved customers and partners during the preview period. To request access to Microsoft Energy Data Services during the preview period, use this form.

Prerequisites

  1. Download and install Postman desktop app.
  2. Import the oVDS Conversions.postman_collection into Postman. All curl commands used below are added to this collection. Update your Environment file accordingly
  3. Ensure that a Microsoft Energy Data Services Preview instance is created already
  4. Clone the sdutil repo as shown below:
git clone https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil.git

git checkout azure/stable

Convert SEG-Y file to oVDS file

  1. Check if VDS is registered with the workflow service or not:

     curl --location --request GET '<url>/api/workflow/v1/workflow/'
           --header 'Data-Partition-Id: <datapartition>'
           --header 'Content-Type: application/json'
           --header 'Authorization: Bearer {{TOKEN}}
    

    You should see VDS converter DAG in the list. IF NOT in the response list then REPORT the issue to Azure Team

  2. Open sdutil and edit the config.yaml at the root to include the following yaml and fill in the three templatized values (two instances of <meds-instance-url> and one <put refresh token here...>). See Generate a refresh token on how to generate a refresh token. If you continue to follow other "how-to" documentation, you'll use this refresh token again. Once you've generated the token, store it in a place where you'll be able to access it in the future.

    seistore:
        service: '{"azure": {"azureEnv":{"url": "<url>/seistore-svc/api/v3", "appkey": ""}}}'
        url: '<url>/seistore-svc/api/v3'
        cloud_provider: azure
        env: glab
        auth-mode: JWT Token
        ssl_verify: false
    auth_provider:
        azure: '{ 
            "provider": "azure", 
            "authorize_url": "https://login.microsoftonline.com/", "oauth_token_host_end": "/oauth2/v2.0/token", 
            "scope_end":"/.default openid profile offline_access",
            "redirect_uri":"http://localhost:8080",
            "login_grant_type": "refresh_token",
            "refresh_token": "<RefreshToken acquired earlier>" 
            }'
    azure:
        empty: none
    
  3. Run sdutil to see if it's working fine. Follow the directions in Setup and Usage for Azure env. Understand that depending on your OS and Python version, you may have to run python3 command as opposed to python.

    Note

    when running python sdutil config init, you don't need to enter anything when prompted with Insert the azure (azureGlabEnv) application key:.

  4. Upload the seismic file

    python sdutil cp \source.segy sd://<datapartition>/<subproject>/destination.segy
    
  5. Fetch the idtoken from sdutil for the uploaded file.

     python sdutil auth idtoken
    
  6. Trigger the DAG through POSTMAN or using the call below:

     curl --location --request POST '<url>/api/workflow/v1/workflow/<dag-name>/workflowRun' \
         --header 'data-partition-id: <datapartition>' \
         --header 'Content-Type: application/json' \
         --header 'Authorization: Bearer {{TOKEN}}' \
         --data-raw '{
             "executionContext": {
                "vds_url": "sd://<datapartition>/<subproject>",
                "persistent_id": "<filename>",
                "id_token": "<token>",
                "segy_url": "sd://<datapartition>/<subproject>/<filename>.segy"
    
         }    
     }'
    
  7. Let the DAG run to complete state. You can check the status using the workflow status call

  8. Verify the converted files are present on the specified location in DAG Trigger or not

    python sdutil ls sd://<datapartition>/<subproject>/
    
  9. If you would like to download and inspect your VDS files, don't use the cp command as it will not work. The VDS conversion results in multiple files, therefore the cp command won't be able to download all of them in one command. Use either the SEGYExport or VDSCopy tool instead. These tools use a series of REST calls accessing a naming scheme to retrieve information about all the resulting VDS files.

OSDU™ is a trademark of The Open Group.

Next steps