Load spectre

modou
Posts: 17
Joined: 2017-01-05
Location: Senegal

Dear,
I would like to load several spectra in a file.When I load one spectre I use this program:
// Spectre
//-------------------------------------------------------
Macro SpectreTotal(ctrlName) : ButtonControl
String ctrlName

KillWaves/Z Wavelength,Intensity
dowindow/K Graph0
dowindow/K Table0
LoadWave/A/G
String list = waveList("*", ";", "")
String traceName
variable i
variable/G cpix,Lgond
String/G mypath=S_path
variable/G npt

traceName = StringFromList(0, list)
npt=pnt2x($traceName,numpnts($traceName)-1)+1 // N = numpnts(waveName)
Make/O/N=(npt) Wavelength=$traceName
traceName = StringFromList(1, list)
Make/O/N=(npt) Intensity=$traceName
edit Intensity,Wavelength
display /W=(10, 20, 600, 400) Intensity vs Wavelength
ModifyGraph rgb=(0,0,0)
Label left "\\u#2Intensité (u.a.)";DelayUpdate
Label bottom "\\u#2longueur d'onde (A°)"
KillWaves/Z wave0,wave1
ShowInfo
End


Posts: 1815
Joined: 2007-06-29
Location: United States

DisplayHelpTopic "Loading Waves Using Igor Procedures"

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


HJDrescher
Posts: 319
Joined: 2015-01-20
Location: Germany

This kind of question will not give positive results. It's the third try - I would call that somehow significant.

We don't understand what you want to achieve in detail, since we cannot see you data file structure and we do not know how it should be processed.

I was not giving the 'homework' from the other thread as an act of bullying but for the sake of learning and helping!
And as an additional task: What is the meaning of each of the different colors in the formatted code?

HJ


Back to top