I have optical spectra in the following format:
spectra = {{x1,y1},{x2,y2},...,{xn,yn}}
Where x are wavenumbers and y is intensity. I want to modify my intensity, e.g. divide by 3. So I use the following code for that:
modyfiedspectra = Transpose[{spectra[[All, 1]], spectra[[All, 2]]/3}]
But when I have a list of different spectra, I don't know how to loop over it. For example I have a list of 2 spectra:
listofspectra = {{{x1,y1},{x2,y2},...,{xn,yn}},{{x1,y1},{y2,y2},...,{xn,yn}}}
And now I want to divide intensity of each spectra by different numbers. E.g:
divideby = {3,5}
So, output should be something like that:
(*{{{x1,y1/3},{x2,y2/3},...,{xn,yn/3}},{{x1,y1/5},{x2,y2/5},...,{xn,yn/5}}}*)
So the question: how to loop over a list of lists and apply a function with different arguments for each list?