Since Antelope is updated so often, it is useful to get the antelope version

from the system antelope variable so thatthe code works without modification with the ongoing antelope version updates. Set the $ANTELOPE variable in your perlscript to reference the correct Antelope with the line:

$ANTELOPE = $ENV{"ANTELOPE"};

TO USE ANTELOPE TOOLS

Put the following lines into your perl script to make use of ANTELOPE subprograms

use lib "$ANTELOPE/data/perl";

use Datascope;

ADDING/BUILDING TABLE ENTRIES WITH PERL

Example of a perl script to make an origin table:

#!/opt/antelope/4.8/bin/perl

use lib "/opt/antelope/4.8/data/perl";

use Datascope;

# make the origin table

$originline = &mkorigintable($event_lat,$event_lon, $event_depth,

$event_time , $year, $jday);

sub mkorigintable {

# local variables

# this will add an entry to event.origin for each call

local ($lat,$lon, $depth, $origtime , $year, $jday) = @_;

#An antelope origin record contains entries for:

#1 lat estimated latitude

#2 lon estimated longitude

#3 depth estimated depth

#4 time epoch time

#5 orid origin identifier

#6 evid event identifier

#7 jdate julian date

#8 nass number of associated phases

#9 ndef number of locating phases

#10 ndp number ofdepth phases

#11 gm geographic region number

#12 sm seismic region number

#13 etype event type

#14 depdp estimated depth from depth phases

#15 dtype depth method used

#16 mb body wave magnitude

#17 mbid Mb magnitude identifier

#18 ms surface wave magnitude

#19 msid Ms magnitude identifier

#20 ml local magnitude

#21 mUd ML magnitude identifier

#22 algorithm location algorithm used

#23 auth source/originator

#24 commid comment identifier

#25 lddate load date

# set the default things

$lddate = `epoch now`;

$yearday = "$year"."$jday";

# we are going to set sta time arid jdate($yearday) chan iphase lddate