Reference

Base.Filesystem.cpMethod
cp(src, dst, [secondaries=nothing])

Copy a file from src (of type JSeis) to dst of type String. For example, cp(jsopen("copyfrom.js"), "copyto.js"). Use the optional named argument secondaries to change the JavaSeis secondary location.

source
Base.Filesystem.mvMethod
mv(src, dst, [secondaries=nothing])

Move a file from src (of type JSeis) to dst of type String. For example, cp(jsopen("movefrom.js"), "moveto.js"). Use the optional named argument secondaries to change the JavaSeis secondary location.

source
Base.closeMethod
close(io)

Close an open JavaSeis dataset where io is of type JSeis created using, for example, jsopen.

source
Base.copy!Method
copy!(ioout, hdrsout, ioin, hdrsin)

Copy trace headers from hdrsin::Array{Uint8,2} to hdrsout::Array{Uint8,2} and where hdrsin corresponds to ioin::JSeis and hdrsout corresponds to ioout::JSeis. For example,

ioin = jsopen("data1.js")
ioout = jsopen("data2.js")
hdrsin = readframehdrs(ioin,1)
hdrsout = readframehdrs(ioout,1)
copy!(ioout, hdrsout, ioin, hdrsin)
source
Base.empty!Method
empty!(io)

Empty a JavaSeis dataset from disk, retaining the meta-information. For example: empty!(jsopen("emptyme.js"))

source
Base.getMethod
get(prop, hdrs, i)

Get the value of the trace property prop::TraceProperty stored in the header of the ith column of hdrs::Array{UInt8,2}. For example, io=jsopen("data.js"); get(prop(io, "REC_X"), readframehdrs(io,1), 1).

source
Base.getMethod
get(prop, hdr)

Get the value of the trace property prop::TraceProperty stored in the header hdr::Array{UInt8,1}. For example, io=jsopen("data.js"); get(prop(io, "REC_X"), readframehdrs(io,1)[:,1])

source
Base.inMethod
in(trace_property, io)

Returns true if trace_property is in the header catalog of io::JSeis, and where trace_property is one of String, TracePropertyDef or TraceProperty.

source
Base.isemptyMethod
isempty(io)

Returns true if the dataset correpsonding to io is empty (contains no data), and false otherwise.

source
Base.lengthMethod
length(io)

Returns the number of frames in a JavaSeis dataset corresponding to io::JSeis. This is equivalent to prod(size(io)[3:end]), and is useful for iterating over all frames in a JavaSeis dataset.

source
Base.ndimsMethod
ndims(io)

Returns the numbers of dimensions of the JavaSeis dataset corresponding to io::JSeis.

source
Base.read!Method
read!(io, trcs, sample_range, trace_range, range...)

In-place read of a subset of data from a JavaSeis file. If performance is important, then consider using readframe! instead. Examples:

3D:

read!(jsopen("data_3D.js"), trcs, hdrs, :, :, :)
read!(jsopen("data_3D.js"), trcs, hdrs, :, 1:2:end, 1:5)

4D:

read!(jsopen("data_4D.js"), trcs, hdrs, :, :, :, :)
read!(jsopen("data_4D.js"), trcs, hdrs, :, :, 2, 2:2:10)

5D:

read!(jsopen("data_5D.js"), trcs, hdrs, :, :, :, :, :)
read!(jsopen("data_5D.js"), trcs, hdrs, :, :, 2, 2:2:10, 1:10)
source
Base.readMethod
read(io, sample_range, trace_range, range...)

Out-of-place read of a subset of data from a JavaSeis file. Returns an array of trace data. If performance is important, then consider using readframetrcs instead. Examples:

3D:

trcs, hdrs = read(jsopen("data_3D.js"), :, :, :)
trcs, hdrs = read(jsopen("data_3D.js"), :, 1:2:end, 1:5)

4D:

trcs, hdrs = read(jsopen("data_4D.js"), :, :, :, :)
trcs, hdrs = read(jsopen("data_4D.js"), :, :, 2, 2:2:10)

5D:

trcs, hdrs = read(jsopen("data_5D.js"), :, :, :, :, :)
trcs, hdrs = read(jsopen("data_5D.js"), :, :, 2, 2:2:10, 1:10)
source
Base.sizeMethod
size(io, i)

Returns the lenth of dimension i of a JavaSeis dataset corresponding to io::JSeis.

source
Base.sizeMethod
size(io)

Returns the lenths of all dimensions (as a tuple of integers) of a JavaSeis dataset corresponding to io::JSeis.

source
Base.writeFunction
write(io, trcs, hdrs[, smprng=:])

Write trcs and hdrs to the file corresponding to io::JSeis. Optionally, you can limit which samples are written. The locations that are written to are determined by the values corresponding to the framework headers hdrs. Note that the dimension of the arrays trcs and hdrs must match the number of dimensions in the framework.

source
Base.writeMethod
write(io, trcs, sample_range, trace_range, range...)

Write trcs to the JavaSeis file corresponding to io::JSeis. the dimension of trcs must be the same as the dimension of io, and the size of each dimension corresponds to range. Examples:

3D:

write(io, trcs, :, :, :)

4D:

write(io, trcs, :, :, :, :)

5D:

write(io, trcs, :, :, :, :, :)
source
TeaSeis.allocframeMethod
allocframe(io)

Allocate memory for one frame of JavaSeis dataset. Returns (Array{Float32,2},Array{UInt8,2}). For example, trcs, hdrs = allocframe(jsopen("data.js")).

source
TeaSeis.allocframehdrsMethod

allocframehdrs(io)

Allocate memory for headers for one frame of JavaSeis dataset. Returns Array{UInt8,2}. For example, hdrs = allocframehdrs(jsopen("data.js")).

source
TeaSeis.allocframetrcsMethod

allocframetrcs(io)

Allocate memory for traces for one frame of JavaSeis dataset. Returns Array{Float32,2}. For example, trcs = allocframetrcs(jsopen("data.js")).

source
TeaSeis.datapropertyMethod
dataproperty(io, label)

Get a data property (data properties are per file, rather than per trace) from io::JSeis with label label::String. For example, dataproperty(jsopen("data.js"), "FREQUENCY").

source
TeaSeis.domainsMethod
domains(io, i)

Returns the domain of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.domainsMethod
domains(io)

Returns the domains of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.foldMethod
fold(io, hdrs)

Compute the fold of a frame where io is JSeis corresponding to the dataset, and hdrs are the headers for the frame. For example: io=jsopen("file.js"); fold(io, readframehdrs(io,1))

source
TeaSeis.foldMethod
fold(io, idx...)

Compute the fold of a frame where idx is the frame/volume/hypercube indices. For example, fold(jsopen("file.js"),1) for a 3D dataset, fold(jsopen("file.js",1,2)) for a 4D dataset, and fold(jsopen("file.js"),1,2,3) for a 5D dataset.

source
TeaSeis.geometryMethod
geometry(io)

If io::JSeis contains a geometry definition, then return a geometry of type Geometry. Otherwise, return nothing.

source
TeaSeis.hasdatapropertyMethod
hasdataproperty(io, label)

return true if io::JSeis contains the data property corresponding to label. Otherwise, return false.

source
TeaSeis.ind2subMethod
ind2sub(io, i)

Return the (frame,volume...) tuple for the liner index i. This is useful for looping over all frames in a data-set that is more that 4 or more dimensions. For example,

for i = 1:length(io)
    trcs, hdrs = readframe(io, ind2sub(io,i)...)
end
source
TeaSeis.jscreateMethod
jscreate(filename)

Create a JavaSeis dataset without opening it. This method has the same optional arguments as jsopen

source
TeaSeis.jsopenMethod
jsopen(filename, mode, [parameters])

Open a new or existing JavaSeis dataset with name filename::String and in mode::String. mode can be one of "r" (read), "w" (write/create) or "r+" (read and write). It is convention for filename to havea ".js" extention.

If "w" is used for the value of mode, then the axis_lengths named parameter is required, and several optional named function parameters are available:

