Closed tclements closed 4 years ago
Checking now.
The error is thrown on the first packet from C0.HAYD.00.LHZ. From your MWE, I can reproduce with:
get_data("FDSN",stationlist[155:155],s=startdate,t=enddate+Day(1),v=3)
The issue is that the mini-SEED parser implicitly assumes a Float32 data vector in each channel of a SeisData structure. I don't think I should be assuming that, though.
Three potential solutions. Any preference?
unsafe_copyto!
statement to copyto!
. Slows parsing but preserves the data type of a channel when one parses mini-SEED into it.parserec!
, but that's one primitive call (e.g. eltype
or sizeof
) every time I parse a blockette. That might slow performance a little.parsemseed!
. Yet that only works if nothing in parserec!
produces (or converts to) a channel where :x
is Float64.I'll be able to tell you how much each solution affects performance in a bit. Testing and benchmarking.
I'm thinking either placing this check in parserec!
or parsemseed!
would be preferable. I expect the performance overhead for a call to eltype
or sizeof
would be on the order of nanoseconds per blockette.
This will sound strange, but I find no appreciable performance change if I change unsafe_copyto!
to copyto
. Should I benchmark the other two ideas, or just use this solution?
Going with copyto
sounds good to me!
Sorry for the delay on this. My tests are running into an unrelated issue with IRIS timeseries requests and I'm waiting for resolution before pushing to master.
Okay, IRIS has confirmed that the IRISWS timeseries issue is unrelated, but I need to make a few test changes before I can push this live (otherwise my automated tests fail). Hopefully this is all fixed tonight.
I've finally found the change to IRISWS timeseries that was breaking my tests, so commits are getting pushed to master again. The change that fixes this issue should now be fixed on the master branch.
Made one final change due to a weird bug that showed up while investigating this. Everything related to this issue should be fixed on master. If you're using only release versions, you can expect a minor version increment with these fixes in it later this week.
I'm doing a sizeable download (500+ stations, list attached) using
get_data
.I'm using SeisIO v1.0.0 and Julia 1.4, this is also fails on master. Code to reproduce:
This fails due to
unsage_copyto!
trying to copyFloat32
data to aFloat64
array. Looks likex
is aFloat64
array whilegetfield(BUF, :x)
is aFloat32
array at line 265 in 2_parserec.jl.I don't know which station this is failing for.
stationlist.txt