Search

Institute of Earth Sciences Coders

Let's code!

Category

Perl

Reading a table data in Perl

In data analysis, we need to read the data in tabular format. We can do this easily and elegantly in Perl. (Refer to Using Perl for statistics - Giovanni Baiocchi for more) Let us take a tabular format data in... Continue Reading →

Writing or Reading a text file (in Perl)

In data analysis, reading and writing a text file is essential as you can not store all your data in your program. Here, we see how can we write a text file, append to that text file and later read... Continue Reading →

Calling SAC(Seismic Analysis Code) (in Perl)

For seismologists, using a SAC for sac data manipulation is essential (though there are few alternatives). Here, we see how can we call SAC from a perl script: #!/usr/bin/perl open(SAC, "| sac ") or die "Error opening sac\n"; print SAC... Continue Reading →

Let’s use Perl

Perl is a general purpose, high-level programming language. High-level language means, which you can use for wide variety of applications. It also has many modules available which can be used easily. It has made useful of great features from several... Continue Reading →

Moment Tensor Calculations

Programs: 1. moment_tensor_calc2.pl --> it calculates the moment tensor matrix for given M0, strike, dip and rake 2. diagonalizing_matrix.pl --> this program diagonalizes the given matrix. It can be used to diagonalize the moment tensor matrix as well. 3. iso_dev_mt.pl --> it gives the isotropic and... Continue Reading →

Powered by WordPress.com.

Up ↑