question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inverse of logamplitude?

See original GitHub issue

librosa.logamplitude is great! How about also having an inverse available? E.g. something like:

def linearamplitude(log_S, ref_power=1.0)
    """Linear-scale the amplitude of a spectrogram."""
    return 10 ** (log_S / 10 + np.log10(ref_power))

I guess it wouldn’t be exact though, but still useful in some cases maybe?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
bmcfeecommented, Dec 6, 2016

Before I go hacking on this, does this sound like a reasonable set of changes?

  • logamplitude renamed to power_to_db; an alias included for backwards compatibility
  • new function amplitude_to_dbwhich just wraps power_to_db(X**2)
  • inverse functions db_to_amplitude and db_to_power defined accordingly
2reactions
dpwecommented, Oct 19, 2016

On Wed, Oct 19, 2016 at 10:26 AM, Carl Thomé notifications@github.com wrote:

I’M CONFUSED. [image: 🐰]

So this is why logamplitude() is called with S**2 throughout the docs? To make magnitudes into power? Always been a bit confused by this actually.

Exactly.

DAn.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/librosa/librosa/issues/421#issuecomment-254829114, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhs0bwicvm16_tt20NEkjp2nhYrcJNkks5q1iipgaJpZM4Ka9si .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog — librosa 0.10.0.dev0 documentation
#1322 librosa.feature.inverse.mel_to_audio now infers hop_length by default in a ... logamplitude is deprecated in favor of amplitude_to_db or power_to_db.
Read more >
Log-amplitude cumulants and parameter estimation for Beck-Cohen ...
Abstract: To characterize non-Gaussian stochastic processes, we introduce log-amplitude cumulants which is capable of quantifying systematic deviations from ...
Read more >
Log-amplitude statistics for Beck-Cohen superstatistics - PubMed
To characterize the variance heterogeneity, we define log-amplitude ... Furthermore, we show that χ(2) and inverse χ(2) superstatistics with degree 2 are ...
Read more >
Log-amplitude statistics for Beck-Cohen superstatistics
Furthermore, we show that χ2 and inverse χ2 superstatistics with degree 2 are closely related to an extreme value distribution, ...
Read more >
FE and FD logamplitude and amplitude ratio shown for site 4 ...
An algorithm is presented for the inversion of marine con-trolled-source electromagnetic CSEM data that uses a 2D finite difference FD forward driver. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found