DOCUMENTATION
SYNOPSIS
PROGRAM NAME: Sucat.pl
Purpose: Concatenate a series files
AUTHOR: Juan M. Lorenzo DEPENDS: on cat from bash
DATE: May 25
Includes access to a simple configuration file
Simple file is called Sucat.config
Access to simple file is via Sucat2_config.pl
Sucat2_config.pl uses Config::Simple (jdhedden)
as well as SeismicUnix and SystemVariables
packages V 2.10
April 9 2018
removed dependency on Config::Simple (CPAN)
V0.1.5 Now uses sucat.pm instead of bash commands
DESCRIPTION:
USAGE
Sucat
Needs a local configuration file Sucat.config
GUI will generate a new one if needed one, but will
prefer to use the contents of an existant configuration file.
Example Cases
CASE 1A
Use a list (use complete file names but exclude the directory paths) for concatenating iVelan "pick files" (Vrms,time pairs) into the correct format.
A "list", which is found in the $PL_SEISMIC directory contains, e.g.: ivpicks_sorted_par_L28Hz_Ibeam_geom4_cdp1 ivpicks_sorted_par_L28Hz_Ibeam_geom4_cdp11
The starting input format in "par" format is as follows:
(for ivpicks_sorted_par_L28Hz_Ibeam_geom4_cdp1) tnmo=0.0189974,0.113193,0.153562,0.231926 vnmo=59.4778,160.806,195.689,273.761
(for ivpicks_sorted_par_L28Hz_Ibeam_geom4_cdp11) tnmo=0.0316623,0.0759894,0.129815 vnmo=101.006,130.906,263.794
The final output format is:
cdp=3,5 tnmo=0.0189974,0.113193,0.153562,0.231926 vnmo=59.4778,160.806,195.689,273.761 tnmo=0.0316623,0.0759894,0.129815 vnmo=101.006,130.906,263.794
CASE 1B
Use a list (use complete file names but exclude the directory paths) for concatenating iVelan "pick files" (x-coordinate,time pairs) into the correct format.
A "list" which is found in the $PL_SEISMIC directory contains, e.g.:
itop_mute_par_L28Hz_Ibeam_cmp_ep3 itop_mute_par_L28Hz_Ibeam_cmp_ep5
The starting input format in each in "par" format: tnmo=0.0189974,0.113193,0.153562,0.231926 vnmo=59.4778,160.806,195.689,273.761
The final output format is:
The list is expected to be found in $PL_SEISMIC, i.e., ~/pl/"subuser"/
Data_type is determined by parsing the file names and normally contains:
"itop_mute", "ibot_mute" etc." '
(See ~sunix/shell/sucat.pm If "data_type" = "velan" then the concatenated output file will automatically be reformatted for input into sunmo.
If "data_type" = "itop_mute" or "ibot_mute" then the concatenated output file will automatically be reformatted for input into "sumute".
GUI EXAMPLE:
Note that a list can only be used when the values of the prior 7 parameters are blank.
An output name is also required. --Exclude values for first 7 parameters in GUI. --alternative directories are optional.
first_file_number_in =
last_file_number_in =
number_of_files_in =
output_file_name =
input_suffix =
input_name_prefix =
input_name_extension =
list = file name [$PL_SEISMIC]
output_file_name =
alternative_inbound_directory = [$PL_SEISMIC]
alternative_outbound_directory = [$PL_SEISMIC]
---------------------------------------------------------------------------
CASE 2 General concatenation of files with patterns in their names
DO NOT use a list. Instead, include values for at least the first 3 parameters in the GUI, and up to and including values for all the remaining parameters, except the list name. A
An output name is possible but not required.
Example:
first_file_number_in = 1000
last_file_number_in = 1001
number_of_files_in = 2
input_suffix = su
input_name_prefix = cdp
input_name_extension = _clean
list =
output_file_name = 1000_01
alternative_inbound_directory =
alternative_outbound_directory =
The above case will produce carries out the following isntruction
cat DIR1/cdp1000_clean.su DIR1/cdp1001_clean.su > DIR2/1000_01.su
A list CAN NOT be in use when
values exist for any of the following parameters:
first_file_number_in = 1000
last_file_number_in = 1010
number_of_files_in = 11
input_suffix = su
input_name_prefix = cdp
input_name_extension = _clean
CASE 3
If you want to use a list, the list
is a file that contains one
or more file names
first_file_number_in =
last_file_number_in =
number_of_files_in =
input_suffix =
input_name_prefix =
input_name_extension =
list = cat_list_good_sp;
output_file_name = 'All_good_sp';
alternative_inbound_directory =
alternative_outbound_directory =
CASE 4:
first_file_number_in = 1000
last_file_number_in = 1010
number_of_files_in = 11
input_suffix = _clean.su
input_name_prefix =
input_name_extension =
output_file_name = 1000_10
alternative_inbound_directory =
alternative_outbound_directory =
NOTES
The input and output default directories is $PL_SEISMIC
but these can be overridden by the values of the
alternative directories
=head2 CHANGES
V 0.1.2 considers empty file_names May 30, 2019; NM
V 0.1.3 includes additional concatenation for:
(1) sorted ivpicks
V 0.1.4 update NOTES 9.9.21
V 0.1.5 improved USAGE 11.8.22
Declare variables
in local memory space
2. Instantiate classes:
Create a new version of the package with a unique name
Get configuration information
Establish default variables using a *_spec file and defaults defined hereinf or the location of the list file; in PL_SEISMIC
set global imported variables
set the different parameters
includes variables
correct input format values
3. Consider compatible
parameter inputs with and without a list
3. Declare output file names and their paths
inbound and outbound directories
are defaulted but can be different
4. create script to concatenate files
files may use either a default directory or an alternative directory provided by the user Also consider incompatible as well as compatible parameter inputs
A. DEFINE FLOW(S)
B. RUN FLOW(S)
C. LOG FLOW(S)TO SCREEN AND FILE
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 406:
Unknown directive: =header