# Earth Inversion > Computational seismology, structural health monitoring, and scientific software engineering for scalable Earth data systems. Author: Dr. Utpal Kumar — Computational and Data Science Research Specialist, UC Berkeley Seismological Laboratory. Topics: computational seismology, earthquake monitoring, structural health monitoring, Python for scientific computing, geophysical data analysis, and scientific software engineering. Site: https://earthinversion.com Sitemap: https://earthinversion.com/sitemap.xml RSS feed: https://earthinversion.com/feed.xml All posts are teaching-oriented technical tutorials and articles, organized by category below. ## Techniques - [Exploring the Multi-Taper Method: A Robust Approach for Time-Frequency Analysis](https://earthinversion.com/techniques/multi-taper-method-for-time-frequency-analysis/): Explore the Multi-Taper Method’s unique ability to refine spectral estimates in seismology. Leveraging multiple orthogonal tapers, this approach minimizes variance and mitigates spectral leakage, o... - [Read YAML input file in BASH, C/C++ and Python](https://earthinversion.com/techniques/read-yaml-input-file-in-bash-c-and-python/): We will see how to read a YAML file in Bash, C/C++ and Python. - [Threading in C/C++ programming language using pthreads](https://earthinversion.com/techniques/threading-in-c-programming-language-using-pthreads/): Using multiple threads in C for concurrent process flow - [Numerical optimization based on the L-BFGS method](https://earthinversion.com/techniques/the-L-BFGS-optimization-method/): We will inspect the L-BFGS optimization method using one example and compare its performance with the gradient descent method - [How to deal with irregularly sampled time series data](https://earthinversion.com/techniques/how-to-deal-with-irregular-sparse-data-set/): While analyzing time series data, we often come across data that is non-uniformly sampled, i.e., they have non-equidistant time-steps. Infact, most of the recordings in nature are non-uniformly sam... - [Convolution of waveforms using Python compared to MATLAB](https://earthinversion.com/techniques/convolution-of-waveforms-using-python-compared-to-matlab/): We will see compare the convolution functions in Python (Numpy) with the conv function in MATLAB. If you have tried them both then you would know that its not exactly same. - [Solving boundary value problems using the shooting method](https://earthinversion.com/techniques/solving-boundary-value-problems-using-the-shooting-method/): The boundary value problems require information at the present time and a future time. We will see how we can use shooting method to solve problems where we have the boundary constraints. - [Numerically solving initial value problems using the Runge-Kutta method](https://earthinversion.com/techniques/numerically-solving-the-initial-value-problems-using-the-runge-kutta-method/): Runge-Kutta methods are most popular method to solve ordinary differential equations (ODEs) with a better approximation than the Euler method. We compare the third and fourth-order Runge-Kutta esti... - [Numerically solving initial value problems using the Euler method](https://earthinversion.com/techniques/numerically-solving-the-initial-value-problems-using-the-euler-method/): The simplest algorithm to solve a system of differential equations is the Euler method. We understand the Euler method by looking into a simple heat transfer problem. - [How to plot Shear-wave splitting measurements using PyGMT](https://earthinversion.com/techniques/how-to-plot-shear-wave-splitting-measurements-using-pygmt/): How you can plot the shear-wave splitting measurements from splitting database using PyGMT. - [How to implement the iterative Newton–Raphson method to find roots of a function in Python](https://earthinversion.com/techniques/how-to-implement-the-iterative-newton-raphson-method-to-find-roots-of-a-function-in-python/): The Newton–Raphson method (commonly known as Newton’s method) is developed for finding roots of a given function or polynomial iteratively. We show two examples of implementing Newtons method using... - [How effective is the signal denoising using the MATLAB based wavelet analysis](https://earthinversion.com/techniques/how-effective-is-the-signal-denoising-using-the-matlab-based-wavelet-analysis/): We see how to download seismic waveforms, convert them into mat format from mini-seed and then perform denoising using wavelet analysis. We first performed wavelet denoising on the high-frequency s... - [Towards multi-resolution analysis with wavelet transform](https://earthinversion.com/techniques/towards-multi-resolution-analysis-with-wavelet-transform/): We will learn the basic concepts of wavelet tranform and multi-resolution analysis starting from the Fourier Transform, and Gabor Transform. - [Computing cross-correlation and spectrogram of two seismic traces (codes included)](https://earthinversion.com/techniques/computing-cross-correlation-and-spectrogram-seismic-traces/): Read the seismic traces from the miniseed files and compute the cross-correlation and spectrogram - [Principal Component Analysis To Decompose Signals and Reduce Dimensionality (codes included)](https://earthinversion.com/techniques/prinicipal-component-analysis-to-decompose-signal-dimensionality/): Use Principal Component Analysis (via SVD) to decompose a space-time signal into a few dominant modes and reduce its dimensionality, with Python code. - [Signal denoising using Fourier Analysis in Python (codes included)](https://earthinversion.com/techniques/signal-denoising-using-fast-fourier-transform/): We will learn the basics of Fourier analysis and implement it to remove noise from the synthetic and real signals - [The right way to loop in Python (codes included)](https://earthinversion.com/techniques/right-way-loop-in-python/): What is the fastest and most efficient way to loop in Python. We found that the numpy is fastest and python builtins are the most memory efficient. - [Speed-up your codes by parallel computing in Python (codes included)](https://earthinversion.com/techniques/parallel-computing-in-python/): Parallel computing is quickly becoming a necessity. Modern computers comes with more than one process and we most often only use single process to do most of our tasks. Parallel computing is a way ... - [Advanced 2D plots with Matplotlib in Python (codes included)](https://earthinversion.com/techniques/advanced-2D-plots-with-matplotlib/): Codes for plotting advanced 2D plots using matplotlib library in Python. Includes simple 2D plot, error bars, bar graphs, histograms, multiple plots, etc - [Time Series Analysis in Python: Filtering or Smoothing Data (codes included)](https://earthinversion.com/techniques/Time-Series-Analysis-Filtering-or-smoothing-data/): In this post, we will see how we can use Python to low-pass filter the 10 year long daily fluctuations of GPS time series. We need to use the “Scipy” package of Python. - [Visualizing power spectral density using Obspy in Python (codes included)](https://earthinversion.com/techniques/visualizing-power-spectral-density-demo-obspy/): Short demonstration of the ppsd class defined in Obspy using 3 days of data for station PB-B075 - [Monte Carlo Simulation to test for the correlation between two dataset in MATLAB (codes included)](https://earthinversion.com/techniques/monte-carlo-simulations-correlations/): We test for the correlation coefficients or the covariance between two sets of random numbers selected from normal distribution using the Monte Carlo simulations. - [Using GitHub for Team Collaboration](https://earthinversion.com/techniques/using-github-for-team-collaboration/): Tutorial on how to use Git and GitHub for team collaboration on a project. Content includes installing, setting up, creating a repository, making commits, undoing stuffs, creating branches, merging... - [Introduction to Python for beginners](https://earthinversion.com/techniques/introduction-to-python-beginners/): In this tutorial post, I give a quick demo of how to install Python (using anaconda) and then getting started with writing simple scripts. ## Utilities - [Caffeinate On and Off Controls for macOS with Alfred and SwiftBar](https://earthinversion.com/utilities/caffeinate-toggle-macos-alfred-swiftbar/): A compact macOS setup with two Alfred workflows for turning caffeinate on and off, plus SwiftBar for keeping the current status visible in the menu bar. - [Turning Your Home Computer into a Home Server You Can Access Remotely](https://earthinversion.com/utilities/turning-your-home-computer-into-a-home-server-you-can-access-remotely/): Turn your everyday computer into a home server you can access from anywhere using Dynamic DNS, a simple update script, and secure SSH access. - [MacOS File Indexing using Python](https://earthinversion.com/utilities/macos-file-indexing-using-python/): A Python-based solution for indexing and searching files on a macOS system using SQLite, FAISS, and semantic search. - [How to Relocate Your Anaconda or Miniconda Installation on Linux](https://earthinversion.com/utilities/How-to-Relocate-Your-Anaconda-or-Miniconda-Installation-on-Linux/): Navigating the complexities of relocating your Anaconda or Miniconda installation on a Linux system can be daunting. This concise guide provides a step-by-step approach to safely move your environm... - [How to plot the boundaries of the states on the basemap of the USA](https://earthinversion.com/utilities/plot-usa-states-on-basemap/): We will plot the boundaries of the states of the USA on a basemap figure - [How to set up SSH-Keys for Github](https://earthinversion.com/utilities/how-to-add-ssh-key-on-github/): You will learn how to generate and set up an SSH key for github so that you don’t need to always type your username and password when accessing github repo. - [How to load dynamic libraries in C/C++?](https://earthinversion.com/utilities/load-shared-libraries-at-in-c/): We will see how to load shared libraries in C/C++. We will write a library to convert km to degrees and vice-versa. Then we create a utility program to convert km to degrees and vice-versa using th... - [What are linked lists in data structures?](https://earthinversion.com/utilities/linked-list-data-structures/): We look into a quick overview of the idea of linked list data structure with some examples. - [Create beamer slides using Python](https://earthinversion.com/utilities/create-beamer-slides-using-python/): We will use the Python package to create beamer presentation and append existing figures to each slide - [The easiest way to publish a python package on PyPI using Poetry](https://earthinversion.com/utilities/easiest-way-to-publish-a-python-package-using-poetry/): We will learn how to use the poetry package to create, manage, build and publish Python package on PyPI - [How to plot earthquakes data on a three-dimensional topographic map](https://earthinversion.com/utilities/how-to-plot-the-earthquake-data-on-three-dimensional-topographic-map/): Read the earthquake data from a data file and overlay on a three-dimensional topographic map using PyGMT. - [Encrypt your data and software with Python](https://earthinversion.com/utilities/encrypt-your-data-or-software-with-python/): Learn to encrypt and decrypt any files, data or software with python - [Perform Distributed Computing easily using Ray in Python](https://earthinversion.com/utilities/parallel-and-distributed-computing-in-python-using-ray/): We will introduce the concepts of distributed computing and then use the open-source Python library Ray to write scalable codes that can work on distributed system. - [Using dask Python library to read a huge global earthquake catalog file](https://earthinversion.com/utilities/using-dask-python-library-to-read-a-huge-global-earthquake-catalog-file/): We will see how we can read a large data file with earthquake catalog in Python using the Dask library - [Read and write text files in Modern Fortran](https://earthinversion.com/utilities/read-and-write-text-files-in-modern-fortran/): We will read and write text and numeric data into a file using modern fortran. - [How to create a simple Makefile in linux](https://earthinversion.com/utilities/how-to-create-a-simple-make-file/): We learn how to write a Makefile to automate the compilation of our source code. We will use one example from Fortran. - [Efficiently compute spectrogram for large dataset in python](https://earthinversion.com/utilities/efficiently-compute-spectrogram-in-python-using-librosa/): Librosa can efficiently compute the spectrogram for large time series data in seconds. We will use that to plot the spectrogram using matplotlib - [How to overlay shapefile data on PyGMT Maps](https://earthinversion.com/utilities/how-to-overlay-shapefiles-on-pygmt-maps/): We learn how to plot selected shapefile data using geopandas on top of PyGMT maps - [How to extract station data from the web page](https://earthinversion.com/utilities/how-to-extract-station-data-from-the-web-page/): Uses pandas to read the html page and extract the html data into pandas dataframe - [How to plot the earthquakes data on a topographic map](https://earthinversion.com/utilities/how-to-plot-the-earthquake-data-on-a-topographic-map/): Read the earthquake data from a csv file and overlay on a topographic map using PyGMT. - [How to automatically enquire the availability of seismic data using Obspy](https://earthinversion.com/utilities/how-to-automatically-enquire-the-availibilty-seismic-data-using-obspy/): In this post, we will see how can we retrive the available seismic waveforms information for a given network, station, channel and client in a given period of time. - [Make your Python script executable from anywhere in Linux](https://earthinversion.com/utilities/make-your-python-script-executable-from-anywhere-in-linux/): Follow the instructions to make your python script executable from anywhere in Linux system. - [How to securely send data from local client to remote server using Paramiko (codes included)](https://earthinversion.com/utilities/sending-data-from-local-client-to-server-using-paramiko-python/): Paramiko module can be used in Python to securely send data from the local client to the remote server. It is analogous to the SSH and SCP in Linux. - [Concatenating daily seismic traces into one MiniSeed File (codes included)](https://earthinversion.com/utilities/concatenating-daily-seismic-traces-and-plot-spectrogram/): I concatenate the daily seismic traces for 15 days into one miniseed file for further analysis. Then I obtained the spectrogram of the 15 days seismic data. Codes included. - [Analyzing MiniSEED seismic data in MATLAB (codes included)](https://earthinversion.com/utilities/converting-mseed-data-to-mat-and-analyzing-in-matlab/): We will learn how to convert a mseed data file into mat format and then read and analyze it using MATLAB - [How to analyze a huge data file with Pandas (codes included)](https://earthinversion.com/utilities/analyzing-huge-data-file-with-pandas/): We learn how to read huge csv file containing time series data by breaking it into chunks and then visualizing it with matplotlib - [How to start using Pandas immediately for Earth Data Analysis (codes included)](https://earthinversion.com/utilities/how-to-start-using-pandas-immediately-for-earth-data-analysis/): This tutorial gives a brief description of scientific computing using Pandas by introducing Series, DataFrame, Pandas common operations, methods, conditional operations, groupby operations, and rea... - [Introduction to Numpy for scientific computing](https://earthinversion.com/utilities/introduction-to-scientific-computing-using-numpy-python/): This tutorial gives a brief description of scientific computing using numpy by introducing arrays, methods, attributes, random numbers, indexing, broadcasting, operations and functions - [Three-dimensional perspective map of Taiwan using GMT and PyGMT (codes included)](https://earthinversion.com/utilities/Three-dimensional-perspective-map-of-Taiwan-using-GMT-and-PyGMT/): We learn how to make the three-dimensional map using both GMT and PyGMT - [High-quality maps using the modern interface to the Generic Mapping Tools (codes included)](https://earthinversion.com/utilities/High-quality-maps-using-the-modern-interface-to-the-Generic-Mapping-Tools/): GMT or generic mapping tools have become synonymous with plotting maps in Earth, Ocean, and Planetary sciences. It can be used for processing data, generating publication-quality illustrations, aut... - [Easily integrate Custom Functions in MATLAB with Python (codes included)](https://earthinversion.com/utilities/MATLAB-function-in-Python/): How can we use the MATLAB functions in Python? MATLAB implementation are usually reliable as it is developed by the professionals. But the advantages of using Python for scripting is immense. - [Writing and formatting a scientific manuscript in Microsoft Word](https://earthinversion.com/utilities/writing-and-formatting-scientific-manuscripts-in-ms-word/): If you are ready to use the Microsoft Word as your favourite tool for writing your awesome scientific thoughts and ideas into a manuscript, then I would like to share with you my way of writing a s... - [Write ASCII data to MSEED file using Obspy (codes included)](https://earthinversion.com/utilities/write-ascii-to-mseed/): In this post, I will read a ASCII file whose first few lines contains the header information and then the three-component data. I will read using the pandas dataframe and then save it into mseed fi... - [Working with Obspy and Basemap (codes included)](https://earthinversion.com/utilities/obspy-and-basemap/): This post is aimed to resolve the issues regarding the conflicts of using obspy and basemap libraries together. - [GMT tutorial for beginners (codes included)](https://earthinversion.com/utilities/GMT-tutorial-for-beginners/): The Generic Mapping Tools is widely used across Earth and Planetary and other fields of studies to process data and generate high-quality illustrations. This post is the first introduction to begin... - [Writing NetCDF4 Data using Python (codes included)](https://earthinversion.com/utilities/Writing-NetCDF4-Data-using-Python/): NetCDF file format has been designed for storing multidimensional scientific data such as temperature, rainfall, humidity, etc. In this post, we will see how can we write our own data in the NetCDF... - [How to insert equation numbering in MS Word](https://earthinversion.com/utilities/how-to-insert-equation-numbering-in-MS-word/): It is essential to insert equation numbers in your thesis and/or any scientific paper. In this post, I will show you some of the easiest ways to insert equations. Templates are available to use dir... - [Reading NetCDF4 Data in Python (codes included)](https://earthinversion.com/utilities/reading-NetCDF4-data-in-python/): In Earth Sciences, we often deal with multidimensional data structures such as climate data, GPS data. It ‘s hard to save such data in text files as it would take a lot of memory as well as it is n... - [Writing scientific papers in Ulysses](https://earthinversion.com/utilities/writing-scientific-papers-in-ulysses/): Ulysses is a natural, freestyle way of writing. If you got any idea, just write it down, worry about the format and other things when you’re done. Don’t let technology hinder your thinking. - [PyGMT: High-Resolution Topographic Map in Python (codes included)](https://earthinversion.com/utilities/pygmt-high-resolution-topographic-map-in-python/): A hands-on tutorial on plotting a high-resolution topographic map in Python with PyGMT — built up one layer at a time, with interactive checks. - [Plotting track and trajectory of tropical cyclones on a topographic map in Python (codes included)](https://earthinversion.com/utilities/plotting-hurricane-track-on-map/): Short demonstration of how to plot the track or trajectory of a hurricane on a map. Codes are included. - [Topographic map clipped by coastlines in Python (codes included)](https://earthinversion.com/utilities/plotting-clipped-coastline-relief-map/): This post demonstrate how to use Python to set up clip topographic map based on coastlines. - [Topographic map with shading in Python (codes included)](https://earthinversion.com/utilities/Shaded-topo-map-python/): Generating GMT style shaded relief map in Python - [How to plot topographic station map in Python (codes included)](https://earthinversion.com/utilities/station_map_python/): We read the station information from a file to plot the 1 arc-minute relief map - [Plotting 1 arc-minute global relief map in Python (codes included)](https://earthinversion.com/utilities/topographic-map-in-python/): Plotting 1 arc-minute topographic map in python - [GMT Advanced Tutorial, Part II (codes included)](https://earthinversion.com/utilities/GMT-advanced-continued/): Plotting publishable quality maps using generic mapping tools (GMT) - [Why we should use generators? [Python]](https://earthinversion.com/utilities/generators/): Generators don’t hold the entire result in memory. It yields one result at a time. - [GMT Advanced Tutorial (codes included)](https://earthinversion.com/utilities/GMT-advanced/): Plotting publishable quality maps using generic mapping tools (GMT) ## Webapps - [Build a Multilingual Local Voice Journal App with FastAPI and Whisper (Beginner Guide)](https://earthinversion.com/webapps/build-a-local-voice-to-text-journal-app-with-fastapi-and-whisper/): A beginner-friendly walkthrough to build and run Whisper Journal with multilingual dictation, local Whisper transcription, AI-assisted title/tag generation, and local SQLite storage. - [From Code to Monitoring: FastAPI Calculator DevOps Pipeline (Complete Beginner Guide)](https://earthinversion.com/webapps/fastapi-calculator-devops-pipeline-complete-beginner-guide/): A practical, beginner-friendly walkthrough of a complete FastAPI DevOps workflow: clean code, layered testing, CI with Jenkins and GitHub Actions, and runtime monitoring with Prometheus and Grafana. - [How to host a http server on your linux computer to share files](https://earthinversion.com/webapps/how-to-host-a-http-server-on-your-linux-computer-to-share-files/): Spin up a zero-dependency web server with Python’s built-in http.server to share files or preview a site on your local network. - [Build a Flask Web Application: Sea Level Rise Monitoring (codes included)](https://earthinversion.com/webapps/build-a-flask-web-application-sea-level-rise-monitoring/): This post gives a quick introduction on how to build a web application using Flask and deploy on Heroku server. Then, I share my codes for building advanced web application for sea-level rise monit... - [Interactive data visualization in Python using Bokeh](https://earthinversion.com/webapps/interactive-data-visualization-in-python-using-bokeh/): A basic to advanced guide to making interactive plots in Bokeh. ## Statistics - [Understanding the Metropolis-Hastings Algorithm: A Step-by-Step Guide with Python Examples](https://earthinversion.com/statistics/understanding-the-metropolis-hastings-algorithm/): The Metropolis-Hastings algorithm is a cornerstone of Markov Chain Monte Carlo (MCMC) methods, enabling us to generate samples from complex probability distributions. This post breaks down the algo... - [Maximum likelihood estimation for the regression parameters](https://earthinversion.com/statistics/maximum-likelihood-estimation-with-examples-in-python/): We will learn the basics of the maximum likelihood method, and then apply it on a regression problem. We will also compare it with the least-squares estimation method. - [Hypothesis test for the significance of linear trend using the Monte Carlo simulations (codes included)](https://earthinversion.com/statistics/hypothesis-test-for-the-significance-of-linear-trend-using-the-monte-carlo-simulations/): We pose a null hypothesis and enquire that given that the null hypothesis is true, how likely is the observed pattern of results? This likelihood is known as the p-value, and indicates the statisti... - [Easy Statistical Analysis using the tools of MATLAB (codes included)](https://earthinversion.com/statistics/statistical-analysis-in-matlab/): Visualize the statistics of the data using MATLAB: mean, median, std, interquartile range, skewness, kurtosis, t-statistic, degrees of freedom - [Hypothesis Test in MATLAB (codes included)](https://earthinversion.com/statistics/hypothesis-testing/): Using Randomization to test the disprove the null hypothesis - [Estimation of the degrees of freedom of time series in Python (codes included)](https://earthinversion.com/statistics/degrees-of-freedom-estimation/): Two time series with predominant linear trends (very low DOF) can have a very high correlation coefficient, which can hardly be construed as an evidence for meaningful physical relationship. ## Geophysics - [Markov Chain Monte Carlo for Geoscientists](https://earthinversion.com/geophysics/markov-chain-monte-carlo-for-geoscientists/): An intuitive guide to MCMC: a walker in the fog whose footprints map the posterior. We build a Metropolis sampler from scratch, check it against an exact analytic answer, and then use it to locate ... - [Probabilistic Earthquake Location with NonLinLoc](https://earthinversion.com/geophysics/probabilistic-earthquake-location-with-nonlinloc/): How NonLinLoc locates earthquakes by mapping a full probability density over the search volume instead of iterating to a single point — the Bayesian idea, the EDT likelihood, oct-tree search, and w... - [How to plot great circle path through your region using PyGMT](https://earthinversion.com/geophysics/plotting-great-circle-path-pygmt/): In this article, we will learn how to visualize the great circle paths that traverse a designated region of interest using PyGMT. Understanding these paths is crucial for rigorous seismic tomograph... - [A Quick Overview on Geospatial Data Visualization using PyGMT](https://earthinversion.com/geophysics/A-Quick-Overview-on-Geospatial-Data-Visualization-using-PyGMT/): We will see how to plot a topographic map, overlay earthquake data on topographic maps, plot focal mechanism solutions and plot tomographic results on a geographic map. - [How to read tabular data from a text file in Fortran](https://earthinversion.com/geophysics/How-to-read-tabular-data-from-a-text-file-in-Fortran/): A step-by-step Fortran program to read a formatted tabular Earth-model file — count the rows, allocate arrays, then read the columns and find the discontinuities. - [Empirical Orthogonal Function analysis to inspect the spatial coherency in the geospatial data (codes included)](https://earthinversion.com/geophysics/empirical-orthogonal-function-analysis-to-inspect-spatial-coherency-of-geospatial-data/): Empirical Orthogonal Functions analysis decomposes the continuous space-time field into a set of orthogonal spatial patterns along with a set of associated uncorrelated time series or principal com... - [Wavelet analysis applied to the real dataset in a quick and easy way (codes included)](https://earthinversion.com/geophysics/Wavelet-analysis-applied-to-the-real-dataset-in-a-quick-and-easy-way/): An introduction to the wavelet analysis for a real geophysical data set. I compared the analysis to the Fourier analysis. Codes included! - [Genetic Algorithm: a highly robust inversion scheme for geophysical applications (codes included)](https://earthinversion.com/geophysics/An-introduction-to-genetic-algorithm-a-useful-inversion-scheme/): An introduction to the basics of genetic algorithm along with a simple numerical example and solution of an earthquake location problem - [The easy way to compute and visualize the time & frequency domain correlation (codes included)](https://earthinversion.com/geophysics/computing-cross-correlation-between-seismograms/): In geophysics, it is important to understand and identify the complex and unknown relationships between two time-series. Cross-correlation is an established and reliable tool to compute the degree ... - [Monte Carlo methods and earthquake location problem (codes included)](https://earthinversion.com/geophysics/monte-carlo-methods-and-earthquake-location/): The common geophysical problems most often have multimodal objective function with many possible minima. In this post, we will look into the Monte Carlo methods to solve such a hypothetical earthqu... - [Plotting a record section using Obspy (codes included)](https://earthinversion.com/geophysics/plotting-record-section-using-obspy/): Quickly plot record section of a stream using Obspy. I will introduce you how to make a stream from a set of SAC data, plot the record section and store it as a figure. - [Least-Squares Method in Geosciences (codes included)](https://earthinversion.com/geophysics/least-squares-method/): Least-squares method is a popular approach in geophysical inversion to estimate the parameters of a postulated Earth model from given observations. This method estimates the solution of an inverse ... - [Time-Frequency Analysis in MATLAB (codes included)](https://earthinversion.com/geophysics/time-frequency-analysis-in-matlab/): A signal has one or more frequency components in it and can be viewed from two different standpoints: time-domain and frequency domain. In general, signals are recorded in time-domain but analyzing... - [How to avoid common mistakes in analyzing correlations of two time-series](https://earthinversion.com/geophysics/avoiding-common-mistakes-correlation/): Most often data analyst consider correlation between two time-series as a causation effect. Two time-series are correlated that does not imply that one causes the other. - [Estimation of the degrees of freedom for time series (codes included)](https://earthinversion.com/geophysics/estimation-degrees-of-freedom/): Numerical tests to understand the degrees of freedom in time series - [Numerical tests for seismic resolution (codes included)](https://earthinversion.com/geophysics/Seismic-Resolution/): Seismic resolution and fidelity are the two important measures of the quality of the seismic record and the seismic images. Seismic resolution quantifies the level of precision, such as the finest ... - [Locating Earthquakes using Geiger’s Method (codes included)](https://earthinversion.com/geophysics/Locating-Earthquake-using-Geigers-Method/): Simple earthquake location problem and its solution using Geiger’s method - [Exploratory Factor Analysis (codes included)](https://earthinversion.com/geophysics/exploratory-factor-analysis/): Factor Analysis is an exploratory data analysis method used to search influential underlying factors or latent variables from a set of observed variables - [Time Series Analysis in Geophysics (codes included)](https://earthinversion.com/geophysics/Time-Series-Analysis-in-Geophysics/): Time-series analysis is essential in most fields of science, including geophysics, economics, etc. Most of the geophysical data comes in a time-series format, including the seismic recordings. In t... - [Getting started with Obspy: Downloading waveform data (codes included)](https://earthinversion.com/geophysics/getting-started-with-obspy-for-seismologists-part-I/): Obspy is an open-source Python framework developed for the processing of seismological data. In this post, I will introduce how to use Obspy along with some details of the required Python steps. - [Simple wave modeling and Hilbert Transform in Matlab (codes included)](https://earthinversion.com/geophysics/modeling-waves-motion-matlab/): We demonstrate how to model a simple wave, obtain its frequencies, apply Hilbert transform, and perform edge detection - [Plotting seismograms with increasing epicentral distance using Python (codes included)](https://earthinversion.com/geophysics/plotting-distance-vs-seismogram/): Short demostration of how to plot the distance vs seismic waveforms and mark the P and S arrival times using the IASP91 earth model. Codes are included. - [Automatically Plotting Record Section for an Earthquake in the Given Time Range in Python (codes included)](https://earthinversion.com/geophysics/automatically-plotting-seismic-section-python/): Python code to automatically plot the record section for the highest magnitude earthquake in the given time range - [Numerical Tests on Travel Time Tomography [MATLAB]](https://earthinversion.com/geophysics/numerical-tests-travel-time-tomography/): Introduction to the concepts of tomography with equations and codes. Introduction to the concepts of overdetermined, underdetermined and mix-determined problems in Tomography. - [Plotting the geospatial data clipped by coastlines in Python (codes included)](https://earthinversion.com/geophysics/plotting-the-geospatial-data-clipped-by-coastlines-in-python/): In geosciences, we most frequently have to make geospatial plots, but the available data is unevenly distributed and irregular. We like to show the data, in general, for the whole region and one wa... - [Non-linear curve fitting to a model with multiple observational variables in MATLAB (codes included)](https://earthinversion.com/geophysics/Non-linear-curve-fitting/): How to fit data to non-linear model ## Lifehacks - [How to Sync Zotero Files Using WebDAV and Google Drive with Koofr: A Step-by-Step Guide](https://earthinversion.com/lifehacks/how-to-sync-zotero-files-using-webdav-and-google-drive-with-koofr/): Learn how to seamlessly sync your Zotero files across devices using WebDAV with Koofr and Google Drive. This step-by-step guide ensures your research materials are accessible on both your Mac and i... - [Some Handy Mac Tweaks [macOS]](https://earthinversion.com/lifehacks/mac-handy-tweaks/): Some handy tweaks for mac like relocating default screenshot location, renaming batch files etc - [Introduction to Automating Mac [macOS]](https://earthinversion.com/lifehacks/mac-automation-introduction/): Mac can be easily automated by the help of several tools such as automator, quick actions, applescripts - [iPhone Shortcut to Quickly Log Body Temperature [iOS]](https://earthinversion.com/lifehacks/log-body-temperature-ios-shortcuts/): Shortcut code for quickly logging temperature in Apple health app - [Mac Quick Action to Rate the Songs in Apple Music App [macOS]](https://earthinversion.com/lifehacks/mac-quick-action-to-rate-apple-music/): Quick action for mac to easily love, dislike, rate songs in apple music app ## Desktopapps - [SeismoAlert: A real-time earthquake monitoring toolkit in Python (codes included)](https://earthinversion.com/desktopapps/seismoalert-real-time-earthquake-monitoring-toolkit/): I built SeismoAlert to fetch USGS earthquake data, run statistical analysis, detect anomalies, and generate interactive maps from a single CLI. - [PyQt5 Application for visualizing ambient sound in real-time (codes included)](https://earthinversion.com/desktopapps/pyqt5-application-for-visualizing-ambient-sound-in-real-time/): A PyQt5 application for retrieving and visualizing sound waveforms in real time. Codes included. - [A modern system monitor app in Python (codes included)](https://earthinversion.com/desktopapps/system-monitor-app-in-python/): I built a cross-platform Python desktop app to monitor CPU, RAM, disk, processes, and network usage in real time. ## Datascience - [The Impact of Cloud Computing on Geophysical and Seismological Research](https://earthinversion.com/datascience/the-impact-of-cloud-computing-on-geophysical-and-seismological-research/): Cloud computing is transforming geophysical and seismological research by enabling scalable processing, faster collaboration, and reproducible workflows for large scientific datasets. - [Understanding Docker: A Beginner’s Guide for Geophysics Students](https://earthinversion.com/datascience/understanding-docker-a-beginners-guide-for-geophysics-students/): A practical introduction to Docker for geophysics students, including images, containers, volumes, and a simple workflow for reproducible seismic data analysis. - [Getting Started with Databricks for Big Data Analysis](https://earthinversion.com/datascience/getting-started-with-databricks-for-big-data-analysis/): Learn how to set up Databricks, create your first Spark cluster, upload data, and run PySpark notebooks for scalable big data analysis. - [Solving a Toy Earthquake Location Problem Using a Genetic Algorithm](https://earthinversion.com/datascience/solving-a-toy-earthquake-location-problem-using-a-genetic-algorithm/): Discover how Genetic Algorithms can be applied to solve the earthquake location problem in seismology. This post walks through generating synthetic seismic data, implementing a GA to estimate earth... - [RabbitMQ for Seismic Waveforms: Enabling Reliable Data Communication](https://earthinversion.com/datascience/rabbitmq-for-seismic-waveforms-enabling-reliable-data-communication/): Learn how to use RabbitMQ with Python to publish and consume seismic waveform messages reliably in real time for distributed seismology workflows. - [Mastering Large Data Processing with mpi4py in Python](https://earthinversion.com/datascience/mastering-large-data-processing-with-mpi4py-in-python/): Explore the power of mpi4py for simplifying data distribution in parallel computing with its efficient broadcast functionality, which seamlessly sends data from one process to all others, enabling ... - [What is Pink Noise and how is it different from White Noise?](https://earthinversion.com/datascience/pink_noise_vs_white_noise/): Pink noise, also known as 1/f noise or flicker noise, is a type of random signal that has equal energy per octave. It is called pink because it is analogous to pink light, which has a power spectru... - [Object Oriented Programming (OOP) with examples in Python](https://earthinversion.com/datascience/Object-Oriented-Programming-(OOP)-with-examples-in-Python/): This post explains the concepts of object-oriented programming (OOP) and its key features, including encapsulation, abstraction, inheritance, and polymorphism. It provides examples of how these con... - [Using mpi4py for Parallel Computing in Python on Supercomputers](https://earthinversion.com/datascience/using-mpi4py-for-parallel-computing-in-python-on-supercomputers/): The article discusses the mpi4py module, which is a Python wrapper for MPI, used for parallel computing in supercomputing environments. It provides higher-level constructs for parallel programming ... - [Genetic Algorithm: a highly robust inversion scheme for geophysical applications](https://earthinversion.com/datascience/an-introduction-to-genetic-algorithm-a-useful-inversion-scheme/): An introduction to the basics of genetic algorithm along with a simple numerical example and solution of an earthquake location problem ## Machinelearning - [Autoencoders for Seismic Waveforms: Compress, Learn, and Generate](https://earthinversion.com/machinelearning/autoencoders-and-variational-autoencoders-for-seismology/): Autoencoders learn compact representations by reconstructing seismic data. This tutorial explains their use in compression, denoising, representation learning, anomaly detection, and newer generati... - [A quick look into the Sktime for time-series forecasting (codes included)](https://earthinversion.com/machinelearning/a-quick-look-into-the-Sktime-for-time-series-forecasting/): I used the sktime library to forecast the airline data using NaiveForecaster, KNeighborsRegressor, Statistical forecasters, and auto ARIMA model. ## Deep-learning - [From Phase Pickers to Seismic Foundation Models](https://earthinversion.com/deep-learning/from-phase-pickers-to-seismic-foundation-models/): Foundation models ask whether one pretrained representation of seismic waveforms can support picking, detection, classification, and other downstream tasks—without pretending that regional validati... - [Automatic P/S Phase Picking with Deep Learning Using SeisBench](https://earthinversion.com/deep-learning/automatic-p-s-phase-picking-with-deep-learning-using-seisbench/): Load a waveform with ObsPy, run a pre-trained PhaseNet (or EQTransformer) model from SeisBench, and plot the picked P and S arrivals — a hands-on bridge from classic to ML phase picking. - [Modern Seismic Monitoring Systems: How ML and the Cloud Build Earthquake Catalogs](https://earthinversion.com/deep-learning/modern-seismic-monitoring-systems/): A tour of how modern earthquake-monitoring systems turn continuous seismic waveforms into earthquake catalogs — the ML pipeline of picking, association, and location, and the cloud systems (QuakeFl... - [How to read a scientific research paper using a large language model?](https://earthinversion.com/deep-learning/how-to-read-a-scientific-research-paper-using-a-large-language-model/): Python script to read a PDF document, and perform question-answering on the document, and to generate an output based on the provided query - [Transfer learning applied on the unsplash data using alexnet pretrained network (codes included)](https://earthinversion.com/deep-learning/transfer-learning-applied-on-unsplash-data-using-alexnet/): Transfer learning using the pre-trained deep learning networks from MATLAB can be easily implemented to achieve fast and impressive results - [Getting familiar with PyTorch data structures (codes included)](https://earthinversion.com/deep-learning/pytorch-an-introduction-for-geophysicists/): In this introduction to the concepts of Pytorch data structures, we will learn about how to create and reshape tensors using Pytorch and compare it with the Numpy data structures. ## Blogging - [The Need for Structural Health Monitoring in the San Francisco Bay Area](https://earthinversion.com/blogging/the-need-for-structural-health-monitoring-in-the-san-francisco-bay-area/): The San Francisco Bay Area combines high seismic hazard, dense urban exposure, and aging infrastructure. Structural Health Monitoring can improve post-earthquake assessment, reduce downtime, and st... - [Integrating MEMS Accelerometers and Broadband Seismometers: Challenges and Opportunities in Modern Seismology](https://earthinversion.com/blogging/integrating-mems-accelerometers-and-broadband-seismometers/): While MEMS accelerometers offer advantages in cost, size, and deployment flexibility compared to traditional broadband seismometers, they face limitations in recording long-period seismic waves. Th... - [Understanding MEMS Accelerometers](https://earthinversion.com/blogging/understanding-mems-accelerometers/): While MEMS accelerometers offer advantages in cost, size, and deployment flexibility compared to traditional broadband seismometers, they face limitations in recording long-period seismic waves. Th... - [Cosmic Whispers: Scientists Detect Universe-Wide Gravitational Wave Background](https://earthinversion.com/blogging/cosmic-whispers-scientists-detect-universe-wide-gravitational-wave-background/): Scientists have found compelling evidence for low-frequency gravitational waves permeating the entire universe, opening a new window into cosmic phenomena. This discovery, made by analyzing 15 year... - [Structural Health Monitoring Using Low-Cost Sensors and Wireless Networks](https://earthinversion.com/blogging/structural-health-monitoring-using-low-cost-sensors-and-wireless-networks/): The advent of low-cost Microelectromechanical Systems (MEMS) sensors has revolutionized Structural Health Monitoring (SHM) of buildings, enabling cost-effective damage identification strategies. By... - [Convert any text to lifelike speech using Amazon Polly](https://earthinversion.com/blogging/convert-any-text-to-lifelike-speech-using-amazon-polly/): We will see how we can use amazon web services, specifically amazon polly to convert any text into a speech - [How to install jekyll on Apple M1 Macbook](https://earthinversion.com/blogging/how-to-install-jekyll-on-appple-m1-macbook/): If you have recently bought a M1 mac and have been doing blogging using Jekyll, then you must have experienced that installing Jekyll on the M1 architecture is not so straightforward. We will see h... - [How to link Unsplash images directly to your jekyll blog](https://earthinversion.com/blogging/how-to-link-unsplash-images-directly-to-your-jekyll-blog/): How can you link unsplash images directly to your blog without hosting it locally. ## Structural-health-monitoring - [When Frequency Changes Signal Structural Damage](https://earthinversion.com/structural-health-monitoring/when-frequency-changes-signal-structural-damage/): An unexpected drop in a building’s natural frequency is the structure reporting that it has lost stiffness — usually the first sign of damage. Here is why to flag it, and how to confirm it. ## Collections - ObsPy tutorials: https://earthinversion.com/mycollections/ - Methods & algorithms: https://earthinversion.com/mycollections/ - Downloads and tools: https://earthinversion.com/downloads/ - About the author: https://earthinversion.com/about-me-page/