Giter Club home page Giter Club logo

diffractionsimulator's Issues

[BUG] diffraction simulator equation

๐Ÿ› Bug report

Describe the bug

The diffraction hyperbola equation in the usage example is incorrect. The correct equation should consider the root of squared time and half of the velocity (because in diffraction, we consider an exploding point source in a medium with the half of velocity to simulate the two-way traveltimes of the stacked section correctly).

Additional context

  • See the correction explicitly (the first equation, in red, is the squared traveltime and not the traveltime, in green):
       x = x0 + dx*(i-100)
 
        xd.append(round(x/dx))
-       td.append(round((t0*t0 + ((x-x0)*(x-x0))/(v*v))/dt))
+       td.append(round(math.sqrt(t0*t0 + ((x-x0)*(x-x0))/(v*v))/dt))
  • And correct velocity is the half of the medium velocity:
 # Generate a diffraction hiperbola with a convolution
 # between a set of spikes with a ricker pulse
 t0 = 1
-v = 1.6
+v = 1.6/2

[DOC] Write a wiki page for this repository

:octocat: Documentation request

Describe your documentation request clearly bellow

Write a wiki page scratch for this repository to allow new users and programers to know more about the purpose of this project.

Program version

None.

What kind of documentation you are requesting?

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

[FEA] Create a new recipe to migrate simulated diffractions in the stacked section

๐ŸŽ‰ Feature request

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

The original SConstruct and recipe used to stack data is originally designed to deal with reflections and diffraction, so it takes time to migrate the reflections. As we are using only simulated diffractions in our stacked section, it does not need the reflection part.

Describe the solution you'd like

Build a SConstruct and a recipe to deal with the diffraction migration separately.

Describe alternatives you've considered

Create a new function in the recipe to migrate diffractions only.

[FEA] Mdiffsim.c program to simulated diffraction hyperbolas in the stacked section

๐ŸŽ‰ Feature request

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

Simulate diffractions in the stacked section to migrate.

Describe the solution you'd like

Build a Madagascar program to simulate diffraction hyperbolas in the stacked section given (m0, t0) point, an aperture d and a velocity v(m0,t0).

The program should get the amplitude average from (m0,t0) neighborhood and generate the ricker pulse in a window around the calculated diffraction traveltime curve.

Describe alternatives you've considered

Do this in small increments:

  • A program that reads m0, t0, v(m0,t0) and d from stdin and generates the hyperbola.
  • A program that reads m0, t0, v(m0,t0) vectors from '.rsf' files and d from stdin and generates the hyperbolas.

Additional context

[FEA] Generate t0, m0 and v files using sfdd instead of sfspike

๐ŸŽ‰ Feature request

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

The program sfdiffsim needs picked (t0,m0) pairs and hyperbola velocities to generate simulated diffraction response in the stacked section. It's not easy to generate that using sfspike because someone needs to write several parameters, such as k1, nsp, and etc:

# Pick t0's and m0's to be the diffraction hyperbola center
Flow('t0s',None,'spike n1=4 k1=1,2,3,4 nsp=4 mag=0.6,0.65,0.7,0.7')
Flow('m0s',None,'spike n1=4 k1=1,2,3,4 nsp=4 mag=1,1.5,1.75,2')
Flow('v',None,'spike n1=4 k1=1,2,3,4 nsp=4 mag=1.508,1.508,1.508,1.508')

Describe the solution you'd like

Use tuplas and sfdd to generate t0, m0 and v arrays and write that in rsf files in the same way it's done with layers:

  • First describe the tuples:
layers = ((0.30,0.50,0.20,0.30),
          (1.65,1.85,1.55,1.65))
  • Use function array2str to convert tuples in the format read by sfdd:
def arr2str(array,sep=' '):
    return string.join(map(str,array),sep)

vstr = arr2str(velocities,',')

n1 = len(layers[0])
n2 = len(layers)
  • Generate ascii files and rsf files after:
Flow('layers.asc',None,
     '''
     echo %s
     n1=%d n2=%d o1=0 d1=%g
     data_format=ascii_float in=$TARGET
     ''' % (string.join(map(arr2str,layers),' '),
            n1,n2,xmax/(n1-1)))
Flow('layers','layers.asc','dd form=native')

[BUG] Wrong diffraction simulation

๐Ÿ› Bug report

