<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Efficient row state coding in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38879#M22730</link>
    <description>&lt;P&gt;I worked in the semiconductor industry too, and found that on many of the large applications, moving the parametric data into matrices and using the various matrix functions rather than dealing with data table functions is a much faster method.&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2017 00:15:05 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-05-05T00:15:05Z</dc:date>
    <item>
      <title>Efficient row state coding</title>
      <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38866#M22722</link>
      <description>&lt;P&gt;Hi, I'm trying to figure out the fastest way to change row states in JSL. I normally try to avoid selecting rows because it is slower than get rows where(), but I don't see how to use a matrix or list of rows to change row states. Do rows need to be selected to change the state?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mildly related question: Is the color pallette scriptable? I see the "colorbox()" dislplay box but the scripting index says it is only accesible by the platform. I don't necessarily need it, as I was able to find a couple workarounds. An example of what I mean by this is shown below the code here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Clear Log();
Names Default To Here( 1 );
dt = open( "$SAMPLE_DATA\Big Class.jmp");

//get rows where; not sure what to do with this
myRows = dt &amp;lt;&amp;lt; get rows where(:height == 63);

// use select where works but could be slower
dt &amp;lt;&amp;lt; select where(:height == 63);
dt &amp;lt;&amp;lt; exclude(1);
dt &amp;lt;&amp;lt; colors("Red");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Color pallette, example from user preferences:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ScreenHunter_3915 May. 03 15.18.jpg" style="width: 336px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6093iA094D7A546F2CA7E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_3915 May. 03 15.18.jpg" alt="ScreenHunter_3915 May. 03 15.18.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 18:18:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38866#M22722</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2017-05-04T18:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient row state coding</title>
      <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38870#M22724</link>
      <description>&lt;P&gt;I don't have an answer to your color pallette question, but I did run a quick Select Where vs. Get Rows Where and found little difference&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
start = HP Time();
For( i = 1, i &amp;lt;= N Rows( dt ), i++,
	dt &amp;lt;&amp;lt; select where( :NPN1 &amp;gt; :npn1[i] )
);
Show( "select where", Format( (HP Time() - start) / 100, "Hr:m:s" ) );
start = HP Time();
For( i = 1, i &amp;lt;= N Rows( dt ), i++,
	dt &amp;lt;&amp;lt; select where( :NPN1 &amp;gt; :npn1[i] )
);
Show( "get rows", Format( (HP Time() - start) / 100, "Hr:m:s" ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I got the results:&lt;/P&gt;
&lt;P&gt;"select where";= "2:51:55";&lt;BR /&gt;"get rows";&amp;nbsp;= "2:50:40";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 19:57:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38870#M22724</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-04T19:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient row state coding</title>
      <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38874#M22725</link>
      <description>&lt;P&gt;Thanks Jim. The habit of choosing "getting" over "selecting" is kind of ingrained after years of slow script results in both vba and jsl, but I suppose I'm mostly thinking of cases where I need to iterate not only through rows but through each column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a couple of scenarios regarding semiconductor test data, where each row is a device tested in production, and each column (after the index columns) is a parametric test on the devices. Each column has spec limits stored as a property.&amp;nbsp; One script loops through and determines on a column by column basis the yield, high side and low side fallout, etc (lots of other stuff but that's irrelevant).&amp;nbsp; Generally with semiconductor data, it is tested with stop on first fail, so the columns to the right of a failure might be missing. If data is instead tested continue on fail, it might be nice to convert to 'stop on fail.' So I have a script to convert to stop-on-first-fail data as well.&amp;nbsp; In both of these cases, changing over to get rows where() vs select where() dramatically improved script execution time. It's possible that it might be faster using select where() if the table is invisible; I haven't checked this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the row states though, it is just looping through once, so now that I take a step back and think about it, it probably isn't too bad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a screenshot of two script versions for my stop on fail script. This change made a huge difference in execution time.&lt;/P&gt;&lt;P&gt;And a whole other topic might be why I'm parsing it as a string. I'd have to go back and look at this again, but years ago I found that parsing as a string was much faster, but that might have been while I still had the select where() statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ScreenHunter_3930 May. 04 16.10.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6096iC762A20E06595537/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_3930 May. 04 16.10.jpg" alt="ScreenHunter_3930 May. 04 16.10.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 20:28:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38874#M22725</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2017-05-04T20:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient row state coding</title>
      <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38879#M22730</link>
      <description>&lt;P&gt;I worked in the semiconductor industry too, and found that on many of the large applications, moving the parametric data into matrices and using the various matrix functions rather than dealing with data table functions is a much faster method.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 00:15:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38879#M22730</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-05T00:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient row state coding</title>
      <link>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38904#M22743</link>
      <description>&lt;P&gt;Yes, I tend to forget that and get reminded from time to time when I'm reviewing JMP's online help.&amp;nbsp; I probably just used the "select where()" and later get "rows where()" for convenience with respect to handling excluded rows and quickly (coding wise, not execution-wise) grabbing those that are above / below spec limits, though I suppose I could get a separate column matrix of excluded() containing ones and zeros, and just multiply. So long as it handles missing values correctly it would probably work fine and run quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 13:43:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Efficient-row-state-coding/m-p/38904#M22743</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2017-05-05T13:43:13Z</dc:date>
    </item>
  </channel>
</rss>

