aspcore.utilities

Functions

block_process_idxs(num_samples, block_size, ...)

Yields the starting index for each block, for block processing a signal

get_smallest_coprime(N)

Get the smallest value that is coprime with N

get_time_string([detailed])

Returns a string with the current time in the format 'year_month_day_hour_minute'

get_unique_folder(prefix, parent_folder[, ...])

Returns a unique folder name in the parent folder with the prefix and the current time

is_integer(x)

Returns True if x is an integer, False otherwise

is_power_of_2(x)

Returns True if x is a power of 2, False otherwise

next_divisible(divisor, min_value)

Gives the smallest integer divisible by divisor, that is strictly larger than min_value

next_power_of_two(x)

Returns the smallest number that is both a power of two and larger or equal to x.

power_of_filtered_signal(src, ir, num_samples)

Returns an estimate of average power of the signal after filtered through an impulse response

save_plot(print_method, folder[, name])

Save plot to file in a number of formats.

set_basic_plot_look(ax)

Sets basic look for a plot.

simplify_ratio(a, b)

Simplifies the ratio a/b into the simplest possible ratio where both numerator and denominator are integers

Classes

EventCounter(event_def)

An index counter to keep track of events that should only happen every x samples

PhaseCounter(phase_lengths[, verbose])

An index counter to keep track of non-overlapping continous phases