Describe the bug

This bug is described in the issue 13 of the creVelocityInversion package

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: Linux Ubuntu
  • Version 19.04 Focal Fossa

Additional context

[DOC] Write a README file for this repository

:octocat: Documentation request

Describe your documentation request clearly bellow

Write a README scratch file for this repository to explain the purpose of this project.

Program version

None.

What kind of documentation you are requesting?

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

[FEA] Use a ricker filter inside diffraction hyperbola generator

๐ŸŽ‰ Feature request

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

The simulated hyperbolas into stacked section are generated as set of samples with the same amplitude in the #5.

Describe the solution you'd like

Use a ricker filter to generate a ricker pulse and smear it over the calculated hyperbola curve.

Describe alternatives you've considered

You can use the function sf_freqfilt to generate a ricker pulse with an arbitrary amplitude pick.

Additional context

An usage example of this function can be found in Mdiffraction.c and ricker.c programs.

[BUG] origin

๐Ÿ› Bug report

Describe the bug

The program sfdiffsim should be able to receive a stacked section with non zero time axis origin or CMP axis origin, and it should be considered in the determination of the time and CMP window of the hyperbola simulation. Because it is not done in the current version of the program, simulated hyperbolas are not being built in the stacked section.

To Reproduce
Steps to reproduce the behavior:

  1. Using the program sfdiffsim to simulate diffractions in the curent stacked section:
 ~$ sfin stackedSection.rsf 
stackedSection.rsf:
    in="/home/dirack/rsfdata/sfcpu9zIGH"
    esize=4 type=float form=native 
    n1=500         d1=0.004       o1=0.3        label1="t0" unit1="s" 
    n2=50          d2=0.025       o2=3          label2="m0" unit2="Km" 
    n3=1           d3=1           o3=0          label3="" unit3="" 
    n4=1           d4=1           o4=0          label4="" unit4="" 
	25000 elements 100000 bytes

Screenshot from 2020-11-05 23-46-53

  1. Do iterative picking in the stacked section, using creVelocityInversion package to choose the hyperbola centers of the simulation:

Screenshot from 2020-11-05 23-48-41

  1. Run the experiment velocityInversionCreStackedSection.

  2. See error: The simulated sections generated with the experiment does not have the simulated hyperbolas:

Screenshot from 2020-11-05 23-46-53

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 19.04 Focal Fossa

Additional context

[FEA] SConstruct example of diffraction simulation migration

๐ŸŽ‰ Feature request

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

Generate a stacked section with a 3 layers (2 interfaces) model. Simulate the diffraction hiperbolas in the section with the layers velocity and try to migrate it with focusing migration method. Compare modeled and inverted velocities.

Describe the solution you'd like

Use some SConstruct available in Madagascar website to build a simple model, such as the sfunif2 example or sfkirmod_newton.

Describe alternatives you've considered

Let 2 interfaces and 3 layers, and cut all extra ones.

[FEA] Modify the way sfdiffsim receives layers velocity input

๐ŸŽ‰ Feature request

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

Now, program sfdiffsim is receiving a velocity sample for each hyperbola that will be generated in the stacked section.
Modify that behavior of the program to a new one, to receive the layers velocity as input that is assigned to a set of hyperbolas that corresponds to the same reflector.

Describe the solution you'd like

Receiving the velocity for a given set of hyperbolas allow to simulate the hyperbolas for each reflector in a loop.
For instance:

# Loop over reflectors
numberOfReflectors = len(layers)
section = 'stackedSection'

for i in range(numberOfReflectors):

	.
        .
        .

	# Diffraction simulation in stacked section
	Flow([returnedSection,diffSection],[section,t0sFile,m0sFile],
		'''
		diffsim diff=${TARGETS[1]} aperture=1
		t0=${SOURCES[1]} m0=${SOURCES[2]} v=%g freq=10 verb=y
		''' % (velocities[i]))

	section = returnedSection

Program sfdiffsim generates a set of hyperbolas for a given velocity in each iteration of the loop and stores it in a
'diffSection' file. The RSF files 'diffSection' is the simulated diffraction hyperbolas only and 'returnedSection'
is the summation of simulated diffractions plus stacked section given as input.

Describe alternatives you've considered

The picking of (m0,t0) pairs in the stacked section can be done using iterative picking with sfipick program available in Madagascar package.

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.