Wednesday, February 21, 2018
Oil Crash of 2015  ? ... Update
Tuesday, February 6, 2018
Fourier Transform Talk and Python Code
————— 6 Feb 2018 —————
Lecture notes from the Fourier Transform brown bag talk:
————— 5 Feb 2018 —————
Well, it was probably a blur, but we got through a few good ideas. Got this from Max, who organizes the brownbag lecture series. The video he links is, indeed, excellent. Thanks, Max!
Dr. Liner,
————— 1 Feb 2018 —————
I'll be giving an improv brownbag lecture next Monday on campus, here is the flyer. Should be fun!
Lecture notes from the Fourier Transform brown bag talk:
————— 5 Feb 2018 —————
Well, it was probably a blur, but we got through a few good ideas. Got this from Max, who organizes the brownbag lecture series. The video he links is, indeed, excellent. Thanks, Max!
Dr. Liner,
Thanks again for doing Brown Bag! Sorry it cut short, I had forgotten there was a a lab in their at 1:30 and didn't inform you.
Also, if you have time you should check out this introduction to Fourier Transforms: https://www.youtube.com/watch?v=spUNpyF58BY . It has a great intuitive visualization, and may be useful for sending to students who are learning FTs!
Best,
Max
————— 1 Feb 2018 —————
I'll be giving an improv brownbag lecture next Monday on campus, here is the flyer. Should be fun!
Cartoon credit
Fig 1. FFT of 50 Hz sine wave sampled at 1 millisecond (0.001 sec). Lower plot is the Fourier Transform amplitude spectrum.

Fig 2. FFT of 50 Hz square wave showing harmonics. The harmonics arise because the Fourier Transform decomposes the signal into sine and cosine waves that are not a natural fit for square waves. To represent the square wave no singe frequency will suffice, it takes a doubly periodic family of sincos waves: each sincos is periodic in itself and the harmonics are periodic multiples. In the case shown, the nth harmonic (fn) is related to the fundamental (f0) by the rule: fn = f0*(2n+1) where n=0,1,2,... Consequently, it is better practice to describe such signals as, say, 50 cycles per second (cps) and reserve the term Hertz (Hz) for smooth signals. In passing, I note that harmonics can also arise from smooth signals if there is amplitude asymetry present, indicating nonlinear processes are at work. For discussion of this case, see Chapter 2 of my DISC book available from SEG or Amazon.


Python FFT code, most of it is for pretty plotting.
import numpy as np
import matplotlib.pyplot as plt
import scipy.fftpack
from scipy import signal
# Number of sample points
nt = 1000
# sample spacing (seconds)
dt = 0.001
# make the time vector
t = np.linspace(0.0, nt*dt, nt)
# calculate sine function at each time point
y1 = np.sin(50.0 * 2.0*np.pi*t)
# do the FFT
yf = scipy.fftpack.fft(y1)
# make the frequency vector from zero to Nyquist
xf = np.linspace(0.0, 1.0/(2.0*dt), nt/2)
# plot the sine wave and its Fourier amplitude spectrum
plt.subplot(2,1,1)
plt.plot(t,y1)
plt.subplot(2,1,2)
plt.plot(xf, 2.0/nt * np.abs(yf[0:nt/2]))
plt.grid()
plt.ylim(0,1.5)
plt.title('Fourier Transform of 50 Hz Sine Wave')
plt.xlabel('Frequency (Hz)')
plt.ylabel('Fourier Amplitude')
plt.tight_layout()
plt.show()
# calculate the square wave function at each time point
y2 = signal.square(2 * np.pi * 50 * t)
yf = scipy.fftpack.fft(y2)
# plot the square wave and its Fourier amplitude spectrum
plt.subplot(2,1,1)
plt.plot(t,y2)
plt.subplot(2,1,2)
plt.plot(xf, 2.0/nt * np.abs(yf[0:nt/2]))
plt.grid()
plt.ylim(0,1.5)
plt.title('Fourier Transform of 50 Hz Square Wave')
plt.xlabel('Frequency (Hz)')
plt.ylabel('Fourier Amplitude')
plt.tight_layout()
plt.show()
Sunday, January 7, 2018
DISC Rose and Thorn
Encore repost from TUESDAY, JANUARY 8, 2013
After posting this encore, I got a request from John Stockwell to tell the 'counterfeit $ scam' story listed under Worst Incident, so here goes. It was my last day in Buenos Aires and I learned there was a street market near the hotel. I walked the market, being mindful of security and pickpocket threat which is always a possibility. Typically, I will go slowly to one side of the market then the other, pausing to glance for anyone watching, then occasionally do a full stop against a wall to scan the whole scene. These are things you pick up living and working in hazard areas around the world.
At the end of the market there were several taxis and I chose one (did not go with anyone who chose me) and we headed back to the hotel. The cab pulls up 2 blocks from my hotel and points to the meter demanding the payment in local currency, of which I had none. My plan to was to pay via the concierge at the hotel and add it to my bill. It turned into quite a fuss with me saying 'go to the hotel' and him saying 'pay here' and neither understanding much of the other's english. Finally, I pull out my wallet and show him I only have a US $100 bill, which he quickly grabs. Before I could react (1015 seconds max) he hands it back and kicks me out of the cab, I walk to the hotel and fly back stateside that night.
Back home, our yard guy shows up needing to be paid for several visits, about $100, so I pay him cash. He is back at the house in an hour saying, 'The $100 was counterfeit, the bank took it, and the FBI may be looking for you. Oh, and you still owe me $100.' Processing this shocking news, and paying him, I thought back to the cab incident in Argentina. The cabbie must have done a quick switch of my $100 bill, pro quality stuff. When I told this whole story to my daughter Sam, she said: 'It was worth $100 just for the story.' I tend to agree.
 original post 
When my son David was in the Boy Scouts, the troop would often go camping or on a high adventure hiking trip. We had the tradition of taking a few minutes after each long day to reflect on events. Each boy was asked to name the day's rose (best thing) and thorn (bad thing). With so many boys in tight quarters tempers were sure to flare. These events were often the thorns and the reflection time gave the adult leaders a chance to talk it out with the group and then follow up with all the good things that happened.
In that vein, I humbly offer this list of roses and thorns from my year as DISC instructor for 2012.
Most amazing building: Galleria (Milan)
Most amazing event: Earthquake (Milan)
Best pub: Little Creatures Brew Pub (Perth)
After posting this encore, I got a request from John Stockwell to tell the 'counterfeit $ scam' story listed under Worst Incident, so here goes. It was my last day in Buenos Aires and I learned there was a street market near the hotel. I walked the market, being mindful of security and pickpocket threat which is always a possibility. Typically, I will go slowly to one side of the market then the other, pausing to glance for anyone watching, then occasionally do a full stop against a wall to scan the whole scene. These are things you pick up living and working in hazard areas around the world.
At the end of the market there were several taxis and I chose one (did not go with anyone who chose me) and we headed back to the hotel. The cab pulls up 2 blocks from my hotel and points to the meter demanding the payment in local currency, of which I had none. My plan to was to pay via the concierge at the hotel and add it to my bill. It turned into quite a fuss with me saying 'go to the hotel' and him saying 'pay here' and neither understanding much of the other's english. Finally, I pull out my wallet and show him I only have a US $100 bill, which he quickly grabs. Before I could react (1015 seconds max) he hands it back and kicks me out of the cab, I walk to the hotel and fly back stateside that night.
Back home, our yard guy shows up needing to be paid for several visits, about $100, so I pay him cash. He is back at the house in an hour saying, 'The $100 was counterfeit, the bank took it, and the FBI may be looking for you. Oh, and you still owe me $100.' Processing this shocking news, and paying him, I thought back to the cab incident in Argentina. The cabbie must have done a quick switch of my $100 bill, pro quality stuff. When I told this whole story to my daughter Sam, she said: 'It was worth $100 just for the story.' I tend to agree.
 original post 
When my son David was in the Boy Scouts, the troop would often go camping or on a high adventure hiking trip. We had the tradition of taking a few minutes after each long day to reflect on events. Each boy was asked to name the day's rose (best thing) and thorn (bad thing). With so many boys in tight quarters tempers were sure to flare. These events were often the thorns and the reflection time gave the adult leaders a chance to talk it out with the group and then follow up with all the good things that happened.
In that vein, I humbly offer this list of roses and thorns from my year as DISC instructor for 2012.
Most amazing place: Sugar loaf mountain (Rio)
Favorite place: Narita, Japan
Most amazing event: Earthquake (Milan)
Most traffic: Moscow
Least traffic: Midland
Worst passport line: 5 hours (Saudi Arabia)
Best meal: Dora(Buenos Aires)
Best vege food: Le Grenier(Paris)
Least crowded: Stavanger
Most graffiti: Paris
Most expensive hotel: Moscow
Biggest airport: Beijing
Largest class: 110 (Calgary)
Smallest class: 5 (Copenhagen)
31F/1C (Istanbul in Dec)
Best pub: Little Creatures Brew Pub (Perth)
Worst incident:
Subscribe to:
Posts (Atom)