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

ENH: Add ability to specify function/callable to make spectrogram during prep step #684

Open
4 tasks
NickleDave opened this issue Jul 18, 2023 · 0 comments
Open
4 tasks

Comments

@NickleDave
Copy link
Collaborator

NickleDave commented Jul 18, 2023

To be able to replicate results from some models, e.g. Sainburg et al 2020 and Goffinet 2021, it would be good to use the exact functions they use to compute spectrogram. This could also be helpful for users more generally.

We should achieve this by allowing a user to specify the callable / function to use to make spectrograms.

I imagine in a config this would look something like

[vak.prep.unit_dataset]
spect_maker = 'avgn.signal_processing.spectrograms.make_spec'
[vak.prep.unit_dataset.spect_params]
nperseg = 512
noverlap = 64

Where spect_params can be any kwargs that are passed into the Callable specified by spect_maker

Under the hood we will need to do

  • make sure we can import the callable
  • document what makes it possible to do so, i.e., have it installed or have it in the current working directory
  • determine dynamically if it's a class we need to instantiate -- can we do this? I think yes, with isclass
  • pass spect_params into the spect_maker

We should probably do this at the same time we switch to using vocalpy as a backend in the prep step as in #558

@NickleDave NickleDave changed the title ENH: Add ability to specify spectrogram function with vocalpy to prep step ENH: Add ability to specify function/callable to make spectrogram during prep step Jul 18, 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