1

I would like to perform a y-axis intensity offset to the counts on spectra across this spectrum image. Is there anyway to script this addition to the spectra to all positions in a data cube?

Single EELS Spectra

Alvin Lee
  • 11
  • 2
  • Is the answer I gave below not giving you what you want? Or have a I still not understood you correctly? – BmyGuest Aug 02 '18 at 20:48
  • Your code below is exactly what I was looking for! Thank you so much Bernhard – Alvin Lee Aug 17 '18 at 18:54
  • Hi Alvin, glad to hear it. If you have any other question, just ask. It usually the fasted way to get to learn new things. just one thing, if you feel that an answer here in StackOverlow "answers" your question, please use the little "check" icon next to the answer post to mark the question as "answered". – BmyGuest Aug 17 '18 at 20:11

1 Answers1

0

I am not sure what you are asking exactly, but if your spectrum image is the front-most image, then you would shift the 'intensity' of all spectra by 1000 using:

image SI := GetFrontImage()
SI += 1000

If you would like to have the shift depend on the y-coordinate of your SI (first row = 0, second row = 1, etc. ) then you would use:

image SI := GetFrontImage()
SI += 1000 * irow      // irow is 0 in the first row, 1 in the second row etc.
BmyGuest
  • 6,331
  • 1
  • 21
  • 35