לדלג לתוכן

קובץ:Desommation trois pics gaussiens.svg

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

לקובץ המקורי(קובץ SVG, הגודל המקורי: 610 × 460 פיקסלים, גודל הקובץ: 128 ק"ב)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור
English: Desummation of three gaussian peaks from a noisy signal. The data are retrieved from File:Detection pic savitzky Golay.svg: noisy signal data file, and initial parameters of the model (from the Savitzky-Golay analysis). Created with Scilab, modified with Inkscape.
Français : Désommation de trois pics gaussiens à partir d'un signal bruité. Les données sont obtenues de File:Detection pic savitzky Golay.svg : fichier de données, et valeurs initiales des paramètres du modèle (à partir de l'analyse de Savitzky-Golay). Généré par Scilab, modifié avec Inkscape.
תאריך יצירה
מקור נוצר על־ידי מעלה היצירה
יוצר Christophe Dang Ngoc Chan (cdang)

Scilab source

English: English version by default.
Français : Version française, si les préférences de votre compte sont réglées (voir Special:Preferences).
// **********
// Initialisation
// **********

clear;
clf;
chdir('C:\Documents and Settings\christophe.dang\My Documents\documentation\algo\regression\');

// **********
// Constants
// **********

// Initial parameter of the model
// obtained by Savitzky-Golay
// x position estimated by the minima of the second derivative
// height H by the height of the curve at these positions
// full-width at half maximum FWHM by the length of the chord
// that links the inflection points (extrema of the derivative)
// sigma = FWHM/2,35
Ainit = [1.96 ; 1.26 ; 0.29
6.12 ; 0.64 ; 0.20
7.06 ; 1.27 ; 0.26];

// **********
// Functions
// **********

// Gaussian function

function [y] = gauss(A, x)
    // A(1): peak position
    // A(2): peak height
    // A(3): peak "width"
    y = A(2)*exp(-(x - A(1)).^2/A(3));
endfunction

function [y] = profil(A, x)
    // A(1): 1st peak position
    // A(2): 1st peak height
    // A(3): 1st peak "width"
    // A(4)-A(6): same, 2nd pic
    // A(7)-A(9): same, 3rd pic
    G1 = A(1:3);
    G2 = A(4:6);
    G3 = A(7:9);
    y = gauss(G1, x) + gauss(G2, x) + gauss(G3, x);
endfunction

// Residual

function [e] = res(A, x, y)
    e = profil(A, x) - y;

endfunction

// **********
// Main program
// **********

// Data reading

data = read('three_gaussian_peaks.txt', -1, 2)
X = data(:,1);
Y = data(:,2);

[S, Aopt] = leastsq(list(res, X, Y), Ainit)
Yopt = profil(Aopt, X);
YGopt1 = gauss(Aopt(1:3),X);
YGopt2 = gauss(Aopt(4:6),X);
YGopt3 = gauss(Aopt(7:9),X);

// Display

plot2d(X, Y, style=0)
//plot(X, Yopt, "-r")
plot(X, YGopt1, "-c")
plot(X, YGopt2, "-g")
plot(X, YGopt3, "-b")

height = max(Y);
xmin = min(X)

xstring(xmin, height,...
 'Pic 1 : X1 = '+string(Aopt(1))+' pour 2'...
+' ; Al = '+string(Aopt(2))+' pour 1,26'...
+' ; H1 = '+string(Aopt(3))+' pour 0,2.')
xstring(xmin, 0.95*height,...
 'Pic 2 : X2 = '+string(Aopt(4))+' pour 6,2'...
+' ; A2 = '+string(Aopt(5))+' pour 0,63'...
+' ; H2 = '+string(Aopt(6))+' pour 0,2.')
xstring(xmin, 0.9*height,...
 'Pic 3 : X3 = '+string(Aopt(7))+' pour 7'...
+' ; A3 = '+string(Aopt(8))+' pour 1,26'...
+' ; H3 = '+string(Aopt(9))+' pour 0,2.')
xstring(xmin, 0.85*height,...
 'variance : S = '+string(S))

רישיון

אני, בעל זכויות היוצרים על היצירה הזאת, מפרסם אותה בזאת תחת הרישיונות הבאים:
GNU head מוענקת בכך הרשות להעתיק, להפיץ או לשנות את המסמך הזה, לפי תנאי הרישיון לשימוש חופשי במסמכים של גנו, גרסה 1.2 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.
w:he:Creative Commons
ייחוס שיתוף זהה
הקובץ הזה מתפרסם לפי תנאי רישיונות קריאייטיב קומונז ייחוס-שיתוף זהה 3.0 לא מותאם, 2.5 כללי, 2.0 כללי ו־1.0 כללי.
הנכם רשאים:
  • לשתף – להעתיק, להפיץ ולהעביר את העבודה
  • לערבב בין עבודות – להתאים את העבודה
תחת התנאים הבאים:
  • ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
  • שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית17:17, 12 בנובמבר 2012תמונה ממוזערת לגרסה מ־17:17, 12 בנובמבר 2012‪460 × 610‬ (128 ק"ב)Cdang{{Information |description= {{en|1=Desummation of three gaussian peaks from a noisy signal. The data are retrieved from File:Detection pic savitzky Golay.svg: noisy signal data file, and initial parameters of the model (from the Savitzky-Golay ana...

אין בוויקיפדיה דפים המשתמשים בקובץ זה.

מטא־נתונים