<jupyter_start><jupyter_text>Parametric 1D DC Resistivity Inversion<jupyter_code>from utils.DCResistivity import DC1D3LayerApp
dc_app = DC1D3LayerApp()<jupyter_output><empty_output><jupyter_text>PurposeHere, we load DC sounding data (VES format), interpret the data and invert the data to recover a 1D resistivity model. The steps for setting up and running and inversion and explained. In this notebook, we specify the number of layers responsible for the data values. The inversion will adjust the thickness and resistivity of these layers when recovering a resistivity model. The final result of the notebook is a 1D resistivity model that has approximately the same structures as the true geology. OutlineThis notebook is used to complete the following steps:- Step 1: Load observed data- Step 2: Manually fit observed VES data with 3 layers- Step 3: Run Parametric Inversion- Step 4: Run inversion  Step 1: Load observed data- **filename:** file name for the observed data. The file is a 'csv' file. It must contain columns named 'AB/2 (m)', 'MN/2 (m)' and 'App. Res. (Ohm m).- **load:** When selected, the notebook will try to load the data file<jupyter_code>dc_app.interact_load_obs()<jupyter_output><empty_output><jupyter_text>Step 2: Manually fit observed VES sounding data using 3-layer appHere, we try a *curve fitting* approach to fit the sounding curve with 3 layers. The Earth may have more complicated structures or have more layers, but this is a good way to explain the most important features in the data. The adjustable parameters for this step are:- $\rho_1$: resistivity of the top layer- $\rho_2$: resistivity of the second layer- $\rho_3$: resistivity of the last layer- $h_1$: thickness of the top layer- $h_2$: thickness of the second layer(The last layer has an infinite thickness)<jupyter_code>dc_app.interact_1d_layer()<jupyter_output><empty_output><jupyter_text>Step 3: Run Parametric Inversion**Assigning Uncertainties**The uncertainties are an estimate of the level of noise on your data. If your data have more noise (error bars are larger), you must assign larger uncertainties. The equation for the uncertainty you assign to each data value is:$$ \text{uncertainty} = 0.01 \times \text{percentage}\times|d^{obs}| + \text{floor}$$The- `percentage (%)`: percentage uncertainty- `floor (ohm-m)`: floor uncertaintyFor apparent resistivity data, it is common to choose a percentage between 2%-10%. The floor value is usually something very small; less than 0.0001 $\Omega m$**Inversion Parameters**Paramters specific to running the inversion are:- $\rho_0$: initial resistivity model- $h_0$: initial thicknesses of all the layers. The bottom layer has infinite thickness.- $n_{layers}$: Number of layers you think there are- `maxIter`: maximum number of iteration (10-30 is ideal)- `run`: run inversion if this is checkedHere are some things to consider when choosing these parameters:- The average resistivity and thickness you used to explain the data in step 2 can be good estimates for $\rho_0$ and $h_0$- The number of segments in the sounding curve can be used to determine how many layers should be used. Using more layers does not guarantee a better result.- If the result does not fit the data, the number of layers could be wrong or the data cannot be explained with a 1D model.<jupyter_code>dc_app.interact_run_inversion()<jupyter_output><empty_output><jupyter_text>Step 4: Explore inversion resultsWe can look at the model for each inversion iteration to see how the model is iteratively updated- `iteration`: inversion iteration<jupyter_code>dc_app.interact_plot_inversion_results()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06978653530377668, 'fraction_numerical': 0.012862616310892173, 'mean_word_length': 5.423550087873462, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '645731', 'license': 'MIT', 'n_tokens_mistral': 1010, 'n_tokens_neox': 942, 'n_words': 499, 'path': 'notebooks/DC-1d-parametric-inversion-app.ipynb', 'repo_name': 'ravisha229/gwb-dc-inversions', 'size': '3654'}