<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Jonathan, <div><br></div><div>Have you tried the trexcerpt(1) command? It takes a small investment to learn how to use it for the more complicated operations, however it's pretty powerful and may be able to get you through this extraction process more cleanly. I don't see any evidence in your email below that you're already using it, but you should at least consider it. </div><div><br></div><div>Best regards,</div><div>Kent</div><div><br><div><div>On Oct 19, 2008, at 12:09 PM, Jonathan MacCarthy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Antelope users,<div><br></div><div>I'm new to Antelope, and I've been looking for a command/trick that might solve a problem I'm having, but with no luck so far. I'm hoping someone might have a suggestion; any help would be much appreciated...</div><div>With my origin, site, and wfdisc tables, I'm doing the canonical "extract parrival-30sec to parrival+60sec from wfdisc holdings", but I'm running into overlap problems. My wfdisc is populated by downloading P-60sec to P+120sec from IRIS for select events. The problem is due to a few of those origins being close to each other in time & space such that my " parrival-30sec to parrival+60sec" call for the earlier event also grabs from wfdisc records intended to be associated with the later event. Here's an example for database name "TA":</div><div><br></div><div>The events...</div><div>>> dbsubset TA.origin 'orid == 16 || orid == 17' | dbselect - orid lat lon depth 'strtime(time)' </div><div> 16 36.1780 141.5450 19.0000 5/07/2008 16:02:02.600</div><div> 17 36.2260 141.7660 35.0000 5/07/2008 16:03:40.430</div><div><br></div><div>The extract call:</div><div>>> dbjoin TA.origin TA.site | dbsubset - 'orid==16' | dbjoin - :sta ':parrival()-30::parrival()+60#time::endtime' wfdisc | dbselect - orid sta chan 'strtime(wfdisc.time)' 'strtime(parrival())' 'strtime(wfdisc.endtime)' 'dir . "/" . dfile' | head</div><div> 16 SRU BHZ 5/07/2008 16:13:00.965 5/07/2008 16:14:08.829 5/07/2008 16:16:20.715 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_02_02/UU.SRU.BHZ.sac</div><div> 16 SRU BHE 5/07/2008 16:13:04.090 5/07/2008 16:14:08.829 5/07/2008 16:16:14.715 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_02_02/UU.SRU.BHE.sac</div><div> 16 SRU BHN 5/07/2008 16:13:05.390 5/07/2008 16:14:08.829 5/07/2008 16:16:19.690 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_02_02/UU.SRU.BHN.sac</div><div> 16 SRU BHN 5/07/2008 16:14:31.040 5/07/2008 16:14:08.829 5/07/2008 16:17:44.940 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_03_40/UU.SRU.BHN.sac</div><div> 16 SRU BHZ 5/07/2008 16:14:37.690 5/07/2008 16:14:08.829 5/07/2008 16:18:00.690 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_03_40/UU.SRU.BHZ.sac</div><div> 16 SRU BHE 5/07/2008 16:14:43.640 5/07/2008 16:14:08.829 5/07/2008 16:17:52.715 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_03_40/UU.SRU.BHE.sac</div><div> 16 ISCO BHN 5/07/2008 16:10:51.224 5/07/2008 16:14:21.957 5/07/2008 16:18:30.024 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_02_02/US.ISCO.BHN.sac</div><div> 16 ISCO BHE 5/07/2008 16:11:19.049 5/07/2008 16:14:21.957 5/07/2008 16:18:55.199 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_02_02/US.ISCO.BHE.sac</div><div> 16 ISCO BHZ 5/07/2008 16:13:22.874 5/07/2008 16:14:21.957 5/07/2008 16:18:08.124 /fs/scratch/jkmacc/Data/CREST/TA/P/wf/Event_2008_128_16_03_40/US.ISCO.BHZ.sac</div><div>...</div><div><br></div><div>I've output 3 times: parrival-30sec, parrival, and parrival+60sec, so that the overlapping wfdisc times are apparent. I've also output the the "dir" field to demonstrate that the files are from different event directories.</div><div>Is there some way to combine overlapping wfdisc records so that this doesn't happen, or to otherwise distinguish between the records I want and the ones I don't?</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>Best,</div><div>Jonathan MacCarthy</div><div><br></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 11px/normal Helvetica; "><i>Jonathan MacCarthy</i></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 11px; "><i>PhD Candidate in Seismology</i></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 11px; "><i>New Mexico Institute of Mining and Technology</i></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 11px/normal Helvetica; "><i>Dept. of Earth and Environmental Science, MSEC208</i></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 11px/normal Helvetica; "><i>801 Leroy Place</i></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 11px/normal Helvetica; "><i>Socorro, NM 87801</i></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 11px/normal Helvetica; "><i>ph: 505.835.5418</i></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 11px; "><i>web: <a href="http://www.ees.nmt.edu/~jkmacc">www.ees.nmt.edu/~jkmacc</a></i></span></font></div></div></span></div></span></div></span> </div><br></div>_______________________________________________<br>Antelope mailing list<br><a href="mailto:Antelope@brtt.net">Antelope@brtt.net</a><br>http://brtt.net/mailman/listinfo/antelope_brtt.net<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Dr. Kent Lindquist <a href="mailto:kent@lindquistconsulting.com">kent@lindquistconsulting.com</a></div><div>Lindquist Consulting, Inc.</div><div>59 College Rd. Suite #7</div><div>Fairbanks, AK 99701 Phone/FAX 907-457-2374</div><div><br class="webkit-block-placeholder"></div><div><a href="http://www.lindquistconsulting.com">http://www.lindquistconsulting.com</a></div></div></span> </div><br></div></body></html>