[Antelope] Fwd: differening dbsubset results
Jennifer Eakins
jeakins at ucsd.edu
Mon Aug 24 00:25:59 CDT 2009
Neglected to cc the Antelope list...
Begin forwarded message:
> From: Jennifer Eakins <jeakins at ucsd.edu>
> Date: August 23, 2009 11:21:31 PM MDT
> To: N. Seth Carpenter <sethcarpent at gmail.com>
> Subject: Re: [Antelope] differening dbsubset results
> Message-Id: <D3D729EF-53B4-4455-9DCF-8D7B93990FA1 at ucsd.edu>
> In-Reply-To: <4A906948.9020106 at coas.oregonstate>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
> X-Smtp-Server: smtp.ucsd.edu:jeakins
> Content-Transfer-Encoding: 7bit
> Mime-Version: 1.0 (Apple Message framework v935.3)
> References: <4A906948.9020106 at coas.oregonstate>
>
> Hi Seth,
>
> 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.
>
> For instance, try something like:
>
>
> >> db_wf = dbopen( 'tmp','r' );
> >> db_wf = dblookup_table( db_wf,'wfdisc');
>
> >> nrecs = dbquery(db_wf,'dbRECORD_COUNT');
> >> disp(['number of records after station subset: ',num2str(nrecs)])
> >> subtime1 = ['endtime>=',num2str(mystarttime)]
> >> subtime2 = ['time<=',num2str(myendtime)]
>
> >> db_wf = dbsubset(db_wf ,subtime1);
> >> nrecs = dbquery(db_wf ,'dbRECORD_COUNT');
> >> disp(['number of records after first time subset:
> ',num2str(nrecs)])
>
> >> db_wf = dbsubset(db_wf ,subtime2);
> >> nrecs = dbquery(db_wf ,'dbRECORD_COUNT');
> >> disp(['number of records after second time subset:
> ',num2str(nrecs)])
>
>
> 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):
>
> stagesub = ['gtype=="sensor"&&chan=="BHZ"'] ;
> dbstage = dbsubset(dbstage,stagesub);
>
>
> --Jennifer
>
>
> On Aug 22, 2009, at 3:55 PM, N. Seth Carpenter wrote:
>
>> 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:
>> % dbsubset tmp.wfdisc "time >= 1086443800 && time <= 1086447410" |
>> dbquery - dbRECORD_COUNT
>> 69
>>
>> In matlab:
>> >> db_wf = dbopen( 'tmp','r' );
>> >> db_wf = dblookup_table( db_wf,'wfdisc');
>> >> db_wf = dbsubset( db_wf,['time >= ' num2str( 1086443800 ) ' &&
>> time <= ' num2str( 1086447410 )]);
>> >> dbquery( db_wf,'dbRECORD_COUNT' )
>> ans =
>>
>> 0
>>
>> Can someone tell me what I am doing wrong or why I might expect
>> these different results?
>>
>> Thanks,
>> Seth
>>
>> _______________________________________________
>> Antelope mailing list
>> Antelope at brtt.net
>> http://brtt.net/mailman/listinfo/antelope_brtt.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brtt.net/pipermail/antelope_brtt.net/attachments/20090823/750adc65/attachment.html>
More information about the Antelope
mailing list