Reference
Base.Filesystem.cp — Methodcp(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.
Base.Filesystem.mv — Methodmv(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.
Base.Filesystem.rm — Methodrm(io)Remove a JavaSeis dataset from disk. For example: rm(jsopen("deleteme.js"))
Base.close — Methodclose(io)Close an open JavaSeis dataset where io is of type JSeis created using, for example, jsopen.
Base.copy! — Methodcopy!(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)Base.empty! — Methodempty!(io)Empty a JavaSeis dataset from disk, retaining the meta-information. For example: empty!(jsopen("emptyme.js"))
Base.get — Methodget(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).
Base.get — Methodget(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])
Base.in — Methodin(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.
Base.isempty — Methodisempty(io)Returns true if the dataset correpsonding to io is empty (contains no data), and false otherwise.
Base.length — Methodlength(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.
Base.ndims — Methodndims(io)Returns the numbers of dimensions of the JavaSeis dataset corresponding to io::JSeis.
Base.read! — Methodread!(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)Base.read — Methodread(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)Base.size — Methodsize(io, i)Returns the lenth of dimension i of a JavaSeis dataset corresponding to io::JSeis.
Base.size — Methodsize(io)Returns the lenths of all dimensions (as a tuple of integers) of a JavaSeis dataset corresponding to io::JSeis.
Base.write — Functionwrite(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.
Base.write — Methodwrite(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, :, :, :, :, :)TeaSeis.allocframe — Methodallocframe(io)Allocate memory for one frame of JavaSeis dataset. Returns (Array{Float32,2},Array{UInt8,2}). For example, trcs, hdrs = allocframe(jsopen("data.js")).
TeaSeis.allocframehdrs — Methodallocframehdrs(io)
Allocate memory for headers for one frame of JavaSeis dataset. Returns Array{UInt8,2}. For example, hdrs = allocframehdrs(jsopen("data.js")).
TeaSeis.allocframetrcs — Methodallocframetrcs(io)
Allocate memory for traces for one frame of JavaSeis dataset. Returns Array{Float32,2}. For example, trcs = allocframetrcs(jsopen("data.js")).
TeaSeis.dataproperty — Methoddataproperty(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").
TeaSeis.domains — Methoddomains(io, i)Returns the domain of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.domains — Methoddomains(io)Returns the domains of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.fold — Methodfold(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))
TeaSeis.fold — Methodfold(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.
TeaSeis.geometry — Methodgeometry(io)If io::JSeis contains a geometry definition, then return a geometry of type Geometry. Otherwise, return nothing.
TeaSeis.hasdataproperty — Methodhasdataproperty(io, label)return true if io::JSeis contains the data property corresponding to label. Otherwise, return false.
TeaSeis.ind2sub — Methodind2sub(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)...)
endTeaSeis.jscreate — Methodjscreate(filename)Create a JavaSeis dataset without opening it. This method has the same optional arguments as jsopen
TeaSeis.jsopen — Methodjsopen(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::StringAn 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::StringDescription of dataset, if not set, then a description is parsed from the filename.mapped::BoolIf the dataset is full (no missing frames/traces), then it may be more efficient to set this tofalse. Defaults totrue.datatype::StringExamples areCMP,SHOT, etc. If not set, thenUNKNOWNis used.dataformat::TypeChoose fromFloat32, andInt16. If not set, thenFloat32is used.dataorder::String(not supported)axis_lengths::Array{Int}size of each dimension (sample/trace/frame/volume/hypercube) of the JavaSeis data contextaxis_propdefs::Array{TracePropertyDef}Trace properties corresponding to JavaSeis axes. If not set, thenSAMPLE,TRACE,FRAME,VOLUMEandHYPRCUBEare used.axis_units::Array{String}Units corresponding to JavaSeis axes. e.g.SECONDS,METERS, etc. If not set, thenUNKNOWNis used.axis_domains::Array{String}Domains corresponding to JavaSeis axes. e.g.SPACE,TIME, etc. If not set, thenUNKNOWNis used.axis_lstarts::Array{Int}Logical origins for each axis. If not set, then1is used for the logical origin of each axis.axis_lincs::Array{Int}Logical increments for each axis. If not set, then1is used for the logical increments of each axis.axis_pstarts::Array{Float64}Physical origins for each axis. If not set, then0.0is used for the physical origin of each axis.axis_pincs::Array{Float64}Physical increments for each axis. If not set, then1.0is 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 inSSPROPS.md.properties::Array{TracePropertyDef}An array of custom data properties. One property per data-set rather than one property per trace as inpropertiesabove.geometry::GeometryAn 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::Int64The 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}Whensimilartois specified, use this to add trace properties to those already existing in thesimilartofile.properties_rm::Array{TracePropertyDef}Whensimilartois specified, use this to remove trace properties to those already existing in thesimilartofile.dataproperties_add::Array{DataProperty}Whensimilartois specfied, use this to add dataset properties to those aloready existing in thesimilartofile.dataproperties_rm::Array{DataProperty}Whensimilartois specified, use this to remove dataset properties to those already existing in thesimilartofile.
TeaSeis.jsopen — Methodjsopen(filename)Equivalent to jsopen(filename, "r")
TeaSeis.labels — Methodlabels(io, i)Returns the string label of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.labels — Methodlabels(io)Returns the string labels corresponding to the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.leftjustify! — Methodleftjustify(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!
TeaSeis.lincs — Methodlincs(io,i)Returns the logical increment of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.lincs — Methodlincs(io)Returns the logical increments of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.lrange — Methodlrange(io, i)Returns the logical range of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.lrange — Methodlrange(io)Returns the logical ranges of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.lstarts — Methodlstarts(io,i)Returns the logical start of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.lstarts — Methodlstarts(io)Returns the logical start of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.pincs — Methodpincs(io, i)Returns the physical increments of the framework axes for dimension i of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.pincs — Methodpincs(io)Returns the physical increments of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.prop — Methodprop(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 inferredNote that in the examples above, the string "RECX" can be replaced by the symbol `RECX`.
TeaSeis.propdefs — Methodpropdefs(io, i)Returns the property definition of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.propdefs — Methodpropdefs(io)Returns the property definitions of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.props — Methodprops(io, i)Returns the trace property of the ith framework axis of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.props — Methodprops(io)Returns the trace properties of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.pstarts — Methodpstarts(io, i)Returns the physical start of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.pstarts — Methodpstarts(io)Returns the physical start of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.readframe! — Methodreadframe!(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)TeaSeis.readframe — Methodreadframe(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)TeaSeis.readframehdrs! — Methodreadframehdrs!(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)TeaSeis.readframehdrs — Methodreadframehdrs(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)TeaSeis.readframetrcs! — Methodreadframetrcs!(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)TeaSeis.readframetrcs — Methodreadframetrcs(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)TeaSeis.readhdrs! — Methodreadhdrs!(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)TeaSeis.readhdrs — Methodreadhdrs(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)TeaSeis.readtrcs! — Methodreadtrcs!(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)TeaSeis.readtrcs — Methodreadtrcs(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)TeaSeis.regularize! — Methodregularize!(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.
TeaSeis.set! — Methodset!(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).
TeaSeis.units — Methodunits(io, i)Returns the unit of measure of the ith dimension of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.units — Methodunits(io)Returns the unit of measure of the framework axes of the JavaSeis dataset corresponding to io::JSeis.
TeaSeis.writeframe — Methodwriteframe(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.
TeaSeis.writeframe — Methodwriteframe(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 14D:
writeframe(jsopen("data_4D.js"), trcs, 1, 2) # write to frame 1, volume 25D:
writeframe(jsopen("data_5D.js"), trcs, 1, 2, 3) # write to frame 1, volume 2, hypercube 3Index
Base.Filesystem.cpBase.Filesystem.mvBase.Filesystem.rmBase.closeBase.copy!Base.empty!Base.getBase.getBase.inBase.isemptyBase.lengthBase.ndimsBase.readBase.read!Base.sizeBase.sizeBase.writeBase.writeTeaSeis.allocframeTeaSeis.allocframehdrsTeaSeis.allocframetrcsTeaSeis.datapropertyTeaSeis.domainsTeaSeis.domainsTeaSeis.foldTeaSeis.foldTeaSeis.geometryTeaSeis.hasdatapropertyTeaSeis.ind2subTeaSeis.jscreateTeaSeis.jsopenTeaSeis.jsopenTeaSeis.labelsTeaSeis.labelsTeaSeis.leftjustify!TeaSeis.lincsTeaSeis.lincsTeaSeis.lrangeTeaSeis.lrangeTeaSeis.lstartsTeaSeis.lstartsTeaSeis.pincsTeaSeis.pincsTeaSeis.propTeaSeis.propdefsTeaSeis.propdefsTeaSeis.propsTeaSeis.propsTeaSeis.pstartsTeaSeis.pstartsTeaSeis.readframeTeaSeis.readframe!TeaSeis.readframehdrsTeaSeis.readframehdrs!TeaSeis.readframetrcsTeaSeis.readframetrcs!TeaSeis.readhdrsTeaSeis.readhdrs!TeaSeis.readtrcsTeaSeis.readtrcs!TeaSeis.regularize!TeaSeis.set!TeaSeis.unitsTeaSeis.unitsTeaSeis.writeframeTeaSeis.writeframe