The following tutorial will show you how to create a Python trace processor which will overwrite the CDPX and CDPY trace headers for a seismic dataset.
The first thing you need to do is install the PythonTraceFilter plugin from the INTViewer Update Center. Run INTViewer and select Tools -> Plugins. Select the PythonTraceFilter, and click Install.
Next, open the seismic data that you want to modify in a XSection Window. To do this, choose File -> Open in XSection -> Seismic ...
Right-click the seismic display, and select Properties ... Choose the Trace Processors tab. Click the Python trace processor, click the right arrow, and then enter the following Python code:
inlineValue = headers.get("INLINE")
xlineValue = headers.get("XLINE")
transformation = seismicData.getIJToXY()
values = transformation.coordTrans(inlineValue, xlineValue)
headers.put("CDPX", values[0])
headers.put("CDPY", values[1])
headers.put("LOC SCALER", 1)
The Python file is also available for download at the bottom of this page.
Click Ok, and then open up the Trace Headers top component by selecting Window -> Trace Headers. Display both the raw and processed values. To do this, right-click the Trace Headers table, and select Show Header Values -> Both. You should see the changes to the headers that you are modifying, like the following:
If you would like to write out these changes, choose File -> Save Seismic Data ... This will write out the seismic data with the processed header values instead of the raw values. After saving, the new trace headers will look like the following: