Last updated

API / geotoolkit / seismic / data / SegyReader / SegyReader

Class: SegyReader

data.SegyReader.SegyReader

Defines reader of local SEG-Y files.

Hierarchy

Table of contents

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

Contents

Constructors

new SegyReader(file, options)

new SegyReader(file, options?)

Creates reader

Parameters

Name Type Description
fileIReadable | LocalFileThe file object
Optional optionsOptionsoptions or instance of format to specify the trace data format and location of headers

Overrides

AbstractSegyReader.constructor


new SegyReader(file, options, samplePower, nullValue, fileName)

new SegyReader(file, options?, samplePower?, nullValue?, fileName?)

Creates reader

Parameters

Name Type Description
fileIReadable | LocalFileThe file object
Optional optionsSeismicFormat
Optional samplePowernumbersample power
Optional nullValuenumbernull value
Optional fileNamestringfile name

Overrides

AbstractSegyReader.constructor

Methods

clone

clone(): SegyReader

Return clone of the reader

Returns

SegyReader


copyConstructor

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.

Parameters

Name Type Description
srcSegyReaderSource to copy from
Optional deepCopybooleandeep copy

Returns

SegyReader

this

Overrides

AbstractSegyReader.copyConstructor


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

AbstractSegyReader.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractSegyReader.getClassName


getDataFormat

getDataFormat(): SeismicFormat

Return SEG-Y data format

Returns

SeismicFormat

seismic data format

Inherited from

AbstractSegyReader.getDataFormat


getFileSize

getFileSize(): number

Return file size in bytes

Returns

number

Overrides

AbstractSegyReader.getFileSize


getMetaData

getMetaData(): SeismicMetaData

Returns seismic meta data information

Returns

SeismicMetaData

Inherited from

AbstractSegyReader.getMetaData


getModelLimits

getModelLimits(): Rect

Returns seismic model limits

Returns

Rect

Inherited from

AbstractSegyReader.getModelLimits


getNullValue

getNullValue(): number

Returns null value

Returns

number

null value

Inherited from

AbstractSegyReader.getNullValue


getNumberOfSamples

getNumberOfSamples(): number

Returns number of samples

Returns

number

Inherited from

AbstractSegyReader.getNumberOfSamples


getNumberOfTraces

getNumberOfTraces(): number

Returns number of traces

Returns

number

Inherited from

AbstractSegyReader.getNumberOfTraces


getOptions

getOptions(): any

Returns supported extra options

Returns

any

options options

Inherited from

AbstractSegyReader.getOptions


getOriginalMetaData

getOriginalMetaData(): SeismicMetaData

Returns seismic original meta data information before any decimation

Returns

SeismicMetaData

Inherited from

AbstractSegyReader.getOriginalMetaData


getSampleRate

getSampleRate(): number

Returns sample rate

Returns

number

Inherited from

AbstractSegyReader.getSampleRate


getSeismicFile

Protected getSeismicFile(): LocalFile

Returns file

Deprecated

since 5.0 use getSeismicStream instead

Returns

LocalFile


getSeismicFileName

getSeismicFileName(): string

Returns file name

Returns

string


getSeismicStream

Protected getSeismicStream(): IReadable

Returns stream

Returns

IReadable


getStatistics

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.

Returns

Statistics

min, max, average, rms

Inherited from

AbstractSegyReader.getStatistics


getTaskScheduler

Protected getTaskScheduler(): TaskScheduler

Returns task scheduler

Returns

TaskScheduler

the task scheduler

Inherited from

AbstractSegyReader.getTaskScheduler


getTimeStamp

getTimeStamp(): number

Return the value to indicate if data was changed

Returns

number

Inherited from

AbstractSegyReader.getTimeStamp


getTraceHeaderFields

getTraceHeaderFields(): FieldDesc[]

Returns an array of field descriptors for the dataset read by this seismic reader.

Returns

FieldDesc[]

array of header descriptors

Inherited from

AbstractSegyReader.getTraceHeaderFields


getTraceOffset

Protected getTraceOffset(traceId): number

