This is my building, I want to know how much each floor moves in an earthquake... Also it would be nice to know the acceleration experienced by each floor. First off we need some data. I have an earthquake data file containing ground acceleration data from the Kobe earthquake of 1995. It is a matlab file, so the data will have to be extracted into a numpy format. Scipy has an io module which contains a matlab submodule. Since we want to visualize this data somehow, the pylab package will also be used. Firstly I'll make a small helper function that enforces complex symmetry, useful for after the frequency domain analysis: from scipy.io import matlab as mio from pylab import plot , show , ylabel , xlabel , title , figure , legend , annotate import numpy as np def enforce_complex_sym ( array , nyquist ): '''Enforce complex symmetry''' array [:, nyquist + 1 :] = np . conj ( array [:, nyquist - 1 : 0 : - 1 ]) Next I'l
Ramblings about developing software. May contain traces of Java, Python, Scala, Typescript.