API / geotoolkit / seismic / data / SegyReader / SegyReader
data.SegyReader.SegyReader
Defines reader of local SEG-Y files.
↳
SegyReader
Constructors
| [new SegyReader(file, options)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.data-3.segyreader.segyreader.md#new segyreader(file, options)) | [new SegyReader(file, options, samplePower, nullValue, fileName)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.data-3.segyreader.segyreader.md#new segyreader(file, options, samplepower, nullvalue, filename)) |
|---|
Methods
Constructors
• new SegyReader(file, options?)
Creates reader
| Name | Type | Description |
|---|---|---|
file | IReadable | LocalFile | The file object |
Optional options | Options | options or instance of format to specify the trace data format and location of headers |
AbstractSegyReader.constructor
• new SegyReader(file, options?, samplePower?, nullValue?, fileName?)
Creates reader
| Name | Type | Description |
|---|---|---|
file | IReadable | LocalFile | The file object |
Optional options | SeismicFormat | |
Optional samplePower | number | sample power |
Optional nullValue | number | null value |
Optional fileName | string | file name |
AbstractSegyReader.constructor
Methods
▸ clone(): SegyReader
Return clone of the reader
▸ Protected copyConstructor(src, deepCopy?): SegyReader
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | SegyReader | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
AbstractSegyReader.copyConstructor
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
AbstractSegyReader.getClassName
▸ getDataFormat(): SeismicFormat
Return SEG-Y data format
seismic data format
AbstractSegyReader.getDataFormat
▸ getFileSize(): number
Return file size in bytes
number
AbstractSegyReader.getFileSize
▸ getMetaData(): SeismicMetaData
Returns seismic meta data information
AbstractSegyReader.getMetaData
▸ getModelLimits(): Rect
Returns seismic model limits
AbstractSegyReader.getModelLimits
▸ getNullValue(): number
Returns null value
number
null value
AbstractSegyReader.getNullValue
▸ getNumberOfSamples(): number
Returns number of samples
number
AbstractSegyReader.getNumberOfSamples
▸ getNumberOfTraces(): number
Returns number of traces
number
AbstractSegyReader.getNumberOfTraces
▸ getOptions(): any
Returns supported extra options
any
options options
▸ getOriginalMetaData(): SeismicMetaData
Returns seismic original meta data information before any decimation
AbstractSegyReader.getOriginalMetaData
▸ getSampleRate(): number
Returns sample rate
number
AbstractSegyReader.getSampleRate
▸ Protected getSeismicFile(): LocalFile
Returns file
Deprecated
since 5.0 use getSeismicStream instead
▸ getSeismicFileName(): string
Returns file name
string
▸ Protected getSeismicStream(): IReadable
Returns stream
▸ getStatistics(): Statistics
Return the currently computed seismic statistics.
Important Note: SEGY Statistics are computed lazily, and first require a call to async method readDataSetStatistics(callback). If statistics are not updated, defaults values will be returned instead and will not reflect the actual stats.
min, max, average, rms
AbstractSegyReader.getStatistics
▸ Protected getTaskScheduler(): TaskScheduler
Returns task scheduler
the task scheduler
AbstractSegyReader.getTaskScheduler
▸ getTimeStamp(): number
Return the value to indicate if data was changed
number
AbstractSegyReader.getTimeStamp
▸ getTraceHeaderFields(): FieldDesc[]
Returns an array of field descriptors for the dataset read by this seismic reader.
array of header descriptors
AbstractSegyReader.getTraceHeaderFields
▸ Protected getTraceOffset(traceId): number
Return offset in the SEG-Y file
| Name | Type | Description |
|---|---|---|
traceId | number | trace id |
number
position in the file in bytes
AbstractSegyReader.getTraceOffset
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
AbstractSegyReader.hasEventListener
▸ invalidate(rect?): void
Invalidate data and notify that data is changed
| Name | Type | Description |
|---|---|---|
Optional rect | Rect | optional area of tracers and samples to invalidate. It is not supported now |
void
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ loadMetaData(callback): void
Load SeismicMetaData seismic meta data
| Name | Type | Description |
|---|---|---|
callback | (reader: SeismicReader) => void | method to be called when data is ready |
void
AbstractSegyReader.loadMetaData
▸ notify<E>(type, source, args?): SegyReader
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | SeismicReader | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): SegyReader
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: SegyReader, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): SegyReader
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: SegyReader, args: EventMap[E]) => void | to be called |
this
▸ queryInterface<T>(someInterface): InstanceType<T>
Returns interface, if reader can provide it
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
someInterface | T | interface |
InstanceType<T>
internal instance of this interface
AbstractSegyReader.queryInterface
▸ readBinarySection(callback, start, end): void
Read a binary section
| Name | Type | Description |
|---|---|---|
callback | ReadBinarySectionCallback | callback function |
start | number | start position in bytes |
end | number | end position in bytes |
void
AbstractSegyReader.readBinarySection
▸ readDataSetStatistics(callback, calcTraces?): void
Asynchronously read SEG-Y statistics. This method reads maximum calcTraces from data and calculate statistics based on it.
This method must be called to initialize statistics, in order for getStatistics() to return the right values.
| Name | Type | Description |
|---|---|---|
callback | (reader: AbstractSegyReader, statistics: Statistics) => void | method to be called when statistics will be calculated. |
Optional calcTraces | number | number of traces to calculate statistics |
void
AbstractSegyReader.readDataSetStatistics
▸ Protected readTraceIndices(traceIndices): Promise<Uint8Array[] | ArrayBuffer[]>
This methods is called if it is necessary to read a individual traces. The default implementation calls readBinarySection for each trace in a parallel. The solve of promise can return a array of binary data for each trace or one buffers with data for all requested traces
| Name | Type | Description |
|---|---|---|
traceIndices | number[] | array on trace indices to be loaded |
Promise<Uint8Array[] | ArrayBuffer[]>
AbstractSegyReader.readTraceIndices
▸ Protected readTraceRange(traceFrom, traceTo): Promise<ArrayBuffer | Uint8Array>
This methods is called if it is necessary to read a trace range.
| Name | Type | Description |
|---|---|---|
traceFrom | number | from trace |
traceTo | number | from trace |
Promise<ArrayBuffer | Uint8Array>
AbstractSegyReader.readTraceRange
▸ select(query, callback): void
Returns seismic trace section
| Name | Type | Description |
|---|---|---|
query | SelectQuery | a query in JSON format. Should contain parameters relevant to the trace, such as "from", "to", "headers", and "samples" |
callback | SelectCallback | callback to be called then section is loaded. This method has QueryResult |
void
▸ setSilent(bool): SegyReader
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setStatistics(statistics): void
Sets statistics
| Name | Type | Description |
|---|---|---|
statistics | Statistics | min, max, average, rms |
void
AbstractSegyReader.setStatistics
▸ update(options?, callback?): void
Update seismic query and returns meta information
| Name | Type | Description |
|---|---|---|
Optional options | Record<string, any> | this specifies the condition of the request |
Optional callback | UpdateCallback | method to be called when data is ready |
void
▸ Protected updateTimeStamp(): void
Update time stamp
void
AbstractSegyReader.updateTimeStamp
▸ Static getClassName(): string
string