Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDF export error #82

Open
a-cakir opened this issue Jul 24, 2023 · 0 comments
Open

EDF export error #82

a-cakir opened this issue Jul 24, 2023 · 0 comments
Assignees

Comments

@a-cakir
Copy link

a-cakir commented Jul 24, 2023

Putting this here so I dont forget to come back to it.

Running a signal with NaNs in them lead to the error below:

Got exception outside of a @test
  InexactError: trunc(Int16, NaN)
  Stacktrace:
    [1] trunc
      @ ./float.jl:760 [inlined]
    [2] round
      @ ./float.jl:359 [inlined]
    [3] encode_sample
      @ ~/.julia/packages/Onda/RFXm5/src/samples.jl:183 [inlined]
    [4] encode_sample
      @ ~/.julia/packages/Onda/RFXm5/src/samples.jl:180 [inlined]
    [5] _broadcast_getindex_evalf
      @ ./broadcast.jl:670 [inlined]
    [6] _broadcast_getindex
      @ ./broadcast.jl:653 [inlined]
    [7] getindex
      @ ./broadcast.jl:597 [inlined]
    [8] macro expansion
      @ ./broadcast.jl:961 [inlined]
    [9] macro expansion
      @ ./simdloop.jl:77 [inlined]
   [10] copyto!
      @ ./broadcast.jl:960 [inlined]
   [11] copyto!
      @ ./broadcast.jl:913 [inlined]
   [12] materialize!
      @ ./broadcast.jl:871 [inlined]
   [13] materialize!(dest::Matrix{Int16}, bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Nothing, typeof(Onda.encode_sample), Tuple{Base.RefValue{Type{Int16}}, Float64, Float64, Matrix{Float64}}})
      @ Base.Broadcast ./broadcast.jl:868
   [14] broadcast!(::typeof(Onda.encode_sample), ::Matrix{Int16}, ::Type, ::Float64, ::Float64, ::Matrix{Float64})
      @ Base.Broadcast ./broadcast.jl:837
   [15] encode!
      @ ~/.julia/packages/Onda/RFXm5/src/samples.jl:281 [inlined]
   [16] encode(::Type{Int16}, sample_resolution_in_unit::Float64, sample_offset_in_unit::Float64, sample_data::Matrix{Float64}, dither_storage::Nothing)
      @ Onda ~/.julia/packages/Onda/RFXm5/src/samples.jl:243
   [17] encode(samples::Samples{Matrix{Float64}}, dither_storage::Nothing)
      @ Onda ~/.julia/packages/Onda/RFXm5/src/samples.jl:313
   [18] encode
      @ ~/.julia/packages/Onda/RFXm5/src/samples.jl:312 [inlined]
   [19] reencode_samples(samples::Samples{Matrix{Float64}}, sample_type::Type{Int16})
      @ OndaEDF ~/.julia/packages/OndaEDF/0ybPL/src/export_edf.jl:177
   [20] onda_samples_to_edf_signals(onda_samples::Vector{Samples}, seconds_per_record::Float64)
      @ OndaEDF ~/.julia/packages/OndaEDF/0ybPL/src/export_edf.jl:184
@a-cakir a-cakir self-assigned this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant