reflection seismology laboratory exercises using l su, a ... tutorial_1.pdf · widespread computer...

23
1 + Reflection Seismology Laboratory Exercises Using L_SU, a graphical user interface for Seismic Unix (CSM), Linux and Perl GEOL 4068 Fall 2018(V2) Baton Rouge Juan M. Lorenzo

Upload: others

Post on 21-Apr-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

1

+

Reflection Seismology Laboratory Exercises Using L_SU, a graphical user interface for

Seismic Unix (CSM), Linux and Perl GEOL 4068 Fall 2018(V2)

Baton Rouge Juan M. Lorenzo

Page 2: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

2

Table of Contents

AcknowledgementsTOC ................................................................................................................................. 3 Introduction TOC ............................................................................................................................................ 4

Why do we need to study linux? ............................................................ 4

Why do we need OpenSource software?................................................. 4

Where do I get ssh? ............................................................................... 4

Are you planning on doing any programming from home? ..................... 4

Where do I get Xming? .......................................................................... 4

TOC ........................................................... Error! Bookmark not defined.

What do I do if I have a Macintosh computer? ....................................... 4

For Mac users connecting to Geol-subsurface.lsu.edu, all you need to do is going to the "Launch pad" on your desktop, open Utilities folder and double click "Terminal". A terminal window will open. Type: ssh -X [email protected]. Then you are ready to go. (Courtesy of Chang Liu, fall 2013) .......................................................................................................... 4

How to run Xming: ................................................................................ 5

Why do we need to know sh or Perl? ..................................................... 5

Linux .................................................................................................... 5

History of LinuxTOC ................................................................................ 5

For a more comprehensive history of the subject by Ragib Hasan at UIUC, see: http://www.ragibhasan.com/linux/ ................................................... 5

Q. What is a shell? TOC ........................................................................... 5

Q. What are the different shells? TOC ...................................................... 6

Q. Which linux shell one should I use? TOC ............................................ 6

Directory Structure in a Linux operating systemTOC ............................... 6

Page 3: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

3

AcknowledgementsTOC

These notes borrow from the Colorado School of Mines (Stockwell) for S*nix, Universities of Indiana and Buffalo for linux and the University of Florida for Matlab. Many students have also contributed to these notes: Class of 2008: Erin Walden, Kody Kramer, Erin Elliott, Andrew Harrison, Andrew Sampson, Ana Felix, JohnD’Aquin, Russell Crouch, Michael Massengale, and David Smolkin; Chang Liu (2013).

Page 4: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

4

Introduction

Why do we need to study linux? Creative professional geophysicist and academics are able to explore new ideas without constraints

of “black-box” software.

Why do we need OpenSource software? Scientifically, open source products can be verified independently by anyone. Reproducibility is a

core tenet of the scientific method. OpenSource software replicates a scientific procedure.

Where do I get ssh? TigerWare Online (LSU students) Link to ssh: http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also install Filezilla (for PC, Mac and linux) (from TigerWare)

Where do I get VPN? You will need additional security software to connect to your server at LSU from home. There is

special software (VPN) you must download and install. For self-guided instructions on how to do that, google: GROK VPN LSU

Are you planning on doing any programming from home?

Open SSH. Create a new connection, e.g., named ‘ssl’. On the Connections tab: Hostname field: Geol-subsurface.lsu.edu Username: your PAWS id. Your

password is your PAWS password The password is case-sensitive. Save changes to your profile. You can now connect to the Geol-subsurface.lsu.edu server using SSH.

Where do I get Xming? Xming is the leading, free X Windows Server for Microsoft Windows. For notes link to Xming: http://www.straightrunning.com/XmingNotes/

For download of X fonts, use Google, e.g: http://sourceforge.net/projects/xming For download of Xming server, http://download.cnet.com/Xming/3000-2094_4-10549058.html

What do I do if I have a Macintosh computer?

For Mac users connecting to Geol-subsurface.lsu.edu, all you need to do is going to the "Launch pad" on your desktop, open Utilities folder and double click "Terminal". A terminal window will open. Type: ssh -X [email protected]. Then you are ready to go. (Courtesy of Chang Liu, fall 2013)

1) Download Cyberduck from internet (for Mac). 2) Open Cyberduck, click open connection.

Choose SFTP (Ssh File Transfer Protocol) option in the drop down window on the very top. 3) Type "Geol-subsurface.lsu.edu" in the "Server" 4) Use your PAWS login name and password. 5) After putting all the information, click Connect. And you will see all the files 6) Simply, Drag the file(s) into the folder you want it to be.

Page 5: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

5

How to run Xming: Making sure that you’re still connected in SSH, run XLaunch to configure Xming to connect to

the server. Choose one window, then make sure that “Start no client” is checked. Click Next>Next>Finish. Logout of SSH(File>Disconnect) and then reconnect by selecting the server profile.

If you are having problems connecting, open the lgc10 profile in SSH and go to Edit>Settings. Under the Tunneling option on the tree, make sure that the “Tunnel X11 Settings” option is checked. Make sure to save your profile.

Why do we need to know sh or Perl? Shells are the basic sets of instructions for handling the operating system and Perl is a mature,

widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make diverse pieces of software talk to each other.

Linux The single-most advantage of linux is that because the code is freely available, many people around

the world participate continuously in its improvement. I first view Linux as a communal, philanthropic exercise which takes advantage of the cooperative nature of our species. Linux can also simply be thought of as a collection of independent computer instructions that allow you to use the hardware pieces in your computer (keyboard, hard drive, internet card, etc.).

Many of you are familiar with typical point-and-click programs. In class in contrast we tend to send commands to the computer via text written on the command line. If well thought out, visually identifiable commands (i.e., point-and-click) are friendlier but slower to use, especially tedious to write and computationally less efficient. However, you will see that as part of linux there is a windowing environment (in our case called GNOME) that allows you to indeed “point-and-click” WYSIWYG (“What-you-see-is-what-you-get”)/GUI(“Graphical-user-interface”) in a way that is equivalent to typing in text commands. You may have already heard also of KDE as another popular windowing systems for users of linux.

History of LinuxTOC

For a more comprehensive history of the subject by Ragib Hasan at UIUC, see: http://www.ragibhasan.com/linux/

Linux was developed (for free) by Linus Torvald possibly inspired by at least the GNU project

(“GNU’s not Unix”) , a software movement to provide free and quality software

Links to sites that have important shell instructions: Important Instructions in sh: http://www.geol.lsu.edu/jlorenzo/ReflectSeismol/labs/linux_commands/linux_commands.htm

(Albing et al., 2007)

Q. What is a shell? TOC A shell is a convenient collection of command-line-instructions (actual programs), written in a low-

level language such as C, that allow the user to interact with files and the hardware and files. Shells have been around since the start of the unix-type operating systems and have the advantage that they interchangeable among different linux operating systems. Although the instructions may have to be recompiled for each machine the syntax remains constant and once learnt will last a career.

Page 6: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

6

Example,

% ls. ls stands for: “list the contents of this directory”

Q. What are the different shells? TOC

sh: the original “bourne-shell”

csh: the“C-shell” The csh improves upon the sh because it introduces convenient programming tools inherited from

C

ksh: the “k-shell” The commercial nature of this shell limited the growth of its popularity from the start.

bash: the “bourne-again-shell” The bash shell is ubiquitous among any linux-type operating systems you might encounter. The

bash shell inherits the advantages and experiences of all prior shells.

Q. Which linux shell one should I use? TOC For this class the default is: bash

Directory Structure in a Linux operating systemTOC In any operating system, linux programs and user directories are stored in predictable locations: / (Highest tier/directory in the file structure)) home (lower-tier directory) Your_login_id (subdirectory)

Page 7: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

7

Logging in to your accountTOC Type your login id, followed by your password Running a Remote Session on "lgc10" and forwarding it to your local machine CONTENTS

% ssh –X [email protected] This command will redirect images to the machine you are sitting at.

answer "yes" to the question involving "authenticity". You should only see this question the first time you log on from each machine.

You should see a "prompt" such as

% yourloginname@Geol-Subsurface

An example of a linux instruction that lets you see the contents of your directory:

% ls -l

Changing System permissions and the stability of Linux TOC Every file and directory in linux has assigned codes which dictate the degree of authority by each

user of the computer to alter each file. There are four types of user status on linux. First we have the overall supreme administrator known as “root” and who can do anything to any file on the system. Next, comes the specific original owner/user of each file. All users can belong to one or several named “groups” of users. Finally anyone who is not specified as belonging to your group or is not the supreme administrator is considered belong to the outside “world”, or all other internet users on the planet (including hackers). Within each of the status levels: owner, group, world, binary codes or their letter equivalents may be set to indicate whether a file may be only browsed (“read”), modified (“write”), and/or executed as a program (“executable”). Note that it is the files themselves that carry this important information with them. The file permissions are consulted first to determine whether an individual user has authority to manipulate the file in any way.

The purpose of this complex permission scheme is to provide an infinite variety of protection

schemes for the file systems but yet maintain an unsinkable file system. In theory, and for much of practice, an individual user will not be able to shut down the system; they will only be able to do damage to themselves and not the files or others.

System permissions belonging to a file or directory can only be changed by those users for whom

files have had the proper permissions already assigned. Initially it is the user “root” who sets all the

Page 8: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

8

first set of permissions for files and directories when a user is given a space to work on the system. From the first logon, the user has control of their assigned set of files and directories.

If you want a file containing Perl code to become executable in the system the creator of the file

is required to change the appropriate permission setting for that file. Following are the equivalent numeric codes for the different types of permissions:

Read only - 4 Write only – 2 Execute only - 1 Read and write – 6 Write and execute – 3 Read, write and execute – 7 (add all three numbers

together) For example:

% ls –l My_perl_file r _ _ r _ _ r _ _ There are three spaces to explain the type access by user: (“read” access), group (nothing/0) and everyone-else (dash/0), respectively. The next three

spaces show the same for the group to which the user belongs and the final three for all other users. In order to change “permissions” to allow the file to run as a program enter the following:

% chmod u+x which only adds (“+”) the setting that gives only the owner (“u”) executing privileges Or, equivalently:

% chmod 600

In the numeric form the last two zeros mean that “group” and “others” privileges are nill. As you

can see the numeric form can alter permissions for all the three types of linux users at once. Here is a summary list of options used for setting file permissions and understanding file types on

the linux system

Abbreviation of user status

Stands for … Abbreviation of file permission

Stands for …

u user r read

g group w write

o others x execute

a all

+ add

- remove

d directory

l link Examples:

Letters symbols Numerical symbols

chmod u+rwx chmod 700

Page 9: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

9

chmod u+rwx

chmod g+rw

chmod o+x

chmod 761

Q. Can I do any damage to another person’s files? TOC Yes, if the files belong to you. You can tell if you own the files by reading the second column

from the ls –l instruction, which has the general form drwxr-xr-x “number of links” “your login name” “your group name” filesize(bytes) date

etc.

Copy a everything a directory and all its contents to your home directory First, make sure you are in your home directory:

% cd

% cp –R /home/refseis17/ ./

% cp –R /home/refseis17/ ./

use Control D or TAB to complete your file name

Copying files across the web securely using sftp TOC From your local machine type

% sftp loginname@remotemachinename

Once you are connected to the remote machine, the following basic instructions will get you going:

help

get download a file over to the directory on the local machine

put upload a file to the remote machine

ls list CONTENTS of the remote machine

lls list directory CONTENTS of the local machine

pwd working directory name of the remote machine

lpwd working directory name of the local machine

Page 10: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

10

(you can also type “help” once you are inside the remote machine)

Deleting files % rm filename

Finding files % locate filename

Renaming files % mv filename

A free linux shell scripting tutorial: http://www.freeos.com/guides/lsst/

Example 1

The text ‘hello’ is assigned to the variable named output The value of the variable is expressed as $output The variable name can be any word.

Example 2

The number 1 is assigned to the variable named value. The value of the variable is expressed as $value

$1 is assigned value 2 from the command line (outside the shell script). This number is the first value on the command line after the prog name

Arithmetic calculations are carried out by a shell program called expr.

% prog_name % prog_name 2

#! /bin/sh

output=’hello’

echo $output

#!/bin/sh echo "Enter the two numbers to be added:" read n1 read n2 answer=$(($n1+$n2)) echo $answer

Plotting your results % gimp

Experiment capturing a screen dump, opening it and then printing it.

Page 11: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

11

Repetitive tasks for action in ‘came.’ ‘saw.’ ‘conquered.’

do

echo 'I ' $action

done

The variable called action has three potential values. Each value is a word that is sent to the screen using echo within the do …done set of instructions. The $ sign in front of action assigns its value to be sent to the screen each time following the word I.

Creating an archive of directories and their contents When it comes to collating all your directories and their content into a single, manageable file that

can keep a record of the directory structure use the useful instruction called tar as follows:

%tar –czvf tarred_file_name directory_to_archive

A file called tarred_file_name is created. Usually it is best to give your tarred file a *.tar ending so you can automatically know what type of file it is in future. In order to open up and generate all directory tree with all its leaves (which are the files contained within ) use the following command:

% tar –xzvf tarred_file_name

If you choose to get ONLY a LISTING of the contents of a tarred file without rebuilding the directory tree and all its contents you can instead use the following command:

% tar –tzvf tarred_file_name >output_file

or if you want to output the listing to the screen use:

% tar –tzvf tarred_file_name

Concatenating files When you have one files you would like to append to another use the

cat file1 file2 > file3

Page 12: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

12

Tutorial on the Use of L_SU V 0.3.3

Background

L_SU (beta) is a graphical user interface (GUI) to select parameters for Seismic Unix (SU) modules. Seismic Unix (Stockwell, 1999) is a widely distributed free software package for processing seismic reflection and signal processing. In Seismic Unix, a sequence of independent programs receive modify and generate data files of streams of data that are displayed on the screen. The data file read in and the generated output data original are handled internally by stdin, stdout functions in C while the data exchanges between programs and the linux operating system are managed from the command line via pipes “|” and redirections “> or <” respectively. Traditionally, the instructions on the command line can be assembled and saved as re-usable bash scripts. L_SU assembles these same scripts for the operating system to run with the help of modules written in Perl. L_SU generates these scripts within the directory of the user and thes scripts can be run independently of L_SU running.

L_SU is written using Perl/Tk which is mature, well-documented Perl module that allows its users

to construct graphical user interfaces.

In a classroom environment, shell scripting of SU modules engages students and helps focus on the theoretical limitations and strengths of signal processing. However, complex interactive processing stages, e.g., selection of optimal stacking velocities, killing bad data traces, or spectral analysis requires advanced flows beyond the scope of introductory classes. In a research setting, special functionality from other free seismic processing software such as SioSeis (UCSD-NSF) can be incorporated readily via an object-oriented style to programming.

An object oriented approach is a first step toward efficient extensible programming of multi-step processes, and a simple GUI simplifies parameter selection and decision making. Currently, in L_SU, Perl 5 packages wrap 19 of the most common SU modules that are used in teaching undergraduate and first-year graduate student classes (e.g., filtering, display, velocity analysis and stacking). Perl packages (classes) can advantageously add new functionality around each module and clarify parameter names for easier usage. For example, through the use of methods, packages can isolate the user from repetitive control structures, as well as replace the names of abbreviated parameters with self-describing names. Moose, an extension of the Perl 5 object system, greatly facilitates an object-oriented style. Perl wrappers are self-documenting via Perl programming document markup language.

An automatic directory structure is created for the user in which data and programs are distributed

according to a pre-defined hierarchy. All the directories and minimal files needed by L_SU are created whenever a new 'Project' is created within the 'Project Selector' tool. The user can also create new projects within main GUI of L_SU as well as selecting different projects. At all times the user can use linux commands to navigate freely through the directories. Sometimes the user may find it convenient to create new subdirectories within the existing file structure. L_SU will not be able to detect these folders and their contents.

How to Use L_SU

Page 13: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

13

File structure

Before starting a new project you should understand the file structure in which programs and data

sets are stored. The main directories are as follows: HOME: This is expected to be the full linux PATH to the user's home directory, e.g.

/home/xavier45 PROJECT_HOME: is located within the HOME directory and refers to the name of the project

area chosen by the user, e.g., Servilleta ( a National Wildlife Refuge in New Mexico, U.S.A.).

Definitions

In the following text, the following abbreviations are used as follows: user refers to the login name of the user projectname refers to the name of the project chosen by the user,

Help

Creation and Selection of a New Project

Start by running the following instruction:

% L_SU

Creation of a New Project

Page 14: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

14

If you do not have any projects created previously in which you want to work, then click on Create New button. After clicking on Create New a default set of entries appears.

Click: Create The following lines can be modified by the user:

Page 15: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

15

By modifying some of the following lines:

HOME /home/gllore to home/username PROJECT_HOME /home/gllore/Servilleta to /home/username/Servilleta site Servilleta to loma-blanca spare_dir “” to ‘’ date to 053018 component Z to H line 2 to 1 subUser gllore to username geomaps no to no sqlite no to no gmt no to no grass no to no The old variables are defaulted from prior projects and serve as an example to guide your input. Only the path to the home directory of the user is required to follow the standard linux file structure naming system. An explanation of each of the variables is as follows

HOME home directory path PROJECT_HOME name of the project located within the home directory—can be a soft link site recognizable name of the area of study spare_dir “” to ‘’ spare directory a bonus directory that can be left empty date of the data collection component Z can be vertical and H can be horizontal but any name is possible line can be used to identify a profile subUser must be set to username geomaps* sqlite* gmt* grass*

* if set to ‘yes’ only the directories will come to be created although the accompanying programs

are not yet available ( Aug 27 2018)

Copy External Data into the Appropriate Directory

If you want to copy seismic data already in su (seismic unix) format copy it with the following instruction, but first move yourself into the directory that receives the data. Example 1:

Page 16: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

16

% cd PROJECT_HOME/seismics/data/site/component/line/username

Example 2:

% cd /home/gom/seismics/data/Servilleta/H/1/gllore

Example 2:

% cp data /home/refseis18/Aug27_lab1/*.su .

Create your First Flow

General Procedures SeismicUnix employs a procedural approach to signal analysis by assembling a sequence of

modules in one of four differently colored flow windows ( grey, pink, green and blue) that appear on the right-hand side of the main window. A module, with a specific functionality, is selected by clicking on its name from within the list on the left-hand side of the main window.

The module name must be transferred to the list on the right by clicking one of the four different

colored flow arrows, just to the right of the word “Flow”. A final assembled flow must first be saved to a file before it is executed (File->SaveAs).

Thereafter all executions require that the flow be first saved before running. In a simple sequence of modules, data are usually read in first, the data is modified and the result

is placed into another file or displayed using an imaging module (e.g., suximage, suxwigb)

First Flow 1. Select the following named modules: data_in, sugain, and suxwigb. Click on each names

inside list on the left side of the window. When you do that, the words in the row immediately above will become activated. You will then be able to click on the words inside the grey box:

Flow-+-> You should be able to see the name of the program that you just selected move over to a colored box on the right-hand side of the window. Select each of the three program names: data_in, sugain, and suxwigb

2. You are required to select a Value for base_file_name (= “file name”).

To do so, move your cursor into the corresponding row to the right of base_file_name. A click of the right-mouse-button will automatically open a second window from which you can select a file, e.g. “1001_clean.su” Please make certain that you select a file with the words: “clean” in its name. These files are guaranteed to be fit for reading.

Before you can run the program you have built, it must be saved: Click on (File/SaveAs)

Page 17: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

17

Page 18: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

18

Save the resultant file as, e.g., “ViewFile.pl” Then, click on (Run)

Lab Homework : “My first flow” You will need to run a sequence of 3 programs in L_SU: data_in, sugain, and suximage Save the sequence in its own file, Click on (File/SaveAs) Then, click on (Run) on the left-hand side of the window. I recommend that you (1) read the help manual that accompanies "suxwigb.pm" from the GUI ( that is, mouse-button

3 click after first selecting the program "suxwigb") (2) play with only one parameter at a time, and carefully evaluate what happens if you change its

value. (3) describe the function of this variable by writing your name, date, and a description and an

optional example in the mark-up comment lines within "suxwigb.pm" I am attaching "suxwigb.pm" , a perl script in which each of you will comment ( 4 times) between the lines that read:

=head2 sub "your subroutine name"

=cut

Also note, in case you have not realized, that the labs we cover are also described in the syllabus at the following link:

http://www.geol.lsu.edu/jlorenzo/ReflectSeismol/labs/L_SU%20Tutorial_1.pdf Please e-mail me back "suxwigb.pm" with your lab homework completed. You can check that you were successful by running

perldoc suxwigb.pm

How to pasting a contiguous set of files into one larger file (Tool: Sucat) (Can you find the typo below?)

Page 19: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

19

How to slice your data ( suwind) Whenyou want to select and save only portions of the data set you can window out these segments

by the value of the header or the range of times collected in the data

Page 20: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

20

tmin=0.001 tmax = 1

How to spike your dataset (suacor and supef)

How to examine the spectral characteristics of a data file interactively (Too: iSpectralAnalysis)

Page 21: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

21

L_SU Installation

Linux Currently we have only installed L_SU on a linux box running the following operating systems:

CentOS7 and on RedHat6.9.

Perl We expect that some issues may arise with whether the necessary CPAN modules have been

correctly loaded. Most linux-type systems come automatically with the Perl language. You can check to see if you have Perl installed by entering the following command:

perl

Loading Perl Modules

Loading cpan

We recommend that the easiest way to install public Perl modules is by FIRST installing a utility that is written in Perl and known as: cpan You will have to have root privileges, at least temporarily when you install cpan and the following modules. Later you will be able to use them in L_SU as a regular user.

% cpan

If you working under CentOS:

% yum install cpan

Additional required Perl freebies

Continue using cpan to install the following required modules: MIME:Base64, Config::Simple, Shell, Tk::JFileDialog, Clone, Tk::Pod, Moose by entering the following commands:

% cpan MIME:Base64

% cpan Config::Simple

% cpan Shell

% cpan Tk::JFileDialog

% cpan Clone

% cpan Tk::Pod

% cpan Moose

Seismic Unix

Page 22: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

22

We recommend that you download Seismic Unix and install the program as per the instructions contained within.

% wget http://www.geol.lsu.edu/jlorenzo/downloads/cwp/cwp_su_all_48.tz

Or, you can navigate with a web browser to http://www.geol.lsu.edu/jlorenzo and click at the link to "Free Geophysics Software"

Sioseis From the SIOSEIS Website: " SIOSEIS is a software package for enhancing and manipulating

marine seismic reflection and refraction data, sponsored by the National Science Foundation (NSF) and the Scripps Industrial Associates. The system currently runs on Mac OSX (PowerPC and Intel) and PCs (Linux and CYGWIN) E-mail [email protected] for inquires. Open source can be downloaded from" http://sioseis.ucsd.edu/index.html. I recommend you read the documentation at this webiste for many details on this valuable software.

We integrate some of its functionality to convert data written in a SEG2 format into SU formatted

data. You can use your browser to navigate to that website and download the file or you can directly

load it into your folder by the following command:

% wget http://sioseis.ucsd.edu/src/sioseis-2016.3.1.tar.bz2

After you untar and decompact this software read the README file to learn how to install the

programs while using root privileges. Later, when L_SU looks for sioseis you should have the path to the binary defined. For example my .bashrc file contains the following because sioseis is found under /usr/local/bin:

export $PATH=$PATH:/usr/local/bin

However, in a more extensive .bashrc file with many other definitions some users also have the

more general definitions:

export LOCAL=/usr/local

export BIN=$LOCAL/bin

export $PATH=$PATH:$BIN

Installation of Core L_SU modules for users and developers Copy the

Page 23: Reflection Seismology Laboratory Exercises Using L SU, a ... Tutorial_1.pdf · widespread computer language ideal for file manipulation. Perl can serve as a simple “glue” to make

23

Development

FAQ’s Q.