diff --git a/Mvfsacrsnh.c b/Mvfsacrsnh.c index 1bdca01..af26c25 100644 --- a/Mvfsacrsnh.c +++ b/Mvfsacrsnh.c @@ -55,22 +55,23 @@ int main(int argc, char* argv[]) float beta_max, beta_min; // BETA limits bool varlim; // y, variable search window to parameters int itmax; // Maximum VFSA iterations + /* TODO: Tests and examples for variable interval option */ float t0i, t0f; int ki, kf; bool interval; bool half; // Use half-offset instead of offset bool get_convergence_graph; // Option to generate a convergence graph bool get_mt_convergence_graph; // Option to generate a multi thread convergence graph - float **mtgraph=NULL; - char strerr[50]; - bool useprecseed; + float **mtgraph=NULL; // Multi thread convergence graph matrix + char strerr[50]; // Buffer for error messages + bool useprecseed; // Option for use a more precise random seed generator int mMAX, hMAX; // Option to define aperture in CMP and Offset /* RSF files I/O */ sf_file in; /* Seismic data cube A(m,h,t) */ char* parametersFilesLabels[6] = {"rnmaxfile","rnminfile","rnipmaxfile","rnipminfile","betamaxfile","betaminfile"}; float** parametersFilesVectors[6] = {NULL,NULL,NULL,NULL,NULL,NULL}; - sf_file parameters=NULL; + sf_file parameters=NULL; // TODO: Example for this parameters option (variable interval) sf_file out; /* RN, RNIP, BETA, Semblance, C0, Temp0, t0, m0 */ sf_file outgraph=NULL; /* Convergence graph */ sf_file mtoutgraph=NULL; /* Multi thread convergence graph */ diff --git a/debug/README.md b/debug/README.md index d5adb4b..7e0e7ae 100644 --- a/debug/README.md +++ b/debug/README.md @@ -5,7 +5,7 @@ VFSA programs. The programs versions are compiled for gdb and arguments are load using gdb scripts. In the directory 'test\_data\_cube', dummy data is build to be offered as input in debugging sessions. -Above, the debugging options: +Bellow, the debugging options: - GDB debug session: Run 'make' or 'make vfsa.x' or 'make nhcrssurf.x' to generate the executable vfsa.x or 'nhcrssurf.x' @@ -17,13 +17,13 @@ file can be used to load all arguments needed to run the program in GDB. Use ## Usage examples -To run 'vfsa.x' with a gdb script called 'gdb\_script' use: +To run 'vfsa.x' with a gdb script called 'gdb\_script' in 'gdb\_scripts' directory use: ``` gdb --command=gdb_scripts/gdb_script ./vfsa.x ``` -To run 'nhcrssurf.x' with a gdb script called 'gdb\_script\_nhcrssurf' use: +To run 'nhcrssurf.x' with a gdb script called 'gdb\_script\_nhcrssurf' in 'gdb\_scripts' directory use: ``` gdb --command=gdb_scripts/gdb_script_nhcrssurf ./nhcrssurf.x diff --git a/debug/gdb_scripts/gdb_script_nhcrssurf b/debug/gdb_scripts/gdb_script_nhcrssurf index e6b5936..6c8ec72 100644 --- a/debug/gdb_scripts/gdb_script_nhcrssurf +++ b/debug/gdb_scripts/gdb_script_nhcrssurf @@ -1,7 +1,7 @@ # gdb_script (GDB Script) # # Purpose: Load test parameters in GDB. Use the command -# 'source gdb_script' inside gdb shell to load args. +# 'source gdb_script_nhcrssurf' inside gdb shell to load args. # # Site: https://www.geofisicando.com # diff --git a/debug/gdb_scripts/gdb_test b/debug/gdb_scripts/gdb_test index f5c5020..0f556f6 100644 --- a/debug/gdb_scripts/gdb_test +++ b/debug/gdb_scripts/gdb_test @@ -1,7 +1,7 @@ # gdb_script (GDB Script) # # Purpose: Load test parameters in GDB. Use the command -# 'source gdb_script' inside gdb shell to load args. +# 'source gdb_test' inside gdb shell to load args. # # Site: https://www.geofisicando.com # diff --git a/debug/gdb_scripts/gdb_test_mtgraph b/debug/gdb_scripts/gdb_test_mtgraph index ba1c494..5aaeff5 100644 --- a/debug/gdb_scripts/gdb_test_mtgraph +++ b/debug/gdb_scripts/gdb_test_mtgraph @@ -1,7 +1,7 @@ # gdb_script (GDB Script) # # Purpose: Load test parameters in GDB. Use the command -# 'source gdb_script' inside gdb shell to load args. +# 'source gdb_test_mtgraph' inside gdb shell to load args. # # Site: https://www.geofisicando.com # diff --git a/debug/gdb_scripts/gdb_test_varlim b/debug/gdb_scripts/gdb_test_varlim index 28e1fe6..bbc986e 100644 --- a/debug/gdb_scripts/gdb_test_varlim +++ b/debug/gdb_scripts/gdb_test_varlim @@ -1,7 +1,7 @@ # gdb_script (GDB Script) # # Purpose: Load test parameters in GDB. Use the command -# 'source gdb_script' inside gdb shell to load args. +# 'source gdb_test_varlim' inside gdb shell to load args. # # Site: https://www.geofisicando.com # diff --git a/debug/test_data_cube/README.md b/debug/test_data_cube/README.md index bb30285..f69efd5 100644 --- a/debug/test_data_cube/README.md +++ b/debug/test_data_cube/README.md @@ -1,3 +1,3 @@ -# Generate data for debug vfsa package +# Generate data for debugging vfsa package -Generate a datacube and parameters files for vfsa debug session using scons. +Generate a datacube and parameters files for vfsa debugging session using scons. diff --git a/debug/test_data_cube/SConstruct b/debug/test_data_cube/SConstruct index 16bcaf7..8786d1c 100644 --- a/debug/test_data_cube/SConstruct +++ b/debug/test_data_cube/SConstruct @@ -3,11 +3,11 @@ # # SConstruct (Madagascar Script) # -# Purpose: Generate data for debug vfsa package +# Purpose: Generate data for debugging vfsa package # # Site: https://www.geofisicando.com # -# Programer: Rodolfo A. C. Neves (Dirack) 10/11/2020 +# Programmer: Rodolfo A. C. Neves (Dirack) 10/11/2020 # # Email: rodolfo_profissional@hotmail.com # diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index baf3a91..74b09d4 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -40,13 +40,13 @@ The default branch (main or master) and development branch names follow the rule The branch merge follows _gitflow_ rules: -- These branches are opened and merged in the current development branch: _feature_, _documentation_, and _test_. +- These branches are opened and merged in the current development branch: _feature_, _documentation_, and _hotfix_. - These branches are opened and merged in _master_: _develop_, and _hotfix_. - The branch _master_ receives modifications from _develop_ and bug corrections from _hotfix_ -- The branch _develop_ receives modifications from any other branch, including bug corrections from _master_ +- The branch _develop_ receives modifications from any other branch, including bug corrections from _master_ and _hotfix_. ## 4. Do clear _commit_ messages (a title with 50 characters and two paragraphs of text) @@ -89,7 +89,7 @@ If you add a new file, it is important to add descriptive headers in the top of After you check your modifications and commit history are following the required steps above, you can push them to your forked version of this repository with the following command (substitute \ for _feature_, _documentation_ or _hotfix_, as described in step 3): ```sh -~$ git push origin /issue/ID +git push origin /issue/ID ``` Then do a _pull request_ from this '\/issue/ID' branch in your repository to the correct branch in this repository: your base branch and destine branch names should follow the rules described in step 3. diff --git a/docs/VERSION.md b/docs/VERSION.md index 5859406..4a36342 100644 --- a/docs/VERSION.md +++ b/docs/VERSION.md @@ -1 +1 @@ -2.2.3 +3.0.0 diff --git a/examples/fullParametersOptimization/README.md b/examples/fullParametersOptimization/README.md index 9c6a88c..15b6fac 100644 --- a/examples/fullParametersOptimization/README.md +++ b/examples/fullParametersOptimization/README.md @@ -7,7 +7,7 @@ In this usage example we use the same gaussian reflector model as input and kirc * Run 'scons' in this directory (it may take some time): ```sh -~$ scons +scons ``` ## Expected outcomes @@ -21,7 +21,7 @@ offset window around Central CMP m0. The parameters cube in 'crsParameters.rsf' file is organized as follows: ```sh -~$ sfin crsParameters.rsf +sfin crsParameters.rsf crsParameters.rsf: in="/home/rodolfo/rsfdata/vfsa/examples/fullParametersOptimization/crsParameters.rsf@" esize=4 type=float form=native diff --git a/examples/gaussian_reflector_model/README.md b/examples/gaussian_reflector_model/README.md index 654c644..bf0636b 100644 --- a/examples/gaussian_reflector_model/README.md +++ b/examples/gaussian_reflector_model/README.md @@ -11,7 +11,7 @@ exatracted from the data cube. Finally, we plot these surfaces and approximation * Run 'scons view' in this directory (it may take some time): ```sh -~$ scons view +scons view ``` ## Expected outcomes @@ -24,7 +24,7 @@ exatracted from the data cube. Finally, we plot these surfaces and approximation You can obtain them running: ```sh - ~$ sfdisfil . __author__="Rodolfo Dirack " -__version__="1.0" __site__="https://www.geofisicando.com" Help(''' @@ -22,9 +21,8 @@ Help(''' =================================================== Author: %s - Version: %s Site: %s - ''' % (__author__,__version__,__site__)) + ''' % (__author__,__site__)) # Madagascar library from rsf.proj import * diff --git a/infra/scripts/version_check.sh b/infra/scripts/version_check.sh index 73ba863..52feee1 100755 --- a/infra/scripts/version_check.sh +++ b/infra/scripts/version_check.sh @@ -2,7 +2,7 @@ # # Check current version based on active develop branch name -CURRENTVERSION="2.2.3" +CURRENTVERSION="3.0.0" VERSIONDOC=$(cat docs/VERSION.md) diff --git a/test/bug/issue_32/Makefile b/test/bug/issue_32/Makefile index 54e3c02..0496e56 100644 --- a/test/bug/issue_32/Makefile +++ b/test/bug/issue_32/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Purpose: Run tests for libraries and functions. +# Purpose: Run tests for bug related on issue 32. # # Site: https://www.geofisicando.com # diff --git a/test/bug/issue_46/Makefile b/test/bug/issue_46/Makefile index 633dd5f..2997d9b 100644 --- a/test/bug/issue_46/Makefile +++ b/test/bug/issue_46/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Purpose: Run tests related with issue #46. +# Purpose: Run tests related with issue 46. # # Site: https://www.geofisicando.com # diff --git a/test/bug/issue_46/Test_nhcrssurf_lib.c b/test/bug/issue_46/Test_nhcrssurf_lib.c index 9856db7..ca9bd36 100644 --- a/test/bug/issue_46/Test_nhcrssurf_lib.c +++ b/test/bug/issue_46/Test_nhcrssurf_lib.c @@ -1,7 +1,7 @@ /* * Test_nhcrssurf.c (C) * -* Purpose: Test of the functions in the library of the program 'Mnhcrssurf.c'. +* Purpose: Test for bug related on issue 46. * * Site: https://www.geofisicando.com * diff --git a/test/search_window/varlim/SConstruct b/test/search_window/varlim/SConstruct index b54aa9d..292884c 100644 --- a/test/search_window/varlim/SConstruct +++ b/test/search_window/varlim/SConstruct @@ -20,7 +20,6 @@ from rsf.proj import * import math __author__="Rodolfo Dirack " -__version__="1.0" __site__="https://www.geofisicando.com" Help(''' @@ -31,9 +30,8 @@ Help(''' global optimization Author: %s - Version: %s Site: %s - ''' % (__author__,__version__,__site__)) + ''' % (__author__,__site__)) Help(''' ### Kirchhoff modeling ### diff --git a/test/test_parameters/convergence_graph/README.md b/test/test_parameters/convergence_graph/README.md index b5188ae..2b882f8 100644 --- a/test/test_parameters/convergence_graph/README.md +++ b/test/test_parameters/convergence_graph/README.md @@ -1,3 +1,9 @@ # Generate convergence graph for VFSA -A convergence graph is a graph of Semblance x iteration \ No newline at end of file +A convergence graph is a graph of Semblance x iteration + +Run this test with scons: + +``` +scons view +``` diff --git a/test/test_parameters/fixed_temp0/README.md b/test/test_parameters/fixed_temp0/README.md index e96a5e8..277c4bb 100644 --- a/test/test_parameters/fixed_temp0/README.md +++ b/test/test_parameters/fixed_temp0/README.md @@ -1,3 +1,9 @@ # Generate a convergence surface - Fixed temp0 -In this test of parameters fix temp0 and generate a semblance surface of C0 x number of iterations \ No newline at end of file +In this test of parameters fix temp0 and generate a semblance surface of C0 x number of iterations + +Run this test with make: + +``` +make view +``` diff --git a/test/test_parameters/fixed_trial_moves/README.md b/test/test_parameters/fixed_trial_moves/README.md index 7ad59b7..c2ce7af 100644 --- a/test/test_parameters/fixed_trial_moves/README.md +++ b/test/test_parameters/fixed_trial_moves/README.md @@ -1,3 +1,9 @@ # Generate a convergence surface - Fixed Number of iterations -In this test of parameters fix the number of iterations and generate a semblance surface of C0 x temp0 \ No newline at end of file +In this test of parameters fix the number of iterations and generate a semblance surface of C0 x temp0 + +Run this test with make: + +``` +make view +``` diff --git a/test/test_parameters/mt_convergence_graph/README.md b/test/test_parameters/mt_convergence_graph/README.md index b871df8..0b69ac4 100644 --- a/test/test_parameters/mt_convergence_graph/README.md +++ b/test/test_parameters/mt_convergence_graph/README.md @@ -2,3 +2,9 @@ This test generate a convergence graph for multi thread execution with vfsa. This multi thread execution is controled by the repeat parameter. The value of the repeat parameter is the number of threads used in vfsa optimization + +Run this test with scons (pass the number of threads to be used with the ngraphs parameter): + +``` +scons view ngraphs=5 +``` diff --git a/test/test_parameters/mt_convergence_graph/SConstruct b/test/test_parameters/mt_convergence_graph/SConstruct index 66c67ad..74fcd41 100644 --- a/test/test_parameters/mt_convergence_graph/SConstruct +++ b/test/test_parameters/mt_convergence_graph/SConstruct @@ -21,7 +21,6 @@ import math import subprocess __author__="Rodolfo Dirack " -__version__="1.0" __site__="https://www.geofisicando.com" Help(''' @@ -32,9 +31,8 @@ Help(''' global optimization Author: %s - Version: %s Site: %s - ''' % (__author__,__version__,__site__)) + ''' % (__author__,__site__)) Help(''' ### Kirchhoff modeling ### diff --git a/test/test_parameters/mt_fixed_temp0_c0/README.md b/test/test_parameters/mt_fixed_temp0_c0/README.md index 570a6c5..740e30f 100644 --- a/test/test_parameters/mt_fixed_temp0_c0/README.md +++ b/test/test_parameters/mt_fixed_temp0_c0/README.md @@ -1,3 +1,9 @@ # Generate a semblance surface for multi thread execution This test generate a semblance surface for number of threads x number of iterations. The parameters temp0 and C0 are fixed + +Run this test with make: + +``` +make view +```