Git Product home page Git Product logo

dirack / vfsa Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 820 KB

Very Fast Simulated Annealing global optimization of the zero offset CRS parameters

Home Page: https://www.geofisicando.com

License: GNU General Public License v3.0

C 84.48% Python 10.52% Makefile 3.45% Meson 0.08% Dockerfile 0.16% Shell 1.30%
global-optimization crs geophysics seismic-inversion very-fast-simulated-aneeling madagascar c python3 scons semblance

vfsa's Introduction

Very Fast Simulated Annealing global optimization of the zero offset CRS parameters (VFSA).

Github release License: GPL v3 Madagascar

Result of the convergence test

This package uses Very Fast Simulated Aneeling (VFSA) global optimization inversion to obtain the zero offset Common Reflection Surface (CRS) parameters (RN, RNIP, and BETA) from a reflection data cube (seismic data organized in CMP x half-offset X Time coordinates). These parameters are obtained by fiting the non-hyperbolic CRS traveltime surface in the reflection data cube using the semblance between them as the optimization criterion.

In the image above we show the expected result after VFSA global optimization algorithm application. It shows the convergence of the approximated surface generated with the non-hyperbolic CRS traveltime approximation (midle) with the reflection surface extracted from the data (left). The difference between these two surfaces is the approximation error (right, and not in the same scale). The CRS paramters (RN, RNIP and BETA) that produced the minimum error will be the optimized ones.

Development setup

The vfsa package is designed for the open-source software package Madagascar. You need to have the current Madagascar stable release installed on your computer. Please follow the Installing Madagascar page in the official documentation.

Package installation

After Madagascar installing process, you need to install the programs of this repository in your local Madagascar user's directory. It is a simple process described in details in install dependencies section of our wiki.

Usage example

A few motivating and useful examples of how that product can be used can be found in the usage examples directory. For more details, please refer to the Wiki.

Release History

Please check out the full release history in our Wiki.

Meta

Rodolfo Dirack – @dirack[email protected]

Distributed under the GPL3 license. See LICENSE for more information.

Contributing

In order to contribute with this project you should follow the list of steps bellow, please check out "How to contribute with this project?" in our Wiki for more details.

  1. Create an issue to your request or choose an issue already defined
  2. Fork this project in https://github.com/Dirack/vfsa/fork
  3. Create a branch for your contribution (name it using gitflow)
  4. Do clear commit messages (a title with 50 characters and two paragraphs of text)
  5. Push your contribution to this repository
  6. Create a new Pull Request with a clear description of your contribution
Important: The commit history should be clear, with commit mesages around one or two paraghraps describing your modifications. Pull Requests with unsatisfactory commit history will be rejected.

vfsa's People

Contributors

dirack avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

vfsa's Issues

[BUG] RNIPs parameters are not correct in examples

🐛 Bug report

Describe the bug

For simple models, RNIPs parameters are not inverted correctly. It occurs because you are not using correct coordinates (Half-Offsets instead of Offsets). So, use a flag to inform the program if you are using half-offset coordinates or offsets and treat it properly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Multi thread convergence graph

Build a convergence graph for each thread while using the repeat parameter. Multi thread option should increase precision in parameters optimization

[FEA] Build debug script for sfnhcrssurf

🎉 Feature request

Is your feature request related to a problem? Please describe.

The program sfnhcrsruf does not have a gdb debug script and a makefile command to generate programs version for debugging sesssions

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[FEA] Optimize VFSA algorithm using openmp

🎉 Feature request

Is your feature request related to a problem? Please describe.

This feature is related with feature #17. This feature makes optimization tests with unit tests started in the feature #17.

Describe the solution you'd like

Use openmp library to parallelize the vfsa algorithm and allow faster optimization.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[BUG] Segmentation fault in sfvfsacrsnh applied to multi layer model

🐛 Bug report

Describe the bug

A segmentation faut ocurred when I try to use sfvfsa in the multi Layer experiment. In the Flow above:
https://github.com/Dirack/creGatherStack/blob/28de03dad315b27f817716d42e96c8256498ae36/experiments/multiLayerModel/cre/SConstruct#L62-L66

To Reproduce
Steps to reproduce the behavior:

  1. Run the multi layer experiment with 'scons'
  2. See error when m0=4Km.
< multiLayerDataCube.rsf /root/madagascar/bin/sfvfsacrsnh m0=4 v0=1.5 t0=1 verb=y repeat=3 > crsParameters-m0-4-t0-0.rsf
sfvfsacrsnh: Active mode on!!!
sfvfsacrsnh: Command line parameters: 
sfvfsacrsnh: m0=4.000000 v0=1.500000 t0=1.000000 c0=0.500000 temp0=10.000000 repeat=3
sfvfsacrsnh: Input file parameters: 
sfvfsacrsnh: n1=1001 d1=0.004000 o1=0.000000
sfvfsacrsnh: n2=161 d2=0.012500 o2=0.000000
sfvfsacrsnh: n3=201 d3=0.025000 o3=0.000000
sh: line 1: 13576 Segmentation fault      (core dumped) /root/madagascar/bin/sfvfsacrsnh m0=4 v0=1.5 t0=1 verb=y repeat=3 < "multiLayerDataCube.rsf" > "crsParameters-m0-4-t0-0.rsf"
scons: *** [crsParameters-m0-4-t0-0.rsf] Error 139

Desktop (please complete the following information):

  • OS: Linux CentOS
  • Version 7.8kvm

Additional context

This problem probably occurs because standard aperture used in Mvfsacrsnh.c to define a square of the approximated surface where to calculate the semblance is 50 samples in CMP and Offset coordinates.

To check that, I run sfin program:

sfin multiLayerDataCube.rsf 
multiLayerDataCube.rsf:
    in="/root/rsfdata/experiments/multiLayerModel/cre/multiLayerDataCube.rsf@"
    esize=4 type=float form=native 
    n1=1001        d1=0.004       o1=0          label1="Time" unit1="s" 
    n2=161         d2=0.0125      o2=0          label2="Offset" unit2="Km" 
    n3=201         d3=0.025       o3=0          label3="CMP" unit3="Km" 
	32393361 elements 129573444 bytes

The data cube CMP axis dimension is:

~$ echo "201*0.025" | bc -l
5.025

If someone try to sum up vfsa standard aperture to 4Km (m0 position):

 ~$ echo "4+50*0.025" | bc -l
5.250

[FEA] Use vfsa with a two interface model as input

🎉 Feature request

Is your feature request related to a problem? Please describe.

Use the vfsa programs to get the CRS parameters (RN, RNIP and BETA) in a two interface model with constant velocity layers for both reflector surfaces.

Describe the solution you'd like

Modeling should use a finite difference algorithm in order to build the seismic data cube. After that, repeat the same process in the usage example twice, one for each reflector. Do the same as in the usage example, show the CRS surfaces and error.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[DOC] Change kirchoff modeling usage examples to this repository

:octocat: Documentation request

Describe your documentation request clearly bellow

Change the modeling usage example from creGatherStack repository to this repository.
Those examples are from version v0.1.1-alpha.1 from creGatherStack.

Program version

Version 1.1.2

What kind of documentation you are requesting?

  • README files.
  • Wiki pages.
  • Jupyter notebooks.
  • Other: Reproducible papers

[BUG] The message of the CRS parameters output is in portuguese

🐛 Bug report

Describe the bug
The output of the program, 3 CRS parameters RN, RNIP and BETA appears in portuguese.

To Reproduce
Steps to reproduce the behavior:

  1. Run the usage example
  2. The output on the screen will be:
< dataCube.rsf /home/dirack/madagascar/bin/sfvfsacrsnh m0=5 v0=1.5 t0=1.1 verb=y repeat=2 > crsParameters.rsf
sfvfsacrsnh: Active mode on!!!
sfvfsacrsnh: Command line parameters: 
sfvfsacrsnh: m0=5.000000 v0=1.500000 t0=1.100000 c0=0.500000 temp0=10.000000 repeat=2
sfvfsacrsnh: Input file parameters: 
sfvfsacrsnh: n1=1001 d1=0.004000 o1=0.000000
sfvfsacrsnh: n2=161 d2=0.012500 o2=0.000000
sfvfsacrsnh: n3=401 d3=0.025000 o3=0.000000
sfvfsacrsnh: Parâmetros otimizados:
 RN=2.783287, RNIP=1.187177, BETA=0.005667, SEMB=0.723192
  1. See error in the expression Parâmetros otimizados. That should be in english.

Expected behavior
Expression should be Optimized parameters.

Desktop (please complete the following information):

  • OS: Linux Ubuntu
  • Version 18.04.4

Additional context
The problem is in the line 186 of the Mvfsacrsnh file.

/* Show optimized parameters on screen before save them */
sf_warning("Parâmetros otimizados:\n RN=%f, RNIP=%f, BETA=%f,SEMB=%f",otrn,otrnip,otbeta,otsemb);

[FEA] Usage example with another model

🎉 Feature request

