geoscixyz / em_examples Goto Github PK
View Code? Open in Web Editor NEWpython code for running the apps in http://github.com/geoscixyz/em_apps
Home Page: http://em.geosci.xyz
License: MIT License
python code for running the apps in http://github.com/geoscixyz/em_apps
Home Page: http://em.geosci.xyz
License: MIT License
updated to be consistent with DC plate
We need a couple images and a synthetic example to demonstrate DC resistivity underground.
For the synthetic example, a single example showing the non-uniqueness of it the target is above (eg. at location a) or below (eg. at location b) in a line of data. @micmitch : do you have an example showing this?
Using the SimPEG cyl code, simulate a VMD over a layered earth
Parameters
Plot
I see the keyword "Waveform" in this function, but it does not appear to do anything? @sgkang, can you confirm? If it does not do anything, we should remove the toggle buttons to remove confusion.
@dougoldenburg and @sgkang leave this weekend to present the DISC in Taiwan, Korea and Japan! To make sure things are running smoothly with the updated code, we need authors to open up their apps on azure notebooks and make sure that
(a) The notebook is up to date - ping me on slack if not
(b) The app runs without errors
(c) interactions with the apps work as expected (no duplicating plots etc).
Once you have checked an app, please edit this issue by putting a tick in the box below to give it your green-light
The notebook: /em_examples/notebooks/geophysical_surveys/DCR_Pseudo-section_Simulation.ipynb is currently failing. Please see lines 422 and on in the travis log, partially copied below
@dccowan : Do we still need the CVXopt package?
Here are a few things we notice during DISC Vancouver:
The notebook: em_examples/notebooks/maxwell1_fundamentals/DipoleWidget_ED.ipynb is currently failing. Please see the travis log starting at line 499
All the recent update is in master branch
Find all singular points where we are having errors, and make em-geosci figure with a proper error message
Restructuring of notebook format, and add some guiding questions (note that we have four notebooks: FD_ED, FD_MD, TD_ED, TD_MD)
Modularize current analytic functions for dipoles
update to be consistent with plate
For each of
plot the sensitivity function for a single datum in a 2D simulation of a half-space
if __name__ == '__main__':
at the end so that the script can be run as-is (then we can add testing to it eg. if it runs, it passes, similar to SimPEG Examples)x
, y
, z
are... are they source location?, measurement location?)if
statements (not as high of priority as the other 2)Two loops - outer we drive a time-varying current, inner is the target and we observe currents
Plots
cc @sgkang
Based on the 2D cylinder app, we need a plate app! The main impact here is examining the impact of shape on the charges and sensitivity
Parameters:
x is the reference
To view:
Also want to integrate the charges along the surface to get a total charge for each face of the plate
Currently, kappa=1
is the default for the FDEM dipolar apps. The default should be zero (eg. the permeability is equal to that of free space)
https://github.com/geoscixyz/em_examples/blob/master/em_examples/FDEMDipolarfields.py#L64
ipywidgets.interact
does not give you any control over layout of the widgets. Since we have so many widgets hooked up, we should specify the layout so that we are not affected by updates in defaults (like a change from vertical layout to horizontal!)
We should be doing something along the lines of:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import FloatSlider, interact, VBox, interactive, fixed
from IPython.display import display
def plotMe(a, b, c, d, e, f, g):
fig, ax = plt.subplots(1,1)
x = np.linspace(0, 1, 50)
y = a + b*x + c*x**2 + d*x**3 + e*x**4 + f*x**5 + g*x**6
ax.plot(x, y)
plt.show()
return ax
iplot = interactive(
plotMe,
a=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
b=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
c=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
d=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
e=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
f=FloatSlider(min=-1.,max=1., value=0, step=0.1 ),
g=FloatSlider(min=-1.,max=1., value=0, step=0.1 )
)
f = plotMe
w = VBox(iplot.children)
f.widget = w
defaults=dict([(child.description, child.value) for child in iplot.children])
iplot.on_displayed(plotMe(**defaults))
display(w)
<matplotlib.axes._subplots.AxesSubplot at 0x10f8fd310>
continuous_update=False
for all slider barsmapping
should be changed to sigmaMap
update to be consistent with plate
The analytic solution in the notebook has the opposite sign as the analytic solution in EM GeoSci. Also, the signs of Ex and Hy in the app plots support a wave which should be propagating upwards not downwards. Please fix the signs.
the code to run the electrostatic sphere example (https://github.com/simpeg/simpeg/blob/a9c9ce6bc8658317f3ad3e763b44cdc9db884f29/SimPEG/Examples/sphereElectrostatic_example.py) should be included in util_codes and the associated notebook updated to import the necessary code from there.
This replaces the issue geoscixyz/em#159
Using the SimPEG 3D code simulate a HMD over a layered earth
Parameters
Plot
(may require computing and storing results)
for distribution and ease of deployment, we need to separate the code from the notebooks so each exists in its own repository. First, we should merge in all of the existing work
The notebook: /em_examples/notebooks/physical_properties/ConductivityGenFigs.ipynb is failing.
See travis log starting at line 361 (partially copied below)
It looks like the file:
em_examples/notebooks/maxwell1_fundamentals/Viz_Dipoles.ipynb
is corrupted (it is no longer json). Perhaps someone did a merge on the notebook?
(see lines 438 of the travis log
)
I would suggest going back in the git history and finding a previous version of this notebook that works.
Add travisCI testing to notebooks
#74 implements an update to Base.py to deal with these 2 things: include a manual option and avoid duplicated figures.
The main drawback that I was not able to fix is that now, when you load the widget for the first time, there is no figure at all. You have to run it at least one to see the figure appears.
Another drawback (inconsistency due to the difference between interact and interactive functions):
app with manual = False are created and displayed through:"app = auto_app(); display(app)"
app with manual = True are created and displayed through:"app = manual_app()" only (display would duplicate it)
doc: ###http://ipywidgets.readthedocs.io/en/latest/examples/Using%20Interact.html
Currently, the tests are failing on python 3: https://travis-ci.org/geoscixyz/em_examples (I have made these "allowed failures" for now). The apps should be upgraded to python 3
print "Hello World"
should be
print("Hello World")
Once we have a passing version on python 3, we can ensure that all future additions also pass on python 3.
@dccowan: could you take a crack at this? Don't hesitate to ping on slack with questions :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.