cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Jackie_
Level VI

Finding X and Y coordinate

Hello JMP Community,

 

 

I am trying to figure out a way to identify the X and Y coordinates of the highlighted rows.

Get the lower x boundary of those bin "P" lying furthest to the left, that have at least SOME of their left edge on the wafer.

 

And get the upper y boundary of those bin "P" lying furthest to the top, that have at least SOME of their top edge on the wafer.

 

In this example the X = 23 and Y = 31. I would to get these values using some formula or calculation

I've attached the data table below.

 

Jackie__0-1686666111830.png

 

 

Jackie__1-1686665220379.png      Jackie__0-1686665065279.png         

I would really appreciate any suggestions

 

Thanks,

Jackie 

   

 

10 REPLIES 10
StarfruitBob
Level VI

Re: Finding X and Y coordinate

Hello Jackie,

 

What about << Get Selected Rows? It will return a matrix of selected rows. Potentially you can generate an associated array with row as key and a list of values, and perhaps a list of values { x coordinate, y coordinate, "P" value }.

 

Are the P bins differentiated by anything other than bins? Are they numbered or named? If so, it would be good to include that in the AA above. You can then iterate through them to find the values you need using for loops and perhaps generate additional lists or AAs that would be useful to you.  Hope this helps.

Learning every day!
Jackie_
Level VI

Re: Finding X and Y coordinate

@StarfruitBob ,

Thanks,

 

I highlighted row just for the reference. I want to identify the 2nd most lower x boundary of those bin "P" lying furthest to the left and the 2nd most top y boundary. I don't think what you suggested is what I am looking for

Jackie__0-1686671546039.png

 

StarfruitBob
Level VI

Re: Finding X and Y coordinate

@Jackie_ , in these cases, you can easily identify these "P" bins by their coordinates.  In your example, your 2nd most top y boundary has values at, or close to Y = 31, and your 2nd left most boundary has values at, or close to X = 23. Making some type of list, or AA may help you quickly compare these values. Including these values in an AA with the row number an other valuable information that you're looking for could satisfy your request.

Learning every day!
Jackie_
Level VI

Re: Finding X and Y coordinate

@StarfruitBob Thanks! I'm still trying to figure out. If you can give an example, I would appreciate it

Craige_Hales
Super User

Re: Finding X and Y coordinate

Is this a geometry question about whether an item at X,Y lies on the edge of a circle of radius R? Then, if CX,CY is the center,

radius = sqrt((x-cx)^2 + (y-cy)^2)

radius < R inside

radius > R outside

and you are just left with issues about the size of the item at X,Y and if X,Y is the center or top-left of that item.

Craige
Jackie_
Level VI

Re: Finding X and Y coordinate

@Craige_Hales  sort of.

 

I posted this and @brady_brady suggested a formula to highlight the reticles in the wafer map 

Solved: Re: Name Selection in Column - Highlight a reticle on wafer - JMP User Community

 

The thing I am trying to figure out is how can I calculate the offset X and Y

Craige_Hales
Super User

Re: Finding X and Y coordinate

Starting to understand, maybe. x==23 and y==31 is a corner on a rectangular set of bins. That corner that is completely beyond the circle. The bin below, and the bin to the right, is at least partly within the circle?

There is some step size for the bins in both x and y. there is some radius for the circle. you want to determine the 23 and 31 value?

If that's correct, I'll suggest a brute force algorithm that tests bins in a loop, looking for one that satisfies the requirement.

Craige
Jackie_
Level VI

Re: Finding X and Y coordinate

@Craige_Hales Yes, I want to determine the 23 and 31 value. Can you share an example code? Fairley new to this

Craige_Hales
Super User

Re: Finding X and Y coordinate

brute force, just test every bin. You'll want to adjust something, but this is the idea.

New Window( "test",
	gb = Graph Box(
		Frame Size( 800, 800 ),
		radius = 43;
		xstep = 5;// bin stride across
		xsize = 3;// bin width
		ystep = 4;// bin stride down
		ysize = 2;// bin height
		xmin = 0;
		xmax = 100;
		xcenter = Mean( xmin, xmax );
		ymin = 0;
		ymax = 100;
		ycenter = Mean( ymin, ymax );
		// the bins are identified by their upper left corner
		isOutside = Function( {x, y}, // is this point out of the circle?
			Sqrt( (x - xcenter) ^ 2 + (y - ycenter) ^ 2 ) > radius
		);
		isAllOutside = Function( {x, y}, // are all 4 points of this bin out of the circle?
			isOutside( x, y ) & isOutside( x + xsize, y ) & isOutside( x, y + ysize ) & isOutside( x + xsize, y + ysize )
		);
		Circle( {xcenter, ycenter}, radius );
		For( x = xcenter - xsize / 2 - xstep * Ceiling( radius / xstep ), x <= xcenter + xsize / 2 + xstep * Ceiling( radius / xstep ), x += xstep,
			For( y = ycenter - ysize / 2 - ystep * Ceiling( radius / ystep ), y <= ycenter + ysize / 2 + ystep * Ceiling( radius / ystep ),
				y += ystep, 
				// is this bin outside, and the right,below siblings not outside?
				If( isAllOutside( x, y ) & !isAllOutside( x + xstep, y ) & !isAllOutside( x, y + ystep ),
					Rect( x, y, x + xsize, y + ysize, fill = 1 ),
					Rect( x, y, x + xsize, y + ysize, fill = 0 )
				)
			)
		);

	)
);
gb << setyaxis( {Min( 100 ), Max( 0 )} );

The for-loops look complicated just to center the bins on the circle. I don't know what the real rule is.

I'm a bit unclear on the rule that will make exactly one selection.I'm a bit unclear on the rule that will make exactly one selection.

Craige