Return offset in the SEG-Y file

Parameters

Name Type Description
traceIdnumbertrace id

Returns

number

position in the file in bytes

Inherited from

AbstractSegyReader.getTraceOffset


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

AbstractSegyReader.hasEventListener


invalidate

invalidate(rect?): void

Invalidate data and notify that data is changed

Parameters

Name Type Description
Optional rectRectoptional area of tracers and samples to invalidate. It is not supported now

Returns

void

Inherited from

AbstractSegyReader.invalidate


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractSegyReader.isDisposed


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

AbstractSegyReader.isSilent


loadMetaData

loadMetaData(callback): void

Load SeismicMetaData seismic meta data

Parameters

Name Type Description
callback(reader: SeismicReader) => voidmethod to be called when data is ready

Returns

void

Inherited from

AbstractSegyReader.loadMetaData


notify

notify<E>(type, source, args?): SegyReader

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceSeismicReaderof the event
Optional argsEventMap[E]arguments of the event

Returns

SegyReader

this

Inherited from

AbstractSegyReader.notify


off

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: SegyReader, args: EventMap[E]) => voidfunction to be called

Returns

SegyReader

this

Inherited from

AbstractSegyReader.off


on

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: SegyReader, args: EventMap[E]) => voidto be called

Returns

SegyReader

this

Inherited from

AbstractSegyReader.on


queryInterface

queryInterface<T>(someInterface): InstanceType<T>

Returns interface, if reader can provide it

Type parameters

NameType
Textends Constructor<any>

Parameters

Name Type Description
someInterfaceTinterface

Returns

InstanceType<T>

internal instance of this interface

Inherited from

AbstractSegyReader.queryInterface


readBinarySection

readBinarySection(callback, start, end): void

Read a binary section

Parameters

Name Type Description
callbackReadBinarySectionCallbackcallback function
startnumberstart position in bytes
endnumberend position in bytes

Returns

void

Overrides

AbstractSegyReader.readBinarySection


readDataSetStatistics

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.

Parameters

Name Type Description
callback(reader: AbstractSegyReader, statistics: Statistics) => voidmethod to be called when statistics will be calculated.
Optional calcTracesnumbernumber of traces to calculate statistics

Returns

void

Inherited from

AbstractSegyReader.readDataSetStatistics


readTraceIndices

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

Parameters

Name Type Description
traceIndicesnumber[]array on trace indices to be loaded

Returns

Promise<Uint8Array[] | ArrayBuffer[]>

Inherited from

AbstractSegyReader.readTraceIndices


readTraceRange

Protected readTraceRange(traceFrom, traceTo): Promise<ArrayBuffer | Uint8Array>

This methods is called if it is necessary to read a trace range.

Parameters

Name Type Description
traceFromnumberfrom trace
traceTonumberfrom trace

Returns

Promise<ArrayBuffer | Uint8Array>

Inherited from

AbstractSegyReader.readTraceRange


select

select(query, callback): void

Returns seismic trace section

Parameters

Name Type Description
querySelectQuerya query in JSON format. Should contain parameters relevant to the trace, such as "from", "to", "headers", and "samples"
callbackSelectCallbackcallback to be called then section is loaded. This method has QueryResult

Returns

void

Inherited from

AbstractSegyReader.select


setSilent

setSilent(bool): SegyReader

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

SegyReader

this

Inherited from

AbstractSegyReader.setSilent


setStatistics

setStatistics(statistics): void

Sets statistics

Parameters

Name Type Description
statisticsStatisticsmin, max, average, rms

Returns

void

Inherited from

AbstractSegyReader.setStatistics


update

update(options?, callback?): void

Update seismic query and returns meta information

Parameters

Name Type Description
Optional optionsRecord<string, any>this specifies the condition of the request
Optional callbackUpdateCallbackmethod to be called when data is ready

Returns

void

Inherited from

AbstractSegyReader.update


updateTimeStamp

Protected updateTimeStamp(): void

Update time stamp

Returns

void

Inherited from

AbstractSegyReader.updateTimeStamp


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractSegyReader.getClassName