Skip to content

Commit

Permalink
More error checking for ProportionalBandSpectrumWithTime
Browse files Browse the repository at this point in the history
  • Loading branch information
dingraha committed May 3, 2024
1 parent 5e825c0 commit 6033f59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/proportional_bands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ struct ProportionalBandSpectrumWithTime{NO,TF,TPBS<:AbstractVector{TF},TBandsC<:

function ProportionalBandSpectrumWithTime(pbs, cbands::AbstractProportionalBands{NO,:center}, dt, t) where {NO}
length(pbs) == length(cbands) || throw(ArgumentError("length(pbs) must match length(cbands)"))
dt > zero(dt) || throw(ArgumentError("dt must be positive"))

return new{NO,eltype(pbs),typeof(pbs),typeof(cbands),typeof(dt),typeof(t)}(pbs, cbands, dt, t)
end
Expand Down

0 comments on commit 6033f59

Please sign in to comment.