Giter Site home page Giter Site logo

geoscixyz / computation Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 5.0 43.36 MB

notebooks and tutorials on computation in geophysics

Home Page: http://computation.geosci.xyz

License: MIT License

Jupyter Notebook 98.69% Python 1.31%
geophysical-inversions geophysics notebook reproducible-science simpeg tutorial

computation's People

Contributors

fourndo avatar lheagy avatar rowanc1 avatar sgkang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

computation's Issues

notebook for dc?

@sgkang, @micmitch is there a notebook for the DC story that could be added to the notebooks folder to complement the tutorial you have written?

if there are data files / model files etc that you would also like to link, we have set up a bucket on google app engine where they can be stored (right now, it requires manual upload, so if you slack me the files, I can get them up there!)

Notebook: Simulation of a 1D Magnetotelluric Problem

Nice work @sgkang, I like the overall layout!

General comments

  • after the Purpose section, I would consider adding a Resources that includes a link to the SimPEG Mesh documentation and the MT section on EM geosci (and any other resources you think are particularly relevant). Phil's tutorials might be a good place to go as well (https://github.com/jokulhaup/directed_studies)
  • in terms of print statements, I think using format is better practice, eg.
print("Smallest cell size = {min_cs}".format(min_cs = 500*np.sqrt(100/fmax) / 4. ))

Specific comments

Physics

  • within the "Physics" section, the statement of the FDEM and TDEM equations is different, could we make them consistent?
    image

Discretization

  • In the Discretization section - we may want to provide a bit more detail in terms of showing the matrix structure of the discrete gradient (up to you on gauging the expected background of the audience).
  • In terms of the code, step 2 is very well commented, but step 1 would benefit from a few comments (eg. cs is cell size)
  • for step 2, there is a lot that happens in that cell. I have included a screen shot below where I would consider breaking up the pieces (and at each step outputting a plot or statement).
    • for the physical properties, having a plot will be helpful for when you suggest going back and changing the conductivity structure
    • when you create the differential operators, using an imshow plot to show the structure would be valuable
      image

What to Solve

  • to simplify things a bit in the construction of the A matrix, instead of creating tempUp, tempDown,
    image
    I would do it in one go and use spacing / indentation to have it look like the math
A = sp.vstack([
    sp.hstack([Grad, 1j*omega*Mmu]),
    sp.hstack([Msighat, Div])
])

Explore

  • for the plotting, I would suggest using different axes (eg plt.subplots(1,2)) for the apparent resistivity and phase (and include y-axis labels :) )

Questions we should be able to address

  • How should I design a mesh for a:
    • Potential Fields simulation / inversion?
    • DC
    • EM ...
  • what do the regularization parameters do?
  • when is depth / sensitivity weighting appropriate?

Stories --> Examples

I think that "stories" was originally chosen so that it would be distinct from the SimPEG Examples, which are demonstrations of how to use the code. Under the new umbrella of geosci, and being a resource for numerical geophysics, I think that the title "Examples" perhaps is more descriptive for simulations and / or inversions with explanations. Thoughts? cc @rowanc1, @sgkang

Getting started

  • adding a remote account to sourcetree (if new to github / setting up github account)
  • running setup.py for interpolation
  • advanced : installing pymatsolver and using mumps

Tools Page

  • using the notebook
  • Python basics
    • types
    • counting and lists
    • loops and list comprehension
    • if, elif, else
    • functions
  • Numpy Gotcha
    • How many dimensions is that array?
    • Indexing?
    • Thats not how I multiply: Dots and Density.
  • SciPy Gotcha
    • Thinking in Sparse
    • How do I solve you?
      • Moving to mumps (light overview)
  • Matplotlib: How to plot the things
  • Python OOP
    • Classes, Inheritance, Properties, Wrappers, and Self
  • Pointers: Software Carpentry

For an example, use a simple mesh, counting things, etc

Tutorial Contents

Tentative outline

  • pre-requisites : installing python (anaconda), git, using the jupyter notebook
  • quick overview of python, numpy, scipy
  • overview of SimPEG framework and gradient based inversions - using a linear problem
  • SimPEG framework (DC resistivity, EM examples throughout)
    • Mesh class -> how do we construct differential operators
    • Solving a forward simulation
      • how do we solve the PDE's to create data
      • abstracting this into the problem and survey classes
    • sensitivities (motivated by the inverse problem) - overview of organization of sensitivities (light, based on EM paper)
    • mappings and chain rule --> What is your model?
    • stating the inverse problem
      • data misfit
      • regularization
      • statement of the inverse problem
    • solving the inverse problem
      • optimization
      • inversion directives (ie. beta-cooling)
    • bringing it all together to solve an inverse problem

logo

This site needs a logo, and simple enough to create a favicon about it. It should be motivated by numerical tool, SimPEG, computation, reproducibility ... creative ideas welcome cc @rowanc1 @sgkang @dougoldenburg

ideas / call for contributions

add a page outlining potential examples, including a few pointers, that could enhance the site. Invite contributions!

Contributing

Include a Contributing.rst outlining how contributors can best get involved, submit issues and contribute content

Tikhonov vs Simple

image

While we are trying to wrap the conversation around Simple vs Tikhonov, and the whole debate around alpha-values.

I started this notebook using a simple square pulse.
Whenever you guys get the time to add comments....

1DProblem_alphaAnalysis.zip

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.