Now we're getting to the fun stuff! Actual visualized data. This map holds a place near and dear to my heart, if only because it showed that through all the coding and picking and re-picking and picking part 3, we've managed to get something. Even if it doesn't really seem to say much, results are results.
Thus, you've just seen the focal mechanisms of twenty or so quality-controlled earthquakes that occurred in Oklahoma from 11/10 to 12/30. We had to toss out a lot of events along the way, unfortunately, because the picks didn't offer enough variation with either takeoff angle or azimuth. We then had to toss even more out because depths were too shallow to get a clear image, or there simply weren't enough events. The poor quality focal mechanisms were pretty apparent -- they were telling us that both thrust and normal faults occurred in this clearly strike-slip zone. Ah well -- survival of the fittest, earthquake style (except the earthquakes are at our mercy, a switcheroo from the typical where we're at the mercy of fault ruptures. Ha-hah!).
It looks like my last several days will be dedicated to visualizing the data in different ways in order to find trends -- for instance, color-coding events by depth or by time, creating a histogram of strikes, etc. This, unfortunately, is a little more hassle than I would wish, as GMT is picky and can't parse text files by itself, and thus every sub-section needs its own text file. I'm contemplating the pros and cons of automating the system -- pros, it would definitely be an aide to my mentors down the line, as they intend to continue with picking (I don't think anybody expected that we'd get 2/3rds of our events thrown out by either HASH or quality checks after HASH). Cons, I'd still need to figure out how to properly flesh out the code / make a more dynamic GMT script file / it might take more time than I have. I guess I could work on it after I leave Pasadena -- goodness knows I'll be flying all day Wednesday, I can test on my own computer, and SSH is really all I need to get something up and running on my mentor's server.
I really can't believe that this internship is almost over. What happened to all the time? I just sold my bike on Craigslist, and have started wrapping up things here -- my refrigerator is conveniently nearing empty (after eating fajitas for lunch for four days straight), so I fancy that I'll do a blow-out, eat-at-every-place-I've-wanted-to-eat-at affair for the next several days. Hot dogs, pizza, cocktails, and Mexican food, here I come! I have been so utterly spoiled by the quality of the Mexican food here and in New Mexico; I don't know how I'm going to manage once I'm back in Rhode Island and all I have is a Chipotle. Life simply won't be the same.
Other things in life: more rock climbing, a lot more going to the gym, and a lovely weekend visit to San Francisco. I'm beginning to fall in love with California.
There's still work to do. It's actually really nice that there's still work to do, because it's good to feel as if research / optimization is an ongoing process. Last few days, here we come! I imagine you'll hear from me shortly. :D
Over and out!
It's been an exciting day today!
Firstly, I felt my first southern California earthquake! (USGS page!) It was a M4.4 earthquake, so it was strong enough to be felt and little else; I was lying on my bed when I felt the building jerk for a passing moment before falling still again. My first instinct was to hope that it was an earthquake for the following two reasons: 1) because it would be cool to feel an earthquake, and 2) because if it wasn't an earthquake, it would mean that my building had some rather major structural problems. Much to my relief, the USGS page was updated very shortly after the event, so my fears of a temporary eviction were dispelled.
This is the second earthquake that I've felt -- the first was the Virginia earthquake last summer, an earthquake which inconvenienced some CVS employees when several items were jogged off the shelves.
Secondly, and more related to my research itself, I have first-round results for my project! My mentor graciously did the third-time-around picking of the Oklahoma dataset last week (I was on vacation back home in Northern Virginia last week). The week before last, I had focused on writing scripts that would make focal mechanism calculation a walk in the park once we got the data. Of course, HASH and f77 were still picky and gave me a bit of grief, but I'm grateful to two-weeks-prior-me who threw together all the scripts. They ended up working quite well: there was script written to pull data from SAC, another script written to sort data from SAC into event folders, and my most darling script that took the HASH output, reorganized it, and put it into a GMT script in one fell swoop. Automation is beautiful.
Without further ado, the tinest thumbnail of my results (I didn't have the time to resize everything in GMT, so it looks like an incoherent mess of focal mechanisms right now):
Look at those focal mechanisms. Look at all the strike-slip events! They're lining up along a fault that hasn't been mapped; the triangles are where our sensors were. I'm looking forward to going in tomorrow and making the data more readable / coherent.
It's weird to think that I only have two weeks left in Pasadena. This summer really has been lovely, but where has all the time gone? I find myself in a rush to use up all my groceries and Living Social deals -- I made a huge batch of black beans last night, but am not quite sure what to do with them now aside from eating them slowly on nachos. If anyone has any ideas on what to do with a lot of black beans, kindly pass the ideas on to me?
Well, that's all from me for now. No doubt I'll keep everyone posted on further developments. Cheers!
PS: Even though she's already posted it, I feel like I should mention that I ran into Erin in DC this past Friday. I was just out in the city visiting some friends; funny how small the world is, huh?
Whoops, I've been overdue on a blog post!
This post will be dedicated to the week of 7/16 to 7/20, where I spent all of my time modifying my picks on Antelope (hence the title). The data had just been refiltered, so I spent my days readjusting my P and S picks. The TA stations had considerably cleared up with the filtering, but for some reason, other stations fared less well; we discovered later during the week that the newly applied filter had failed to correctly account for sampling-loss rate from the original acausal filter. It went something like this:
Station takes 200 samples per second
Acausal filter reduces it to 100 samples per second
A filter was applied to convert acausal data to causal data, but filtered at 200 samples per second
Data gets fuzzy
So thus, it turns out we needed to refilter the data again. Excitement!
In other general news, I joined a rock climbing gym and took a free archery lesson. Southern California truly is lovely, absolutely abounding with things to do!
I dreamt about Fortran 77 and HASH last night. The dream was a half-asleep train of thoughts about worrying that the program might not work, and then another part of me attempting to assuage the worried part of me. I'm pretty sure the line "Don't worry, just remember to edit the format of the first entry to fivev characters and note that in the driver" blearily ran through my head as I tossed around on an air mattress. This train of thought was finally interrupted by me blearily waking up at 4 am, whereupon I remembered that I was in fact not at work, but rather visiting a friend in San Diego. It's a shame; couldn't I have dreamt up some genius insight instead of worrying? Instead, my subconscious decided to grace me with a checklist of things-to-do.
My life this past week has pretty much been comprised of writing, debugging, and thoroughly checking Perl scripts that'll format my text files for me. I adore Perl; it has a module for everything tedious and basic, so I didn't have to do any nasty time manipulation or irritating decimal latitude to degree/minute/second latitude. My regular expressions have been messing up somewhere, but there are so many other ways to code in Perl that I just didn't need to use them. Yay!
I then was able to tease out some understanding of the HASH code, which makes me considerably more relieved. I rather dislike using black boxes, so I'm glad that I at least understand the structure of the code now. It makes me feel considerably more at ease.
In other news, it turns out that all the data from all the seismograms were acausally filtered. One of my mentors, Danielle, went through and filtered them in SAC, and then converted them back to Antelope -- a bit of an ordeal, especially considering that she was on a research cruise off the coast of Oregon for the last leg. So now it looks like that I'll be going through and adjusting the picks. Good times. More Antelope!
It rained for the first time this summer in SoCal. I was impressed. Quite novel.
Shortly after last week's post, I managed to make a map in GMT which plotted the locations of the seismometers used in collecting Oklahoma data. Compared to all the fancy maps I've seen come out of GMT, I won't lie, mine is pretty plain and looks like I could have made it in Microsoft Paint (and in fact, it likely would have just been easier to make the legend in Paint...) That said, it gets the information across, so I oughtn't get too worried about not producing aesthetically-riveting graphics. Afterwards, I managed to make another map displaying known fault lines in Oklahoma, which looks even less fancy than the first map, because at least the first map had an outline of Oklahoma within its frame. All is vanity, all is vanity.
In attempting to make the second map of fault lines, I tried to write a Unix script to parse the text file of faults that my mentor had given me in order to avoid having to manually reformat the text file to GMT's wishes. This ended up being a lost cause, as my attempt to output the contents of one text file into ten separate text files was thwarted by various technical difficulties, not in the least being that I have limited knowledge of shell scripting. A variable was supposed to be recognized as an integer (it was an integer parsed from a string), but was repeatedly thwarting my attempts at evaluating the variable. I thought that variables in shell scripting were context dependent, and therefore there should be no difference between "4" and 4, and everything on Google told me so as well, but it still wasn't working.
The attempted shell coding took me a full day. I then gave up and manually parsed the text files, which took me all of fifteen minutes. Moral of this story: figure out what battles are worth fighting.
Afterwards, for a change of pace, I began to figure out how to use the focal mechanism calculator HASH (for HArdebeck and SHearer, the creators -- what if they had called it SHHA instead? It'd be like doing a dance move every time you said it. I imagine it with jazz hands). HASH is widely used for calculating the focal mechanisms of local earthquakes; it's a Fortran 77 based program that incorporates margins of error, disparities in velocity models, and lots of averaging to come up with the best fitting focal mechanisms. Finally!, I thought to myself, I can use the data that I've picked!
Not so fast! retorted the f77 code. I'm a coding language from the 70s that doesn't even have while-loops, and therefore I'm super picky about everything, especially how you format your text files! You won't get past me that easily!
Thus, ascribing to Sun Tzu's saying of "Know your enemy," I've read up on f77. I've learned what asterisks in the read / write commands mean. I've learned its formatting conventions. I've watched as the go-tos directed me down a level, or up a level. I've felt gratitude towards more modern languages that have gotten ridden of numeric labels. And thus, I've begun to figure out what the program is asking of me, and how I'm to format my text files. We are settling into an unsteady truce, f77 and I.
But the truce only exists due to one more component that has recently come into my life. Knowing how I need to format my text files means nothing if I'm left to tediously insert 51 spaces between station name and station latitude because f77 is obnoxiously rigid. I needed to know how to format text files efficiently. Bash had failed me the week before. And thus, casting around for an aid, I turned my sights to what has been termed "the duct tape of the internet": Perl.
I'm kind of in love with Perl. It's so friendly. It was easy to install. It's so widely used that it even came with a lovely IDE for Windows. It was a bit puzzling to learn, and certainly left me staring at a computer for a good day or so (the tutorial claimed that it could teach me Perl in two and a half hours. It was simply not to be). However, having become familiar with shell scripting certainly facilitated my understanding of the language a bit. It's like shell scripting but better. Nicer. More duct-tapey, but serves my needs perfectly.
Thus, with Perl, sed, and a plethora of Windows-based programs that allow me to connect to servers easily, I'm ready to take this Fortran program on. Slowly. Many battles lay ahead, including parsing the Antelope dataset so that we associate specific waveforms to certain events, potentially modifying the HASH driver, and formatting first-motion data. But I shall persevere. I shall be steadfast.
PS: Throughout typing this blog post, I imagined f77 as a villain wearing one of those tiny black masks that barely cover your eyes. And a cape.
... and where seismograms and squiggles abound. I've come to appreciate individual seismic stations -- you're lovely, LC01 - LC18. You're not so great, OK009. The accelerometers seem to fail to pick up on a lot of the earthquakes I've seen listed. OKRs are somewhat like teenagers, you never know what you can get -- it'll be perfectly clear for one event and then a mess the next day. I guess that makes sense, as according to my advisors, the OKRs were placed on people's properties -- under a bench, in the backyard, etc. Given that it would simply be impolite to mandate that people (and their neighbors) never use their backyards over the course of a month after they've so generously volunteered their properties, I guess I'll have to live with the inconvenience.
I think I've come into the last few days of picking, with a sprint toward the finish -- I've gotten to picking the magnitude 2.5s, so the signals are a fair bit softer now. That said, they also seem a fair bit clearer, so I'm not going to complain.
Last week, we hit a problem with picking: a lot of my seismograms would show waves very softly tapering in, in a fashion that made it impossible for me to determine polarities. It was an issue of filtering within the seismograms and the difference between causal and acausal filters; from what I understand, when a signal is passed to a seismometer, the seismometer's filter will either look at the data only in the context of the past and present, in which case it's causal, or also try an interpret data in the context of the future as well, in which it's acausal. Evidently, acausal filters are better at capturing amplitudes, which those studying strong motion prize; however, that type of filtering also leads to weird precursors -- the data will show, for instance, that a wave will have began earlier than it actually has. Thus, for some seismograms, I was seeing the precursors and trying to pick from them. In essence, I was saying that an earthquake arrived when it actually didn't; the filtering system caused the signal to rise above the noise too early. Unfortunately, it seemed that some seismometers were causal and some were acausal, so there was no standard procedure on how to deal with the difference. Alas!
That said, it seems as if the issue is in the process of being resolved, and my mentors have been busy with converting the data from acausal to causal. Meanwhile, I've been doing more picks!
Other than the exciting life of the picking world, I've also wrapped up the nine-part Unix tutorial I was working on; redirection and pipelining are really cool. Script writing also is quite cool, although writing anything more than a basic script requires copious amounts of google to find what methods and commands I'd want to use. I wrote a cute little backup script so I don't have to worry about losing my data any time soon, so long as I'm actually backing up the right data... It's a good thing the internet exists and that there are so many sysadmins posting questions on the userboard, because I pretty much have all of my needs documented somewhere on Google. This is a little less true for the GMT tutorial I've been going through, but I've finally been able to make sense of the syntax, variables, and options. So that's quite a relief; knowing what the options do makes me feel considerably more at ease with typing all the -Rs and -Bs followed by numbers and mysterious slashes. It's amazing how much better one feels about a topic once you sit down and parse through the language for a bit.
I think we're moving onto focal mechanisms some time in the next week; this should be good!
Over and out,
This week's blog post title is courtesy of Hank Schrader of Breaking Bad. I've been spending some pretty quality time with that show in these past two weeks, and I figure I ought to give that lovely TV show a mention. It is one of the best shows about methamphetamine that you will likely ever see.
This past week at work, I've listened through Keane's new album Strangeland at least eleven different times, and Train's California 37 at least five. Soundtracks on repeat while at work? Why, Maya, if we skip a few steps forward in our thought process, it sounds as if you might be picking seismic data!
Yes, astute reader, that's what this past week has comprised of. Allow me to incoprorate another medium to explain this week:
This is all to say that this past week has been full of P and S-phase picking on data from a lot of Oklahoma-based seismometers. There are a lot of events to be picked, who knew that Oklahoma got so many earthquakes? Thus, I've gotten halfway decent at picking out S-waves amongst the noise; P-wave first motions, however, will be the end of me (is the little wave I see actually a pulse indicating an upward motion, or is it just noise? Will my data make no sense if I mark those little waves as directional pulses? Stay tuned and find out!). I wonder how long it will be before seismology will adapt an objective method to picking data and event times? I guess it depends on how long it takes to get a good automatic picking algorithm; that methodology development would definitely be something that'd interest me. Having an algorithmic degree of consistency throughout the field would be pretty amazing. I don't know how achievable that is, but it's definitely something that has crossed my mind more than once over the past week.
At times, during the picking process, I recall something my thesis advisor said to me about the earth sciences: in earth-based physics, large margins of uncertainty are simply a way of life. I'm really not quite sure how I feel about that; the perfectionist in me chafes, and the rest of me tells the perfectionist in me to take it easy.
On another note, I've come to appreciate well-installed seismometers; they yield beautiful seismograms that make me happy when I see them.
Lastly, I've been doing more Unix tutorials on the side. Regular expressions are something beautiful. I like them a lot; it's a new way to think, and there's a lot to be said for the fun of new ways of thought. It would be nice if I got to use them. We'll see!
Week 2, over and out. Let week 3 begin!
I'm now a full week into the Pasadena experience -- low humidity, warm temperatures, and sun, sun, sun. Sunny with a definite chance of earthquake analysis at the USGS, a homey place on the edge of CalTech's campus. Good times!
Well, this week certainly went headlong into the technical details of seismology. After being part of a tour of CalTech's lovely geophysics building (which has a wondrous media center), I started my week off with a quick tutorial in vim, the terminal-based text editor that has enough keyboard commands to make your head spin. It's great, though; I started playing around with it during the IRIS orientation, and I can definitely see the appeal of an entirely key-based editor. I'm certainly hoping I'll get to make use of it soon, since you really don't learn those sorts of things by simply reading a packet on them.
I've also been running through Unix tutorials; it's immense fun to see how powerful it is, and there's nothing quite like playing a little on the dangerous side with commands that are irreversible. That said, of course I'm being responsible; I'm getting to the part about shell scripting now. Shell-scripting has always bewildered me as a concept -- so many one letter commands, strange abbreviations, and dollar signs! Ah well, no doubt I'll be able to power through and figure out what's going on. So much is accomplishable with the help of the internet these days...
And, of course, earthquake data is trickling into my life. I started to pick data on Thursday using Antelope, which renders a large amount of data in a relatively accessible fashion; there are so many squiggles and so many stations! They say you start getting into the groove of things after a while, and I certainly do hope that the groove comes and finds me soon. I imagine it'll hit me in a few more days.
On Friday, I attended a really interesting series of short presentations on current seismologic developments at the Earthquake Research Affiliate Partner's Meeting -- there were talks about the recent Sumatra earthquake, an investigation of the impact of earthquake-induced liquefaction on a city in New Zealand, usage of satellites in earthquake studies and response, and a fair bit of focus on earthquake early warning systems. I never realized there was such a large focus on earthquake early warning until arriving here; I feel like I've sat in three hours of presentations about EEW already in my first week here. It is really a cool concept, and definitely something that reaches to all sorts of different fields in meaningful ways. The crowd that attended this meeting was fascinating as well -- the name tags also bore the company each person was affiliated with, and I could see that it was people from CalTech and USGS, but also from neighboring colleges, LA Department of Water and Power, and at least one individual from Walt Disney (Disneyland, I guess?).
It's weird living in a place where earthquakes are considered a relevant part of life. I watched a video advising people to have an earthquake contingency plan, 2 gallons of water per day per person -- earthquake contingency is definitely something you don't hear about in Virginia or Rhode Island. The phrase "duck, cover, and hold on" also wasn't part of my lingo until coming here. I guess that if you live in California, you're just going to have to brace yourself for that eventuality. How weird.
And that's me for this past week. Let the second week begin!