<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div>Neglected to cc the Antelope list...</div><div><br></div><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Jennifer Eakins <<a href="mailto:jeakins@ucsd.edu">jeakins@ucsd.edu</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">August 23, 2009 11:21:31 PM MDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">N. Seth Carpenter <<a href="mailto:sethcarpent@gmail.com">sethcarpent@gmail.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>Re: [Antelope] differening dbsubset results</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Message-Id: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><<a href="mailto:D3D729EF-53B4-4455-9DCF-8D7B93990FA1@ucsd.edu">D3D729EF-53B4-4455-9DCF-8D7B93990FA1@ucsd.edu</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>In-Reply-To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><<a href="mailto:4A906948.9020106@coas.oregonstate">4A906948.9020106@coas.oregonstate</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Content-Type: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">text/plain; charset=US-ASCII; format=flowed; delsp=yes</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>X-Smtp-Server: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">smtp.ucsd.edu:jeakins</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Content-Transfer-Encoding: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">7bit</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Mime-Version: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">1.0 (Apple Message framework v935.3)</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>References: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><<a href="mailto:4A906948.9020106@coas.oregonstate">4A906948.9020106@coas.oregonstate</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>Hi Seth,<br><br>I am definitely not a Matlab expert, but here is my advice for what it is worth. When I do dbsubsets, I prefer to store the subset (so I can review it) and then run them individually. I also add some debugging checks for the number of records to see if I am getting what I expect. I suspect there is something not being parsed correctly in your subset string.<br><br>For instance, try something like:<br><br><br>>> db_wf = dbopen( 'tmp','r' );<br>>> db_wf = dblookup_table( db_wf,'wfdisc');<br><br>>> nrecs = dbquery(db_wf,'dbRECORD_COUNT');<br>>> disp(['number of records after station subset: ',num2str(nrecs)])<br>>> subtime1 = ['endtime>=',num2str(mystarttime)]<br>>> subtime2 = ['time<=',num2str(myendtime)]<br><br>>> db_wf = dbsubset(db_wf ,subtime1);<br>>> nrecs = dbquery(db_wf ,'dbRECORD_COUNT');<br>>> disp(['number of records after first time subset: ',num2str(nrecs)])<br><br>>> db_wf = dbsubset(db_wf ,subtime2);<br>>> nrecs = dbquery(db_wf ,'dbRECORD_COUNT');<br>>> disp(['number of records after second time subset: ',num2str(nrecs)])<br><br><br>You can try putting both of the parts of the subset together. An example that has worked for me (modify for your numeric times and wfdisc):<br><br>stagesub = ['gtype=="sensor"&&chan=="BHZ"'] ;<br>dbstage = dbsubset(dbstage,stagesub);<br><br><br>--Jennifer<br><br><br>On Aug 22, 2009, at 3:55 PM, N. Seth Carpenter wrote:<br><br><blockquote type="cite">Hi, I am using antelope v4.10 on Mac. and am getting different results with a dbsubset command when I use it on command line vs. when I use it in matlab. On command line:<br></blockquote><blockquote type="cite">% dbsubset tmp.wfdisc "time >= 1086443800 && time <= 1086447410" | dbquery - dbRECORD_COUNT<br></blockquote><blockquote type="cite">69<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In matlab:<br></blockquote><blockquote type="cite">>> db_wf = dbopen( 'tmp','r' );<br></blockquote><blockquote type="cite">>> db_wf = dblookup_table( db_wf,'wfdisc');<br></blockquote><blockquote type="cite">>> db_wf = dbsubset( db_wf,['time >= ' num2str( 1086443800 ) ' && time <= ' num2str( 1086447410 )]);<br></blockquote><blockquote type="cite">>> dbquery( db_wf,'dbRECORD_COUNT' )<br></blockquote><blockquote type="cite">ans =<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> 0<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Can someone tell me what I am doing wrong or why I might expect these different results?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Seth<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Antelope mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Antelope@brtt.net">Antelope@brtt.net</a><br></blockquote><blockquote type="cite"><a href="http://brtt.net/mailman/listinfo/antelope_brtt.net">http://brtt.net/mailman/listinfo/antelope_brtt.net</a><br></blockquote><br></div></blockquote></div><br></body></html>