cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
katjes
Level I

reading data from peak - y and x data

Hi,

I am having JMP 18 and I am looking for a way to read the max peak - I´d like to have the max y and equivalent x value. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: reading data from peak - y and x data

Here is a simple script that will write the values to the log

names default to here(1);
dt = current data table();

theRow = (dt << get rows where(col max(:signal)==:signal))[1];
show(:"time, min"n[theRow],:signal[theRow]);
Jim
katjes
Level I

Re: reading data from peak - y and x data

hi, thanks for the great input.

 

Is there away that it does the data picking for all IDs?

txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

Recommended Articles