Re: 실패한 주사위에서 2개의 행을 선택합니다.아마도 이런 식으로
dtt = Open( "/Z:/failures.jmp" );// 109 inner rows
expand = 2;// how far to look for a failure
// these are paired, keep them in a Nx2 matrix...
fail = (dtt:X coord << get values) || (dtt:Y coord << get values);
// get min and max of the matrix columns
failmin = V Min( fail );
failmax = V Max( fail );
// find the +/- 2 area of interest
colmin = failmin[1] - expand;
colmax = failmax[1] + expand;
rowmin = failmin[2] - expand;
rowmax = failmax[2] + expand;
// turn the failure list back into a rectangular matrix, mark the actual failures
unmarked = 0; // points that have not been marked yet
interior = 1; // the failures are interior points
border = 2; // the border points are near the failures
bigpatch = J( rowmax + 1, colmax + 1, unmarked );
For Each( {{r, c}}, across( fail[0, 2], fail[0, 1] ), bigpatch[r, c] = interior );
// helper to check near r,c
nearFailure = Function( {r0, c0}, //parameters
{rlow, rhigh, clow, chigh, r, c}, // locals
// low..high is expanded without going beyond the edge of bigpatch
rlow = Max( 1, r0 - expand );
rhigh = Min( N Rows( bigpatch ), r0 + expand );
clow = Max( 1, c0 - expand );
chigh = Min( N Cols( bigpatch ), c0 + expand );
// rlow..chigh is a slightly expanded search area
For( r = rlow, r <= rhigh, r += 1,
For( c = clow, c <= chigh, c += 1,
// any interior point (1) nearby?
If(
bigpatch[r, c] == interior// uncomment for "rounder"
// & Sqrt( (r - r0) ^ 2 + (c - c0) ^ 2 ) <= expand// the diagonal distance of the corners is expand*1.414...nearly 3...
,
Return( 1 ) // found an interior point nearby
)
)
);
/*return*/ 0; // no interior point found nearby
);
For( r = rowmin, r <= rowmax, r += 1,
For( c = colmin, c <= colmax, c += 1,
If( bigpatch[r, c] == unmarked & nearFailure( r, c ),
bigpatch[r, c] = border// add a border to the bigpatch
)
)
);
// view a cellplot
dtcp = As Table( bigpatch[rowmin - 1 :: rowmax + 1, colmin - 1 :: colmax + 1] );
dtcp[1 :: N Rows( dtcp ), 0] = dtcp[N Rows( dtcp ) :: 1, 0];// flip to make the same as graph builder
dtcp << Cell Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( dtcp << getcolumnnames ) );
dt = Open( "/Z:/Summary Bins.jmp" );// all rows
//Clear values
dt:Highlight[1 :: N Rows( dt )] = "";
//Loop to highlight 2 dies
dt << Begin Data Update;
For( i = 1, i <= N Rows( dt ), i++,
c = dt:X coord[i];
r = dt:Y coord[i];
If( r < N Rows( bigpatch ) & c < N Cols( bigpatch ) & bigpatch[r, c] == border,
dt:Highlight[i] = "1"
);
);
dt << End Data Update;
dt << select where( :Highlight == "1" & :Bins == "1" );
dt << Graph Builder( Size( 528, 454 ), Show Control Panel( 0 ), Variables( X( :X coord ), Y( :Y coord ) ), Elements( Points( X, Y, Legend( 7 ) ) ) );
당신은 이것을 원할 수 있습니다

또는 이것은 거리 계산에 대한 주석 행을 참조하십시오. 대각선 거리를 처리하려는 방법에 따라 다릅니다.

