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
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 28, 2017 at 10:08 am - Permalink
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
March 28, 2017 at 03:46 pm - Permalink