subtraction background
modou
I would like subtraction background of my spectre. I have seen this script but I don't understand
Function cherche_lignebase()
wave intensity
variable/G npt
variable i
variable indic_ligne_base=0
variable ligne_base= intensity[500]
//variable ligne_base=0
for(i=50;i // print i,intensity[i]
if (intensity[i] < ligne_base)
indic_ligne_base=i
ligne_base=min(ligne_base,intensity[i])
endif
endfor
print "Indice et ligne de base :", indic_ligne_base,ligne_base
intensity = intensity-ligne_base
for(i=0;i if (intensity[i] < 0)
intensity[i]=0
endif
endfor
end
what's the different indic_base_line and ligne_base
Can I explain me this program
Among other things, the tour shows you how to use the online help.
January 18, 2017 at 08:39 am - Permalink
at the start and
at the end. Otherwise the HTML parser will attempt to interpret "<" and ">" as parts of HTML tags.ligne_base is set to some value in the intensity array; initially it is set to the value at index 500, presumably the last value in the spectrum.
indic_ligne_base is an index pointing to some value in the intensity array; initially set to 0, the first value in the spectrum.
The first for/endfor loop finds the minimum value in the intensity array and sets ligne_base to that value and sets indic_ligne_base to the index of the minimum.
Then ligne_base is subtracted from every value in the intensity array.
The last for/endfor ensures that there are no negative values in the array.
As Howard suggested, you will benefit greatly from going through the Igor guided tour. Also, your question should have been posted to the "General" Forum. This forum is for posting questions concerning the Igor Exchange site itself.
January 19, 2017 at 05:37 am - Permalink
Thanks for pointing this out. I've moved the question to the appropriate forum.
January 19, 2017 at 07:41 am - Permalink