Re: 실패한 주사위에서 2개의 행을 선택합니다.고마워 크레이지
2행 선택안녕하세요 JMP 커뮤니티,
실패 빈 "2"의 각 X 및 Y 좌표에서 두 개의 데이터 포인트를 강조 표시하고 싶습니다. jsl 코드를 작성하려고 했지만 결과가 올바르지 않습니다.
아래 코드는 실패 빈 "2"의 X 및 Y 좌표에서 두 개 이상의 데이터 포인트를 강조 표시합니다. 어떤 제안?
코드는 다음과 같습니다.
Names Default To Here( 1 );
dtt = Data Table( "failures" );
dt = Data Table( "Summary Bins" );
//Clear values
dt:Highlight[1 :: N Rows( dt )] = "";
//define list for storing +/-2 X and Y coord in the list
xList = [];
yList = [];
//get X and Y coord of the failing dies
fail_xcoord = dtt:X coord << get values;
fail_ycoord = dtt:Y coord << get values;
// Add and subtract 2 from X and Y using a loop
For( j = 1, j <= N Rows( dtt ), j++,
For( i = -2, i <= 2, i++,
newX = dtt:X coord[j] + i;
newY = dtt:Y coord[j] + i;
If( newX != dtt:X coord[j],
Insert Into( xList, newX )
);
If( newY != dtt:Y coord[j],
Insert Into( yList, newY )
);
)
);
//Loop to highlight 2 dies
dt << Begin Data Update;
For( i = 1, i <= N Rows( dt ), i++,
If( Contains( xlist, dt:X coord[i] ) & Contains( fail_ycoord, dt:Y coord[i] ),
dt:Highlight[i] = "1";
);
If( Contains( ylist, dt:Y coord[i] ) & Contains( fail_xcoord, dt:X coord[i] ),
dt:Highlight[i] = "1";
);
);
dt << End Data Update;
dt << select where( :Highlight == "1" & :Bins == "1" );
감사해요,
재키
자동화 및 스크립팅Re: 실패한 주사위에서 2개의 행을 선택하세요. 실패한 지역에서 주사위 2개를 선택한다는 게 무슨 말인지 이해가 안 돼요 - 나는 더 두꺼운 테두리를 원한다.
예를 들어 범례에서 "40"을 선택하면(아래 참조) 해당 영역을 둘러싸는 +2 다이의 두꺼운 테두리를 추가하고 싶습니다. 이 특정 웨이퍼 맵에는 네거티브의 X 및 Y 좌표가 있으며 이는 NearFailure() 함수와 함께 작동합니다.

조금 확대 :
이 같은. 선택한 영역에서 2개의 점을 수동으로 선택했습니다. 이 경우 Bin "40" 빨간색 데이터 포인트입니다. 따라서 이를 수행하려는 의도는 선택한 행 영역을 둘러싸는 +2 다이(두꺼운 테두리)를 제외하는 것을 적용하는 것입니다.

말씀하신 내용과 비슷한데, 아래의 경우 테두리가 굵은(빨간색) 부분이 있습니다.

