Skip to content

Commit

Permalink
add \ns
Browse files Browse the repository at this point in the history
  • Loading branch information
wheeheee committed Nov 29, 2023
1 parent 45a534f commit 8c46223
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/filt_stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function test_singlerate(h, x)
@printfifinteractive( "____ _ _ _ ____ _ ____ ____ ____ ___ ____\n" )
@printfifinteractive( "[__ | |\\ | | __ | |___ |__/ |__| | |___\n" )
@printfifinteractive( "___] | | \\| |__] |___ |___ | \\ | | | |___\n" )
@printfifinteractive( "\nTesting single-rate filtering, h::%s, x::%s. xLen = %d, hLen = %d", typeof(h), typeof(x), xLen, hLen )
@printfifinteractive( "\nTesting single-rate filtering, h::%s, x::%s. xLen = %d, hLen = %d\n", typeof(h), typeof(x), xLen, hLen )

@printfifinteractive( "\n\tfilt\n\t\t")
@timeifinteractive naiveResult = filt(h, 1.0, x)
Expand Down Expand Up @@ -130,7 +130,7 @@ function test_decimation(h, x, decimation)
@printfifinteractive( "___ ____ ____ _ _ _ ____ ___ _ ____ _ _ \n" )
@printfifinteractive( "| \\ |___ | | |\\/| |__| | | | | |\\ | \n" )
@printfifinteractive( "|__/ |___ |___ | | | | | | | |__| | \\| \n" )
@printfifinteractive( "\nTesting decimation. h::%s, x::%s. xLen = %d, hLen = %d, decimation = %d", typeof(h), typeof(x), xLen, hLen, decimation )
@printfifinteractive( "\nTesting decimation. h::%s, x::%s. xLen = %d, hLen = %d, decimation = %d\n", typeof(h), typeof(x), xLen, hLen, decimation )

@printfifinteractive( "\n\tNaive decimation\n\t\t")
@timeifinteractive naiveResult = naivefilt(h, x, 1//decimation)
Expand Down Expand Up @@ -180,7 +180,7 @@ function test_interpolation(h::AbstractVector{T}, x::AbstractVector{V}, interpol
@printfifinteractive( "_ _ _ ___ ____ ____ ___ _ ____ ____ ___ _ ____ _ _ \n" )
@printfifinteractive( "| |\\ | | |___ |__/ |__] | | | |__| | | | | |\\ | \n" )
@printfifinteractive( "| | \\| | |___ | \\ | |___ |__| | | | | |__| | \\| \n" )
@printfifinteractive( "\nTesting interpolation, h::%s, x::%s. xLen = %d, hLen = %d, interpolation = %d", typeof(h), typeof(x), xLen, hLen, interpolation )
@printfifinteractive( "\nTesting interpolation, h::%s, x::%s. xLen = %d, hLen = %d, interpolation = %d\n", typeof(h), typeof(x), xLen, hLen, interpolation )

@printfifinteractive( "\n\tNaive interpolation with filt\n\t\t")
@timeifinteractive begin
Expand Down Expand Up @@ -243,7 +243,7 @@ function test_rational(h, x, ratio)
@printfifinteractive( "____ ____ ____ ____ _ _ ___ _ _ _ _ ____\n" )
@printfifinteractive( "|__/ |___ [__ |__| |\\/| |__] | | |\\ | | __\n" )
@printfifinteractive( "| \\ |___ ___] | | | | | |___ | | \\| |__]\n" )
@printfifinteractive( "\n\nTesting rational resampling, h::%s, x::%s. xLen = %d, hLen = %d, ratio = %d//%d", typeof(h), typeof(x), xLen, hLen, upfactor, downfactor )
@printfifinteractive( "\n\nTesting rational resampling, h::%s, x::%s. xLen = %d, hLen = %d, ratio = %d//%d\n", typeof(h), typeof(x), xLen, hLen, upfactor, downfactor )

@printfifinteractive( "\n\tNaive rational resampling\n\t\t")
@timeifinteractive naiveResult = naivefilt(h, x, ratio)
Expand Down Expand Up @@ -289,10 +289,11 @@ function test_arbitrary(Th, x, resampleRate, numFilters)
myfilt = FIRFilter(h, resampleRate, numFilters)
xLen = length(x)

@printfifinteractive("\n\n")
@printfifinteractive( "____ ____ ___ ____ ____ ____ ____ _ _ ___ _ _ _ _ ____\n" )
@printfifinteractive( "|__| |__/ |__] |__/ |___ [__ |__| |\\/| |__] | | |\\ | | __\n" )
@printfifinteractive( "| | | \\ |__] . | \\ |___ ___] | | | | | |___ | | \\| |__]\n" )
@printfifinteractive( "\n\nh::%s, x::%s, rate = %f, Nϕ = %d, xLen = %d, ", typeof(h), typeof(x), resampleRate, numFilters, length(x) )
@printfifinteractive( "\nh::%s, x::%s, rate = %f, Nϕ = %d, xLen = %d\n", typeof(h), typeof(x), resampleRate, numFilters, xLen )

@printfifinteractive( "\n\tNaive arbitrary resampling\n\t\t" )
@timeifinteractive naiveResult = naivefilt(h, x, resampleRate, numFilters)
Expand Down

0 comments on commit 8c46223

Please sign in to comment.