Load spectre
modou
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
http://www.igorexchange.com/node/3221
So, please!
March 20, 2017 at 12:35 am - Permalink
I really helps us to provide help.
I am rather sure that you do not know what this code is doing. This is perfectly fine for a beginner.
However, here is some homework:
Once you are done with that, do the following:
HJ
March 20, 2017 at 06:41 am - Permalink
You probably want to think about how you will specify the files you want to load. If you can get that in a list, then you can make a loop that goes through that list, and loads them in, appending to one graph, or displaying each in its own graph. Ditto with tables. If the files are not cleverly named so wavelength and intensity can be identified, that will be tricky to automate. Anyway, it would be helpful to explain the context better.
-Matthew
March 22, 2017 at 06:58 am - Permalink
HJ
March 22, 2017 at 03:38 pm - Permalink
DisplayHelpTopic "Loading Waves Using Igor Procedures"
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 28, 2017 at 10:44 am - Permalink