horizonData = HorizonData("F:\\Data\\Segy\\Attributes\\bighorizon.xhz")
horizonDataCollection = HorizonDataCollection("F:\\Data\\Horzs\\Hith.dat")
Reading a collection using a given Ascii Mapping XML string (string divided into lines for easier reading):
XMLString='<Mapping>
<FileDescriptor>
<LineDescription delimiter="whitespace & tab" endTag=""
hasStartEndTag="false" noOfLinesToSkip="0" startTag=""/>
<DefaultHeaderColumns>
<Column name="INLINE" nameLocked="false" number="0"/>
<Column name="XLINE" nameLocked="false" number="1"/>
</DefaultHeaderColumns>
<DefaultTimeColumn>
<Column constantValue="0" isConstant="false" name="Time"
nameLocked="false" number="2"/>
</DefaultTimeColumn>
<AttributeColumns/>
</FileDescriptor>
</Mapping>'
horizonDataCollection = HorizonDataCollection("F:\\Data\\Horzs\\Hith.dat", XMLString)
chooser = HorizonDataChooser()
horizonDataCollection = chooser.getSelectedData()
NOTE: The chooser will always return a HorizonDataCollection.
horizonDataKeyNames = horizonData.getKeyNames();
horizonDataCollectionKeyNames = horizonDataCollection.getKeyNames();
Using this information, you can access specific key range information by using the following method:
dataInlineMin = horizonData.getKeyMinimum("INLINE")
dataInlineMax = horizonData.getKeyMaximum("INLINE")
dataCollectionInlineMin = horizonDataCollection.getKeyMinimum("INLINE")
dataCollectionInlineMax = horizonDataCollection.getKeyMaximum("INLINE")
horizons = horizonDataCollection.getAllHorizonData()
Retrieving a specific horizon data by name:
horizon = horizonDataCollection.getHorizonData("Hith")
See also: Python APIs for Calculator Data