Thanx for answer. To make the data format more clear: The data is a map of spectra. So we have a grid/matrix of spatial points (lets take 2x2 grid as an example). Now in each of the points the spectrum is taken (in example range will be 100-300, with 3 points). So that the simplified table, as imported into mathematica looks like following:
{{1,1,100,1},{1,1,200,4},{1,1,300,2},{1,2,100,2},{1,2,200,4},{1,2,300,1},{2,1,100,1},{2,1,200,4},{2,1,300,2},{2,2,100,1},{2,1,200,2},{2,2,300,1}}
So, first two columns are the position in the grid of the map, and third and fourth columns are the spectra. (i'm also attaching real data file with more points if it helps)
Now, when I remove background from the fourth column it will generate errors near the ends, since mathematica thinks this is just one long string of data. Instead, I'm trying to find a way to access each of the spectra in point separately in order to remove the background for spectrum, fit the curve and then generate a tables of the fitted parameters for each of the points of map.
Attachments: