Skip to content

Commit

Permalink
Merge pull request #58 from Dirack/develop/3.0.0
Browse files Browse the repository at this point in the history
Develop/3.0.0
  • Loading branch information
Dirack committed Mar 7, 2024
2 parents 07ec329 + d86a0f9 commit e5710ea
Show file tree
Hide file tree
Showing 24 changed files with 64 additions and 39 deletions.
9 changes: 5 additions & 4 deletions Mvfsacrsnh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions debug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debug/gdb_scripts/gdb_script_nhcrssurf
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion debug/gdb_scripts/gdb_test
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion debug/gdb_scripts/gdb_test_mtgraph
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion debug/gdb_scripts/gdb_test_varlim
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
4 changes: 2 additions & 2 deletions debug/test_data_cube/README.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions debug/test_data_cube/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 \<type\> for _feature_, _documentation_ or _hotfix_, as described in step 3):

```sh
~$ git push origin <type>/issue/ID
git push origin <type>/issue/ID
```

Then do a _pull request_ from this '\<type\>/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.
Expand Down
2 changes: 1 addition & 1 deletion docs/VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3
3.0.0
4 changes: 2 additions & 2 deletions examples/fullParametersOptimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/gaussian_reflector_model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ exatracted from the data cube. Finally, we plot these surfaces and approximation
You can obtain them running:

```sh
~$ sfdisfil <crsParameters.rsf
sfdisfil <crsParameters.rsf
0: 4.725 0.2558 -0.001232 0.5248
```

Expand Down
4 changes: 1 addition & 3 deletions examples/kirchhoff_modeling/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
# License: GPL-3.0 <https://www.gnu.org/licenses/gpl-3.0.txt>.

__author__="Rodolfo Dirack <rodolfo_profissional@hotmail.com>"
__version__="1.0"
__site__="https://www.geofisicando.com"

Help('''
Kirchhoff modeling example for a gaussian reflector
===================================================
Author: %s
Version: %s
Site: %s
''' % (__author__,__version__,__site__))
''' % (__author__,__site__))

# Madagascar library
from rsf.proj import *
Expand Down
2 changes: 1 addition & 1 deletion infra/scripts/version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion test/bug/issue_32/Makefile
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion test/bug/issue_46/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile
#
# Purpose: Run tests related with issue #46.
# Purpose: Run tests related with issue 46.
#
# Site: https://www.geofisicando.com
#
Expand Down
2 changes: 1 addition & 1 deletion test/bug/issue_46/Test_nhcrssurf_lib.c
Original file line number Diff line number Diff line change
@@ -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
*
Expand Down
4 changes: 1 addition & 3 deletions test/search_window/varlim/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ from rsf.proj import *
import math

__author__="Rodolfo Dirack <rodolfo_profissional@hotmail.com>"
__version__="1.0"
__site__="https://www.geofisicando.com"

Help('''
Expand All @@ -31,9 +30,8 @@ Help('''
global optimization
Author: %s
Version: %s
Site: %s
''' % (__author__,__version__,__site__))
''' % (__author__,__site__))

Help('''
### Kirchhoff modeling ###
Expand Down
8 changes: 7 additions & 1 deletion test/test_parameters/convergence_graph/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Generate convergence graph for VFSA

A convergence graph is a graph of Semblance x iteration
A convergence graph is a graph of Semblance x iteration

Run this test with scons:

```
scons view
```
8 changes: 7 additions & 1 deletion test/test_parameters/fixed_temp0/README.md
Original file line number Diff line number Diff line change
@@ -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
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
```
8 changes: 7 additions & 1 deletion test/test_parameters/fixed_trial_moves/README.md
Original file line number Diff line number Diff line change
@@ -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
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
```
6 changes: 6 additions & 0 deletions test/test_parameters/mt_convergence_graph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 1 addition & 3 deletions test/test_parameters/mt_convergence_graph/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import math
import subprocess

__author__="Rodolfo Dirack <rodolfo_profissional@hotmail.com>"
__version__="1.0"
__site__="https://www.geofisicando.com"

Help('''
Expand All @@ -32,9 +31,8 @@ Help('''
global optimization
Author: %s
Version: %s
Site: %s
''' % (__author__,__version__,__site__))
''' % (__author__,__site__))

Help('''
### Kirchhoff modeling ###
Expand Down
6 changes: 6 additions & 0 deletions test/test_parameters/mt_fixed_temp0_c0/README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit e5710ea

Please sign in to comment.