parameters

  • similarto::String An existing JavaSeis dataset. If set, then all other named arguments can be used to modify the data context that belongs to the existing JavaSeis dataset.
  • description::String Description of dataset, if not set, then a description is parsed from the filename.
  • mapped::Bool If the dataset is full (no missing frames/traces), then it may be more efficient to set this to false. Defaults to true.
  • datatype::String Examples are CMP, SHOT, etc. If not set, then UNKNOWN is used.
  • dataformat::Type Choose from Float32, and Int16. If not set, then Float32 is used.
  • dataorder::String (not supported)
  • axis_lengths::Array{Int} size of each dimension (sample/trace/frame/volume/hypercube) of the JavaSeis data context
  • axis_propdefs::Array{TracePropertyDef} Trace properties corresponding to JavaSeis axes. If not set, then SAMPLE, TRACE, FRAME, VOLUME and HYPRCUBE are used.
  • axis_units::Array{String} Units corresponding to JavaSeis axes. e.g. SECONDS, METERS, etc. If not set, then UNKNOWN is used.
  • axis_domains::Array{String} Domains corresponding to JavaSeis axes. e.g. SPACE, TIME, etc. If not set, then UNKNOWN is used.
  • axis_lstarts::Array{Int} Logical origins for each axis. If not set, then 1 is used for the logical origin of each axis.
  • axis_lincs::Array{Int} Logical increments for each axis. If not set, then 1 is used for the logical increments of each axis.
  • axis_pstarts::Array{Float64} Physical origins for each axis. If not set, then 0.0 is used for the physical origin of each axis.
  • axis_pincs::Array{Float64} Physical increments for each axis. If not set, then 1.0 is used for the physical increments of each axis.
  • data_properties::Array{DataProperty} An array of custom trace properties. These are in addition to the properties listed in SSPROPS.md.
  • properties::Array{TracePropertyDef} An array of custom data properties. One property per data-set rather than one property per trace as in properties above.
  • geometry::Geometry An optional three point geometry can be embedded in the JavaSeis file.
  • secondaries::Array{String} An array of file-system locations used to store the file extents. If not set, then primary storage is used.
  • nextents::Int64 The number of file-extents used to store the data. If not set, then a heuristic is used to choose the number of extents. The heuristic is: min(256,10 + (FRAMEWORK_SIZE)/(2*1024^3)).
  • properties_add::Array{TracePropertyDef} When similarto is specified, use this to add trace properties to those already existing in the similarto file.
  • properties_rm::Array{TracePropertyDef} When similarto is specified, use this to remove trace properties to those already existing in the similarto file.
  • dataproperties_add::Array{DataProperty} When similarto is specfied, use this to add dataset properties to those aloready existing in the similarto file.
  • dataproperties_rm::Array{DataProperty} When similarto is specified, use this to remove dataset properties to those already existing in the similarto file.
source
TeaSeis.labelsMethod
labels(io, i)

Returns the string label of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.labelsMethod
labels(io)

Returns the string labels corresponding to the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.leftjustify!Method
leftjustify(io, trcs, hdrs)

Left justify all live (non-dead) traces in a frame, moving them to the beginning of trcs and hdrs. See also regularize!

source
TeaSeis.lincsMethod
lincs(io,i)

Returns the logical increment of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.lincsMethod
lincs(io)

Returns the logical increments of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.lrangeMethod
lrange(io, i)

Returns the logical range of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.lrangeMethod
lrange(io)

Returns the logical ranges of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.lstartsMethod
lstarts(io,i)

Returns the logical start of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.lstartsMethod
lstarts(io)

Returns the logical start of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.pincsMethod
pincs(io, i)

Returns the physical increments of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.pincsMethod
pincs(io)

Returns the physical increments of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.propMethod
prop(io, propertyname[, proptype=Any])

Get a trace property from io::JSeis where propertyname is either String or TracePropertyDef. Note that if propertyname is a String, then this method produces a type-unstable result. For example:

io = jsopen("data.js")
p = prop(io, "REC_X")            # using a `String`, output type of prop is not inferred
p = prop(io, "REC_X", Float32)   # using a `String`, output type of prop is inferred using `Float32`
p = prop(io, stockprop[:REC_X])  # using a `TracePropertyDef`, output type of prop is inferred

Note that in the examples above, the string "RECX" can be replaced by the symbol `RECX`.

source
TeaSeis.propdefsMethod
propdefs(io, i)

Returns the property definition of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.propdefsMethod
propdefs(io)

Returns the property definitions of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.propsMethod
props(io, i)

Returns the trace property of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.propsMethod
props(io)

Returns the trace properties of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.pstartsMethod
pstarts(io, i)

Returns the physical start of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.pstartsMethod
pstarts(io)

Returns the physical start of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.readframe!Method
readframe!(io, trcs, hdrs, idx...)

In-place read of a single frame from a JavaSeis dataset. For non full frame, the resulting traces and headers are left justified. Examples:

3D:

io = jsopen("data_3D.js")
trcs, hdrs = allocframe(io)
frm_idx = 1
readframe!(io, trcs, hdrs, frm_idx)

4D:

io = jsopen("data_4D.js")
trcs, hdrs = allocframe(io)
frm_idx, vol_idx = 1, 1
readframe!(io, trcs, hdrs, frm_idx, vol_idx)

5D:

io = jsopen("data_5D.js")
trcs, hdrs = allocframe(io)
frm_idx, vol_idx, hyp_idx = 1, 1, 1
readframe!(io, trcs, hdrs, frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readframeMethod
readframe(io, idx...)

Out-of-place read of a single frame from a JavaSeis dataset. For non full frame, the resulting traces and headers are left justified. Examples:

3D:

frm_idx = 1
trcs, hdrs = readframe(jsopen("data_3D.js"), frm_idx)

4D:

frm_idx, vol_idx = 1, 1
trcs, hdrs = readframe(jsopen("data_4D.js"), frm_idx, vol_idx)

5D:

frm_idx, vol_idx, hyp_idx = 1, 1, 1
trcs, hdrs = readframe(jsopen("data_5D.js"), frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readframehdrs!Method
readframehdrs!(io, hdrs, idx...)

In-place read of a single frame from a JavaSeis dataset (headers only). For non full frame, the resulting headers are left justified. Examples:

3D:

io = jsopen("data_3D.js")
hdrs = allocframehdrs(io)
frm_idx = 1
readframehdrs!(io, hdrs, frm_idx)

4D:

io = jsopen("data_4D.js")
hdrs = allocframehdrs(io)
frm_idx, vol_idx = 1, 1
readframehdrs!(io, hdrs, frm_idx, vol_idx)

5D:

io = jsopen("data_5D.js")
hdrs = allocframehdrs(io)
frm_idx, vol_idx, hyp_idx = 1, 1, 1
readframehdrs!(io, hdrs, frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readframehdrsMethod

readframehdrs(io, idx...)

Out-of-place read of a single frame (headers only) from a JavaSeis dataset. For non full frame, the resulting headers are left justified. Examples:

3D:

frm_idx = 1
hdrs = readframehdrs(jsopen("data_3D.js"), frm_idx)

4D:

frm_idx, vol_idx = 1, 1
hdrs = readframehdrs(jsopen("data_4D.js"), frm_idx, vol_idx)

5D:

frm_idx, vol_idx, hyp_idx = 1, 1, 1
hdrs = readframehdrs(jsopen("data_5D.js"), frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readframetrcs!Method
readframetrcs!(io, trcs, hdrs, idx...)

In-place read of a single frame from a JavaSeis dataset (traces only). For non full frame, the resulting traces are left justified. Examples:

3D:

io = jsopen("data_3D.js")
trcs = allocframetrcs(io)
frm_idx = 1
readframetrcs!(io, trcs, frm_idx)

4D:

io = jsopen("data_4D.js")
trcs = allocframetrcs(io)
frm_idx, vol_idx = 1, 1
readframetrcs!(io, trcs, frm_idx, vol_idx)

5D:

io = jsopen("data_5D.js")
trcs = allocframetrcs(io)
frm_idx, vol_idx, hyp_idx = 1, 1, 1
readframetrcs!(io, trcs, frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readframetrcsMethod
readframetrcs(io, idx...)

Out-of-place read of a single frame (traces only) from a JavaSeis dataset. For non full frame, the resulting traces are left justified. Examples:

3D:

frm_idx = 1
trcs = readframetrcs(jsopen("data_3D.js"), frm_idx)

4D:

frm_idx, vol_idx = 1, 1
trcs = readframetrcs(jsopen("data_4D.js"), frm_idx, vol_idx)

5D:

frm_idx, vol_idx, hyp_idx = 1, 1, 1
trcs = readframetrcs(jsopen("data_5D.js"), frm_idx, vol_idx, hyp_idx)
source
TeaSeis.readhdrs!Method
readhdrs!(io, hdrs, smp_range, trace_range, range...)

In-place read of a subset of data (headers only) from a JavaSeis file. If performance is important, then consider using readframehdrs! instead. Examples:

3D:

readhdrs!(jsopen("data_3D.js"), hdrs, :, :, :)
readhdrs!(jsopen("data_3D.js"), hdrs, :, 1:2:end, 1:5)

4D:

readhdrs!(jsopen("data_4D.js"), hdrs, :, :, :, :)
readhdrs!(jsopen("data_4D.js"), hdrs, :, :, 2, 2:2:10)

5D:

readhdrs!(jsopen("data_5D.js"), hdrs, :, :, :, :, :)
readhdrs!(jsopen("data_5D.js"), hdrs, :, :, 2, 2:2:10, 1:10)
source
TeaSeis.readhdrsMethod
readhdrs(io, trace_range, range...)

Out-of-place read of a subset of data (headers only) from a JavaSeis file. Returns an array of trace data. If performance is important, then consider using readframetrcs instead. Examples:

3D:

hdrs = readhdrs(jsopen("data_3D.js"), :, :, :)
hdrs = readhdrs(jsopen("data_3D.js"), :, 1:2:end, 1:5)

4D:

hdrs = readhdrs(jsopen("data_4D.js"), :, :, :, :)
hdrs = readhdrs(jsopen("data_4D.js"), :, :, 2, 2:2:10)

5D:

hdrs = readhdrs(jsopen("data_5D.js"), :, :, :, :, :)
hdrs = readhdrs(jsopen("data_5D.js"), :, :, 2, 2:2:10, 1:10)
source
TeaSeis.readtrcs!Method
readtrcs!(io, trcs, sample_range, trace_range, range...)

In-place read of a subset of data (traces only) from a JavaSeis file. If performance is important, then consider using readframetrcs! instead. Examples:

3D:

readtrcs!(jsopen("data_3D.js"), trcs, :, :, :)
readtrcs!(jsopen("data_3D.js"), trcs, :, 1:2:end, 1:5)

4D:

readtrcs!(jsopen("data_4D.js"), trcs, :, :, :, :)
readtrcs!(jsopen("data_4D.js"), trcs, :, :, 2, 2:2:10)

5D:

readtrcs!(jsopen("data_5D.js"), trcs, :, :, :, :, :)
readtrcs!(jsopen("data_5D.js"), trcs, :, :, 2, 2:2:10, 1:10)
source
TeaSeis.readtrcsMethod
readtrcs(io, sample_range, trace_range, range...)

Out-of-place read of a subset of data (traces only) from a JavaSeis file. Returns an array of trace data. If performance is important, then consider using readframetrcs instead. Examples:

3D:

trcs = readtrcs(jsopen("data_3D.js"), :, :, :)
trcs = readtrcs(jsopen("data_3D.js"), :, 1:2:end, 1:5)

4D:

trcs = readtrcs(jsopen("data_4D.js"), :, :, :, :)
trcs = readtrcs(jsopen("data_4D.js"), :, :, 2, 2:2:10)

5D:

trcs = readtrcs(jsopen("data_5D.js"), :, :, :, :, :)
trcs = readtrcs(jsopen("data_5D.js"), :, :, 2, 2:2:10, 1:10)
source
TeaSeis.regularize!Method
regularize!(io, trcs, hdrs)

Regularize the traces in a frame, moving them from their left-justified state, to one that reflects their trace location within a frame according to their trace framework definition.

source
TeaSeis.set!Method
set!(prop, hdrs, i, value)

Set the value of the trace property prop::TraceProperty stored in the header of the ith column of hdrs::Array{UInt8,2} to value::T. For example, io=jsopen("test.js"); hdrs=readframehdrs(io,1); set!(prop(io,"REC_X"), 1, 10.0).

source
TeaSeis.unitsMethod
units(io, i)

Returns the unit of measure of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.unitsMethod
units(io)

Returns the unit of measure of the framework axes of the JavaSeis dataset corresponding to io::JSeis.

source
TeaSeis.writeframeMethod
writeframe(io, trcs, hdrs)

Write a frame of data to the JavaSeis dataset corresponding to io::JSeis. trcs and hdrs are 2-dimensional arrays. The location of the dataset written to is determined by the values of the framework headers stored in hdrs.

source
TeaSeis.writeframeMethod
writeframe(io, trcs, idx...)

Write a frame of data to the JavaSeis dataset corresponding to io::JSeis. trcs is a 2-dimensional array. The location of the datset written to is determined by idx.... For example:

3D:

writeframe(jsopen("data_3D.js"), trcs, 1) # write to frame 1

4D:

writeframe(jsopen("data_4D.js"), trcs, 1, 2) # write to frame 1, volume 2

5D:

writeframe(jsopen("data_5D.js"), trcs, 1, 2, 3) # write to frame 1, volume 2, hypercube 3
source

Index