📄 sucmp.su.main
字号:
char* sdoc[] = { SUCMP - CoMPare two seismic data sets, returns 0 to the shell ", if the same and 1 if different sucmp file_A file_B Required parameters: none Optional parameters: limit=1.0e-4 normalized difference threshold value Notes: This program is the seismic equivalent of the Unix cmp(1) command. However, unlike cmp(1), it understands seismic data and will consider files which have only small numerical differences to be the same. Sucmp first checks that the number of traces and number of samples are the same. It then compares the trace headers bit for bit. Finally it checks that the fractional difference of A & B is less than limit. This program is intended as an aid in regression testing changes to seismic processing programs. Expected usage is in shell scripts or Makefiles, e.g. #!/bin/sh #------------------------------------------------------- # Run a test data set and verify the result is correct # If the data doesn't match show the data on the screen. #------------------------------------------------------- ./fubar par=tst1.par sucmp tst1.su ref/tst1.su if [ $? ] then suxwigb <tst1.su & suxwigb <ref/tst1.su & " fi Author: Reginald H. Beardsley rhb@acm.org sucmp - compare two seismic files in CWP/SU format to see if they are the same within the user specified limit. Algorithm: Loop over both input files comparing data values. To be considered the same files must have: - same number of traces - same number of samples per trace - trace values within limits of each other Note that the program exits as soon as the files fail to match. For readability, explicit temporary variables are used which the compiler will optimize away. Braces are used on all conditionals so that a breakpoint can be set to stop the debugger only if the condition is true. Because of the overloading of trace header fields in CWP/SU, the headers are compared bit for bit.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -