Aligning 2D Lines in all XSections

When 2D lines are loaded in XSection windows, traces are shown by default in their acquisition order, not according to their geographical position. Geoscientists may find it useful to see traces organized in a consistent way across the entire INTViewer desktop, for example showing the traces closest to the North first.

In the image below, you can see from the cursor locations that the beginning traces are starting at the southern edge.

In the other image below, you can see that the ending traces arrive at the northern edge.

After adjusting the trace order manually, you can see that the traces at the beginning of the XSection window are now the northern most ones.

Also, the traces near the end are now the southern traces.

Instead of doing this manually, this script will automatically adjust all 2D lines in XSections so that their traces go from North/West to South/East.

The script is attached to the bottom of this page.

This first section of code contains the function which determines if the trace order needs to be inverted:

The second section looks at all XSection windows for 2D lines, and does the inversion if needed:

It is useful to set up your Python scripts directory when using a script such as this, where you use it frequently. Go to Tools->Options and go to the Python tab. Click the Open/Set Python Scripts Directory ... button.

Choose the directory which contains your Python scripts.

After doing this, the Scripts menu item will now be present. Open the menu and select the script you wish to run.

See Aligning New 2D Lines in XSections Automatically to align 2D lines automatically instead of on-demand.