Re: 실패한 주사위에서 2개의 행을 선택하세요.내 생각에는 옵션 2가 더 합리적일 것 같습니다. 빅 패치를 위해 수정된 매트릭스 로직을 공유해 주시면 감사하겠습니다. 이 문제를 해결하는 방법을 정확히 모르겠습니다.
Re: 실패한 주사위에서 2개의 행을 선택하세요.이런 식으로 시도해 볼 수도 있습니다. 내 생각에는 이것이 더 나은 접근 방식이지만 그 자체로 문제가 있을 수 있으므로 주의 깊게 테스트하십시오.
// all new code, all new bugs, check carefully to see if this does what you want
dtt = Open( "/Z:/failures(2).jmp" );
dtS = Open( "/Z:/Summary Bins(2).jmp" );
// the X-Y die coordinates are expected to be integers between -9,999,996 and +9,999,996
encodeLimit = 1e7; // pack/unpack two signed 7-digit integers in one 14-digit number
// a "key" is an X-Y pair packed into a single number. It is called a key
// because it is used as a key in an associative array. These next two
// routines convert between the two representations
keysToXY = Function( {keys},
{x, y},
x = Round( keys / encodeLimit );
y = keys - x * encodeLimit;
x || y;
);
XYtoKeys = Function( {xy},
xy[0, 1] * encodeLimit + xy[0, 2]
);
// load the X-Y pairs that describe failure positions
failXY = dtt[0, {x coord, y coord}];
// elementary sanity checks
If( Any( failXY <= -encodeLimit + 4 ) | Any( failXY >= encodeLimit - 4 ),
Throw( "data range" )
);
If( Any( failXY != Floor( failXY ) ),
Throw( "integer coords" )
);
// convert X-Y failure locations to keys, verify they convert back again
failkeys = XYtoKeys( failXY );
If( !All( keysToXY( failkeys ) == failXY ),
Throw( "encode/decode 1" )
);
// template for nearby points. THIS TABLE ENCODES THE 2 PIXEL BORDER.
// you might, or might not, want the corners included; the corners are
// commented out because I like the rounded appearance better.
template = [
//-2 -2, // corner
-2 -1,
-2 0,
-2 1,
//-2 2, // corner
-1 -2,
-1 -1,
-1 0,
-1 1,
-1 2,
0 -2,
0 -1,
0 0, // center
0 1,
0 2,
1 -2,
1 -1,
1 0,
1 1,
1 2,
// 2 -2, // corner
2 -1,
2 0,
2 1
//, 2 2 // corner
];
// convert the template X-Y pairs into keys, verify they convert back again
templatekeys = XYtoKeys( template );
If( !All( keysToXY( templatekeys ) == template ),
Throw( "encode/decode 2" )
);
// somthing very cool is going to happen next: template keys will be added to a failure
// key to get a set of keys around the failure key. The template, above, represents a
// square (with rounded corners) about an origin. Adding a failure key moves the
// origin to the X-Y failure point. All the nearby locations are then inserted into a
// collection (associative array) of points that are within 2 of a failure point.
// When done, the actual failure points are removed from the collection, leaving the
// collection as the 2-wide border.
// use AssociativeArray as a set to hold the key values;
// the nearbyPoint set gets populated with both the failure
// points AND the points that are nearby as identified by the template.
nearbyPoints = Associative Array();
For Each( {failkey}, failkeys,
nearbykeys = failkey + templatekeys; // nearby is the same shape as template, but at failkey, not 0,0
nearbyPoints << Insert( Associative Array( nearbykeys ) );
);
// now remove the set of points formed from all the failures...after this,
// nearbypoints is the 2-cell boundary without the interior.
nearbyPoints << Remove( Associative Array( failkeys ) );
// now make a table for a plot. red are from the failures table, blue are the border.
border = keysToXY( Matrix( nearbypoints << getkeys ) ) || J( N Items( nearbypoints ), 1, 1 );
center = failXY || J( N Rows( failXY ), 1, 2 );
dtg = As Table( border |/ center, <<COLUMNNAMES></COLUMNNAMES>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture.png" style="width: 921px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="capture.png" style="width: 921px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="capture.png" style="width: 921px;"><span class="lia-inline-image-display-wrapper" image-alt="capture.png" style="width: 921px;"><img src="https://us.v-cdn.net/6038925/uploads/images/61399i00F1D5DEBF613925/capture.png" role="button" title="capture.png" alt="capture.png" /></span></SPAN></SPAN></SPAN></P>Re: 실패한 주사위에서 2개의 행을 선택하세요.@Craige_Hales
당신은 내 인생을 더 쉽게 만들었습니다. 고마워요, 크레이지!
마지막 질문입니다.
템플릿 크기를 동적으로 조정할 수 있습니까? 사용자가 픽셀 테두리 수를 입력할 수 있는 숫자 편집 상자가 있는 창을 만들려고 합니다. 픽셀 경계가 3이면 행렬은 n+1이 됩니다.

// template for nearby points. THIS TABLE ENCODES THE 2 PIXEL BORDER.
// you might, or might not, want the corners included; the corners are
// commented out because I like the rounded appearance better.
template = [-2 -2, // corner
-2 -1, -2 0, -2 1, -2 2, // corner
-1 -2, -1 -1, -1 0, -1 1, -1 2, 0 -2, 0 -1, 0 0, // center
0 1, 0 2, 1 -2, 1 -1, 1 0, 1 1, 1 2, 2 -2, // corner
2 -1, 2 0, 2 1, 2 2 // corner
]
Re: 실패한 주사위에서 2개의 행을 선택하세요.이것은 효과가 있을 수 있습니다:
templatesize=15;
templateround = 1; // 0: square corners 1: round corners 2: diamond corners
templatelist = {};
for(x=-templatesize, x<=templatesize, x+=1,
for(y=-templatesize, y<=templatesize, y+=1,
if(templateround==0 // use all neighbor points
| (templateround==1 & round(sqrt(x^2+y^2))<=templatesize) // use neighbors near or inside the circle
| (templateround==2 & sqrt(x^2+y^2)<=templatesize) // use neighbors inside the circle
,//
templatelist[nitems(templatelist)+1] = evallist({x,y});
)
)
);
show(templatelist);
template = matrix(templatelist);
//astable(template)<<GRAPH builder=""></GRAPH>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="capture.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/61445i7D643065AD650CD1/capture.png" role="button" title="capture.png" alt="capture.png" /></span></SPAN></P>
<P> </P>