Is your feature request related to a problem? Please describe.
Use another model to generate a different usage example. Use a different reflector interface shape
and velocity model.

Describe the solution you'd like
The same results
showed in the previous example, showing convergence between surfaces and
less error amplitude.

Describe alternatives you've considered
Could be another model and it could use finite differences in the modeling step.

Numerical experiment using VFSA - Constant iteration number

Show the semblance value for a constant number of iterations in function of c0 and temp0 parameters. You will have to choose a t0, m0 coordinate and fix other parameters to apply this convergence test. The purpose is to get the best set of c0, temp0 parameters to use in VFSA global optimization. This will be the ones that produce the best semblance value

[BUG] Program does not check boundaries before execution (segmentation fault error)

🐛 Bug report

Describe the bug

The program does not check data cube limits to prevent out of boundaries errors. It should check for m0 and t0 limits and it should have a variable to define aperture.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following SConstruct (om0 is 1km)
  2. It causes segmentation fault because first CMP is out of boundaries

SConstruct.zip

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Screenshot from 2024-02-27 15-39-12

Desktop (please complete the following information):

  • OS: Linux ubuntu
  • Version 2.2.2

Additional context
Add any other context about the problem here.

[DOC] Build a documentation using Doxygen

:octocat: Documentation request

Describe your documentation request clearly bellow

Program version

What kind of documentation you are requesting?

  • README files.
  • Wiki pages.
  • Jupyter notebooks.
  • Other: Doxygen documentation

[BUG] Parameters uncentainty

🐛 Bug report

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Tests that use 'dummyheader.rsf' file brake in other machines

🐛 Bug report

Describe the bug

Tests that use 'dummyheader.rsf' file brake in other machines. The problem occurs because the 'dummyheader.rsf' file references
a file in Madagascar DATAPATH and that variable could be different from one machine to another

To Reproduce
Steps to reproduce the behavior:

  1. Run tests suite with 'make -C test libraries.test' in repository root dir

Expected behavior

Tests should work in every machine with the same configuration

Screenshots

2024-02-07 10_35_48-Test_vfsacrsnh_lib c - vfsa  Codespaces_ animated barnacle  - Visual Studio Code

Desktop (please complete the following information):

  • OS: Linux
  • Version 20.04

Additional context

[DOC] Wiki page about VFSA algorithm

:octocat: Documentation request

Describe your documentation request clearly bellow
To write a wiki page with decription of the VFSA algorithm and provide references.

Program version
Version 1.0

What kind of documentation you are requesting?

  • README files.
  • Wiki pages.
  • Jupyter notebooks.
  • Other

[FEA] New vfsa version 2.0.1 stable release

🎉 Feature request

New package version with unit tests and documentation.

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

Here I described the way I am thinking to solve this problem...

Describe alternatives you've considered

Here I describe any alternative solutions or features I've considered...

[BUG] Function getRandomNumberBetween0and1() generates the same sequence of random numbers in each iteration

🐛 Bug report

Describe the bug

The function generates the same sequence of random numbers every time the main program is called. I've modified the test getRandomNumberBetween0and1_returns_float_between_0_and_1() in the branch hotfix/32/randomNumberGeneration in order to reproduce this behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /test/libraries
  2. Run the test with 'make'
  3. See error

Screenshot from 2024-02-04 23-30-36

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux
  • Version 20.04

Additional context
Add any other context about the problem here.

[FEA] Create a workflow for continuous deploy and update workflows of CI/CD relation

🎉 Feature request

Is your feature request related to a problem? Please describe.

I have to deploy manually and the workflows repeat some jobs

Describe the solution you'd like

A github action workflow to generate the release automatically and stablish the dependency between workflows

Describe alternatives you've considered

Use the following:

Additional context

Use the following to build dependency between workflows:

Test convergence parameters with VFSA

Use a constant temperature temp0=1.5 and check semblance in function of c0 and the number of iterations. The purpose of this experiment is to show how c0 parameter affects the algorithm convergence to the best semblance value

[FEA] Configure automatic tests of this repository programs on travis CI

🎉 Feature request

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[BUG] Usage example /examples/gaussian_reflector_model is not working properly

🐛 Bug report

Describe the bug

The parameters file input dimension n1 is not correct. The program sfnhcrssurf uses this dimension an an input to read RN, RNIP and BETA parameter from parameters file as a 1D vector. If n1 is minor then 3 the program does not read RNIP and BETA and assign a zero or a memory garbage to the parameter. It results that the non hyperbolic CRS surface generated by the program is full of INF and NAN values. After that the sfgrey program get stuck trying to read it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.