cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ehchandlerjr
Level V

Dif(col,n) function, but one that can handle subtracting between multiple datasets

Hello - I've got some data that for these purposes is akin to spectroscopic (XRD diffractogram for those that are familliar). I'm trying to do a basic background subtraction, but I have 200+ diffractograms, so I'm trying to automate it. I have the table in stacked format, and I'd love to just say "Here are my xy columns, and here is an ID column, do a Dif(col,n) function in column 4 that instead of having a set n, it treats it as if the background dataset is always adjacent (or something) to the dataset you're trying to subtract from, so the n doesn't change from sample to sample. In general I'd like to have a simple way to say "here's the background signal, heres the sample signal, subtract," but I haven't found a clean way to do that, so this is one idea I'm having.

 

Of course this gets more complicated if your datasets aren't the same length, but I'm doing baby steps here since JMP doesn't make this simple.

 

Am I making sense?

Edward Hamer Chandler, Jr.
2 REPLIES 2
jthi
Super User

Re: Dif(col,n) function, but one that can handle subtracting between multiple datasets

If I understand correctly what you want to do, data table subscripting might be able to do what you want Data table subscripting.

-Jarmo
ehchandlerjr
Level V

Re: Dif(col,n) function, but one that can handle subtracting between multiple datasets

Sorry. Forgot to respond to this. 

 

Hmmmm. So one way to do this without table subscripting would be 1) find all unique ID's in the ID column and their rows, 2) make a matrix for the data for first ID, 3) do my rescaling of the data to fit the background, 4) subtract, 5) store in another column, 6) go back to 3 and do for next ID. How would data table subscripting make this process smoother? 

 

As a side question, if I wanted to add in the steps to add a spline fit to the data by ID, and then do the rescaling and subsequent steps, would expression handling like this be the best bet, or is there a better way to do this that you know of? I keep trying to make FDE work and its just not there yet, unfortunately.

 

Thanks!

Edward Hamer Chandler, Jr.