=head1 NAME Perlsac::rwsac - a module to read and write SAC file. =head1 DESCRIPTION This is the module for reading and writing the sac file, defined at 'http://ds.iris.edu/files/sac-manual/manual/file_format.html' =head1 AUTHOR Hobin Lim =head1 LICENSE MIT =head1 INSTALLATION Using C: $ cpan install Perlsac::rwsac Manual install: $ perl Makefile.PL $ make $ make install =head1 TUTORIAL Printing out time and data. $ #!/usr/bin/env perl $ $ use strict ; $ use warnings ; $ use Perlsac::rwsac ; $ $ my %h = Perlsac::rwsac::rsac("example.sac") ; $ $ for (my $n=0; $n<$h{npts}; $n++){ $ print "$h{t}[$n] $h{d}[$n]\n" ; $ } $ Dividing data by 'depmax' in headers and writing a new sac file. $ #!/usr/bin/env perl $ $ use strict ; $ use warnings ; $ use Perlsac::rwsac ; $ $ my %h = Perlsac::rwsac::rsac("example.sac") ; $ $ for (my $n=0; $n<$h{npts}; $n++){ $ $h{d}[$n] /= $h{depmax} ; $ } $ $ &Perlsac::rwsac::wsac("example.sac.div",%h) ; =cut