Skip to content

Determining bins #11

@matthewrankin

Description

@matthewrankin

Currently in the stft function, bins are determined using:

start_freq_bin = int((start_plot_freq - freq_vector[0]) / hz_per_freq_bin

Is it correct to just use int() and not perform some type of rounding? Seems like we would want to use a floor function for determining the start_freq_bin and a ceiling function for determining the stop_freq_bin so that the bins are inclusive.

Also, how does the bin width play into this? For a bin width of 10 Hz, if you want 12 Hz, then that would be the second bin:

  • First bin = 0 Hz +/-5Hz
  • Second bin = 10 Hz +/-5Hz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions