Skip to content

Commit

Permalink
Issue #54
Browse files Browse the repository at this point in the history
  • Loading branch information
jpjones76 committed Aug 12, 2020
1 parent 9e6977b commit c903059
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2020-08-11
* Automated testing for Julia v.1.4 has ended. Tested versions of the language include v1.0 (LTS) and v1.5 (stable).
* Added tests for processing functions on a NodalData object; tests Issue #54
* Changed internal function dtr! to accept `::AbstractArray{T,1}` in first
positional argument; fixes Issue #54

# 2020-07-15
Added SeisIO.Nodal for reading data files from nodal arrays
* New types:
Expand Down
2 changes: 1 addition & 1 deletion src/Processing/detrend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ demean(S::GphysData,
irr::Bool=false) = (U = deepcopy(S); demean!(U, chans=chans, irr=irr); return U)
demean(C::GphysChannel) = (U = deepcopy(C); demean!(U); return U)

function dtr!(x::Array{T,1}, ti::Array{Int64,2}, fs::Float64, n::Int64) where T <: AbstractFloat
function dtr!(x::AbstractArray{T,1}, ti::Array{Int64,2}, fs::Float64, n::Int64) where T <: AbstractFloat
L = length(x)

# check for nans
Expand Down
1 change: 1 addition & 0 deletions src/Submodules/Nodal/Utils/merge.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
merge_ext!(S::NodalData, Ω::Int64, rest::Array{Int64, 1}) = nothing
1 change: 1 addition & 0 deletions src/Submodules/Nodal/imports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import SeisIO: BUF,
dtconst,
flat_resp,
loctyp2code,
merge_ext!,
mk_t,
mkxstr,
parsetimewin,
Expand Down
10 changes: 10 additions & 0 deletions test/Nodal/test_processing.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
printstyled(" processing of NodalData\n", color=:light_green)

fstr = path*"/SampleFiles/Nodal/Node1_UTC_20200307_170738.006.tdms"
S1 = read_nodal(fstr)

# these should all work
for f in (:convert_seis!, :demean!, :detrend!, :filtfilt!, :merge!, :sync!, :taper!, :ungap!, :unscale!)
printstyled(string(" ", f, "\n"), color=:light_green)
getfield(SeisIO, f)(S1)
end

0 comments on commit c903059

Please sign in to comment.