Questions tagged [spectrum]

The frequency domain of a wave-like function.

Spectrum refers to the full range of all frequencies of electromagnetic radiation. Spectrum has since been applied by analogy to topics outside of electromagnetic radiation. For a complete discussion, see the Wikipedia Spectrum article

389 questions
3
votes
4 answers

Signal amplitude against time in Java

I'm racking my brain in order to solve a knotty problem (at least for me). While playing an audio file (using Java) I want the signal amplitude to be displayed against time. I mean I'd like to implement a small panel showing a sort of oscilloscope…
wsr74ws84
  • 31
  • 1
  • 2
3
votes
2 answers

Spectral Entropy and Spectral Energy of a vector in Matlab

I am going to use Spectral Energy and Spectral Entropy as features for window-based time-series data. However, I'm bit confused about the formula being used for it online, especially about the the special Entropy. I used entropy from Matlab but…
utengr
  • 3,225
  • 3
  • 29
  • 68
3
votes
2 answers

Access to audio buffer in MediaPlayer

I'm working on Android project in which I must analyze audio signals in frequency domain. Actually I have ready module which is reading signal from device microphone and process it (FFT, visualizations, etc.) and I don't have any problems with this…
Gie
  • 1,907
  • 2
  • 24
  • 49
3
votes
1 answer

Phase spectrum of sine wave with Matlab

I'm trying to plot a phase spectrum of sine wave with Matlab. Below I attach code, I can't attach diagrams due to the lack of reputations. As magnitude spectrum seems to be good, the phase spectrum seems to be uncorrect, it's like a noise. Do you…
Pawel
  • 29
  • 1
  • 3
3
votes
1 answer

Plotting time vs frequency in matlab

I am trying to find a way to create a graph that shows an audio wave and its time-frequency data (time on x-axis, wave energy and frequency data on y-axis). I have this code that does it on two separate plots: [audio, fs] =…
Cbas
  • 6,003
  • 11
  • 56
  • 87
2
votes
2 answers

Unexpected result from discrete fourier spectrum analysis of sine-sample

http://jvalentino2.tripod.com/dft/index.html My code is really just a copy of the above: package it.vigtig.realtime.fourier; import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import…
Felix
  • 8,385
  • 10
  • 40
  • 59
2
votes
1 answer

Swift. frequency of sound got from vDSP.DCT output differs from iPhone and iPad

I'm trying to figure out the amplitude of each frequency of sound captured by microphone. Just like this example https://developer.apple.com/documentation/accelerate/visualizing_sound_as_an_audio_spectrogram I captured sample from microphone to…
dpr
  • 319
  • 1
  • 6
2
votes
1 answer

waterfall: HTML Canvas Waterfall and Spectrum Plot

I was trying to Build a spectrum and waterfall Plot HTML canvas. After a long research and googling i found this SOURCE CODE Now i am trying to learn how this code works. i added 3 points on the spectrum using drawPoint2 function. Can some one…
Ayaz
  • 67
  • 1
  • 9
2
votes
0 answers

Why shift, take absolute value and perform log transform to the frequency spectrum of an image obtained by fft2 in MATLAB?

I have to obtain the frequency spectrum of a grayscale image using FFT in MATLAB and plot the spectrum. I used fft2() and plotted the output. I watched a tutorial on plotting frequency spectrum and in that, they perform fftshit(), take the absolute…
lauren
  • 33
  • 3
2
votes
2 answers

Drawing spectrum of an image in C++ (fftw, OpenCV)

I'm trying to create a program that will draw a 2d greyscale spectrum of a given image. I'm using OpenCV and FFTW libraries. By using tips and codes from the internet and modifying them I've managed to load an image, calculate fft of this image and…
Narren
  • 21
  • 1
  • 2
2
votes
2 answers

Finding if there are n data points in a row that are less than a certain number

I am working with a spectrum in Python and I have fit a line to that spectrum. I want a code that can detect if there have been let's say, 10, data points on the spectrum in a row that are less than the fitted line. Does anyone know how a simple and…
qwerties
  • 31
  • 4
2
votes
0 answers

Generating new 2D data using power spectrum density function from spatial frequency domain via ifft?

This is my first post so apologies for any formatting related issues. So I have a dataset which was obtained from an atomic microscope. The data looks like a 1024x1024 matrix which is composed of different measurements taken from the sample in units…
2
votes
1 answer

Multi-taper Spectral Analysis with spectrum in python

I'm using the multi-taper analysis using the spectrum library on python (https://pyspectrum.readthedocs.io/en/latest/install.html), but I can't understand fully the amplitude of the output. Here a piece of code for illustration: from spectrum import…
2
votes
0 answers

Spectrum Scan Error copy parquet file Redshift

I have a copy statement from a parquet file such as: COPY schema.table FROM 's3://bucket/folder/' IAM_ROLE 'MyRole' FORMAT AS PARQUET ; The MyRole policy is: resource "aws_iam_policy" "PolicyMyRole" { name = "MyRole" path = "/" policy =…
mrc
  • 2,845
  • 8
  • 39
  • 73
2
votes
0 answers

How can I find envelop of FFT spectrum?

Here is my FFT result. Whole spectrum graph Zoom In graph There are so many noisy points, and I want to get a simple envelop line of the result. I have used the find_peaks function, but it was not working well. peaks2, _ = find_peaks(Xk1_shift,…
JHLee
  • 41
  • 3