spectrum

nls when the data is a convoluted spectra (variable number of variables)

爷,独闯天下 提交于 2019-12-11 02:56:02
问题 I have some spectrum data that looks like one of the multiplets when is plotted: http://journals.prous.com/journals/dof/19982303/html/df230301/images/keiferf3.gif How it is seen in the image, all the peaks are realy close among each other, so I would like to do some deconvolution using nls function, like it was posted before (R: Fitting Gaussian peaks to density plot data using nls), but using a Lorentzian function instead: y <- 1/(pi*a*(1+((x-x0)/a)^2)) In my case, x0 is the peak maximum

Find the most colourful image in a collection of images

让人想犯罪 __ 提交于 2019-12-11 02:12:16
问题 Given a set of images what would be a way to rate them in order of which ones have the most complete coverage of the full colour spectrum? UPDATE I've posted a sister question which is an abstraction of one approach at "Most “thorough” distribution of points around a circle". 回答1: Imagine pixels as a set of 3D points in an RGB space. Rate the images by the volume of the 3d convex hull of their pixels. 回答2: Recommend converting the image from RGB values into HSV values. Then the more discrete

Converting NMR ascii file to peak list

人盡茶涼 提交于 2019-12-08 15:17:16
问题 I have some Bruker NMR spectra that i am using to create a program as part of a project. My program needs to work on the actual spectrum. So i converted the 1r files of the Bruker NMR spectra to ASCII. For Carnitine this is what the ascii file looks like(this is not the complete list. The complete list runs into thousands of lines. This is only a snapshot): -0.807434 -23644 -0.807067 -22980 -0.806701 -22967 -0.806334 -24513 -0.805967 -27609 -0.805601 -31145 -0.805234 -33951 -0.804867 -35553

How to plot graph the intensity versus wavelength for the spectrum? [closed]

…衆ロ難τιáo~ 提交于 2019-12-08 14:06:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Need to plot graph the intensity versus wavelength for the spectrum. Also, me need to determine the wavelengths from the graph (the image below): With which program I can do this? I searched in Google program, but they all work with video (example theremino spectrometer)?. I need to work the image. 回答1: That's

Power spectrum with Cython

﹥>﹥吖頭↗ 提交于 2019-12-07 01:15:37
问题 I am trying to optimize my code with Cython. It is doing a a power spectrum, not using FFT, because this is what we were told to do in class. I've tried to write to code in Cython, but do not see any difference. Here is my code #! /usr/bin/env python # -*- coding: utf8 -*- from __future__ import division cimport numpy as np import numpy as np cimport cython @cython.boundscheck(False) def power_spectrum(time, data, double f_min, double f_max, double df,w=1 ): cdef double com,f cdef double s,c

how to convert normalized frequency to actual frequency

不想你离开。 提交于 2019-12-06 05:54:07
问题 suppose that we have following code function [ x ] = generate1(N,m,A3) f1 = 100; f2 = 200; T = 1./f1; t = (0:(N*T/m):(N*T))'; %' wn = randn(length(t),1); %zero mean variance 1 x = 20.*sin(2.*pi.*f1.*t) + 30.*cos(2.*pi.*f2.*t) + A3.*wn; %[pks,locs] = findpeaks(x); plot(x) end i have generated signal using following command y=generate1(3,500,1); and i have got 501 length sample,now i want to use music method to detect frequencies,namely 100 and 200,assume that number of parameter is 2,so i have

Get a spectrum of frequencies from WAV/RIFF using linux command line

徘徊边缘 提交于 2019-12-05 15:50:41
How to generate file including spectrum of frequencies of wav/riff sound file? I would like to use linux command line. I know the cool sox function to generate png spectrograms sox sound.wav -n spectrogram But I do not need visual representation of the spectrum of frequencies. I just want to get spectrum of frequencies in data file so I can work on them. I believe that there must be an option using sox. Sox need to generate that data before plotting it. How to get this? Not sure, maybe the second solution is exporting wav file into the dat file. Each sample from dat file is a measure of the

scipy.signal.spectrogram compared to matplotlib.pyplot.specgram

徘徊边缘 提交于 2019-12-05 07:59:22
The following code generates a spectrogram using either scipy.signal.spectrogram or matplotlib.pyplot.specgram . The color contrast of the specgram function is, however, rather low. Is there a way to increase it? import numpy as np from scipy import signal import matplotlib.pyplot as plt # Generate data fs = 10e3 N = 5e4 amp = 4 * np.sqrt(2) noise_power = 0.01 * fs / 2 time = np.arange(N) / float(fs) mod = 800*np.cos(2*np.pi*0.2*time) carrier = amp * np.sin(2*np.pi*time + mod) noise = np.random.normal(scale=np.sqrt(noise_power), size=time.shape) noise *= np.exp(-time/5) x = carrier + noise

How to draw a frequency spectrum from a Fourier transform

此生再无相见时 提交于 2019-12-05 06:14:27
问题 I want to plot the frequency spectrum of a music file (like they do for example in Audacity). Hence I want the frequency in Hertz on the x-axis and the amplitude (or desibel) on the y-axis. I devide the song (about 20 million samples) into blocks of 4096 samples at a time. These blocks will result in 2049 (N/2 + 1) complex numbers (sine and cosine -> real and imaginary part). So now I have these thousands of individual 2049-arrays, how do I combine them? Lets say I do the FFT 5000 times

Power spectrum with Cython

☆樱花仙子☆ 提交于 2019-12-05 04:51:42
I am trying to optimize my code with Cython. It is doing a a power spectrum, not using FFT, because this is what we were told to do in class. I've tried to write to code in Cython, but do not see any difference. Here is my code #! /usr/bin/env python # -*- coding: utf8 -*- from __future__ import division cimport numpy as np import numpy as np cimport cython @cython.boundscheck(False) def power_spectrum(time, data, double f_min, double f_max, double df,w=1 ): cdef double com,f cdef double s,c,sc,cc,ss cdef np.ndarray[double, ndim=1] power cdef np.ndarray[double, ndim=1] freq alfa, beta = [],[]