Tuesday, February 03, 2009

12:12 PM

Shutter bug

After getting a ridiculously good deal from my brother, I now own a Canon Rebel XT. I've been taking a lot of photos while trying to read a bit about photography and learn more about The GIMP which is the Linux analog of Photoshop. There's a lot to learn, and it's so easy to take crap photographs it's a hard habit to give up, but I've been progressing and I love the improvement in quality I've gotten by simply switching to a better camera.

I picked up a simple 50mm lens the a couple of weeks ago and I've been really enjoying it, it has a large aperture f/1.8, which means it lets in a lot of light, in fact it collects 2.5 times more light than my other lens. More light means taking pictures in environments with less light (without having to resort to using a flash). Larger apertures also narrow the depth of field, which means that less of the photo is in focus, this means being able to isolate your subject blurring out distracting background and/or foreground objects. This is especially useful when photographing people.

If you want to see some of the shots I've deemed worthy of uploading you can check out my flickr photostream (http://www.flickr.com/photos/jonben/). Here are some recent shots:

Emo self-portrait

Swing

Orange beams

Slice


The last one is from a series of photos I'm doing where I isolate pink as the only colour in a black and white photo. Jen took that one, as I was preoccupied with the task of modeling. Also note my delicious 2-gauge earrings in the top photo... I'm going to gauge up to 0 soon, it seems my ears have yet to identify with certainty a destination.

11:33 AM

Galaxies in large survey data

I spent a good fraction of last week masking data, which means going through a large image of galaxies and stars and making sure that anything undesirable, such as over-saturated stars and asteroid trails, is put behind a mask so that it doesn't contaminate our data. Since the data we use is from Megacam on the Canada-France-Hawaii-Telescope it is an enormous 1 square degree field. This means that there are hundreds of thousands of galaxies in each field, this number also depends on how sensitive you are to faint objects, which depends on how long you stare at each field, the survey data we have is fairly good in this regard.

After looking through several fields I thought I would share a couple of more interesting galaxies here. I mostly want to convey how different the images that I work with are from those that you might see in the popular media, like the immaculate images from Hubble.

Here's a barred spiral galaxy.


Here's a galaxy merger.


Compare those amazingly detailed images with our data, the object on the left is a merger and that on the right appears to be a barred spiral.


Luckily there are a lot of scientific questions that can be addressed without having to get to the level of detail that the above Hubble images have. In fact for our purposes all we want to know is the shape of the galaxy (how round it is), so excessive detail is not needed. Still it's pretty cool to look through the data and be able to spot things like galaxy mergers, and I wonder how beautiful those galaxies would look if we could image them with higher resolution...

Wednesday, December 03, 2008

10:00 AM

Random Wallpaper

This is something that a friend of mine tried to setup several years ago; they wanted to have a random wallpaper appear automatically. This seems simple enough, but it turned out that Fedora didn't update the wallpaper if the file changed, which meant some kind of sneaky restarting of X11 services or something would have been needed for it to reload the wallpaper file. Or maybe it was actually easy to get around, but we gave up when simply copying a new image to have the same name and path as the current wallpaper didn't produce the desired result.

I noticed a few days ago that this functionality, intentional or not, exists in Ubuntu 8.04, possibly also in other versions I'm not sure. I created a script to do the wallpaper switch, it's pretty much hacked together over morning coffee, and keep in mind that I don't really know shell scripting that well. Anyway it doesn't really matter how ugly it is because it takes a fraction of a second to run and it works :)

You need to modify the change directory command so that it goes to whichever directory you want the random wallpaper to come from. The script will randomly take one image from this directory and name it current.jpg (the script assumes that all images are .jpg, if there are other types of files in the directory they will be ignored). As a preliminary step you should manually create a current.jpg in the directory and assign this to your wallpaper.




#!/bin/bash

cd /home/jonben/images/boardgame_paper

#find the number of images (potential wallpapers)
export n=`ls -l | grep jpg | grep -v current.jpg | wc -l`

#RANDOM is between 0 and 32767
export ran=$RANDOM

#choose one of the images randomly, NB integer division
export nran=`echo "scale=0; (($n*$ran)/32767) + 1" | bc`

#get the name of this file
export theone=`ls -1 | grep jpg | grep -v current.jpg | head -$nran | tail -1`

#make this file the current wallpaper
cp $theone current.jpg




If you want this code to run periodically then make an entry in your crontab. For example if you want it to switch backgrounds every day then enter something like:

00 02 * * * $HOME/bin/wallpaper_switch.sh

This will run the script 'wallpaper_switch.sh' (which I have put in the bin folder in my home directory) every day at 2am. Use 'teh google' if you want to learn how to use cronjobs, they can be pretty useful, especially for doing daily backups.

Here's one more version of the above which ensures that when run a different wallpaper will get chosen, the above is completely random and the new wallpaper could be the same as the old one...





#!/bin/bash

cd /home/jonben/images/boardgame_paper

#find the nuber of images (potential wallpapers)
export n=`ls -l | grep jpg | wc -l`

#ignore 2 files, the current.jpg and the corrisponding image
#i.e. we want the new wallpaper to be different
export n=`echo "scale=0; $n - 2" | bc`

#RANDOM is between 0 and 32767
export ran=$RANDOM

#choose one of the images randomly, NB integer division
export nran=`echo "scale=0; (($n*$ran)/32767) + 1" | bc`

#get the name of this file
export theone=`ls -1t | grep jpg | tail -$n | head -$nran | tail -1`

#make this file the current wallpaper
cp $theone current.jpg

#update time stamp on the used wallpaper
#so that it can be skipped next time
touch $theone

Tuesday, November 25, 2008

12:45 AM

I'm stepping up

...and by stepping up I mean stepping down in gauge. A friend of mine lent me some 10 guage claws and I put them in tonight with delicious results.

16 Guage Begone!


There are black rubber o-rings on either side of the ear to hold it in place, though the o-ring on the large side is not really needed. So far I've experienced no real pain, there's a bit of a pinching sensation but it's not really offensive. After a couple of weeks I should be ready for the next set of claws, I'm hoping to put in some 6-guage claws next, but it will be slow going since there is a huge difference between 10 and 6.

Also of note is my ridiculously long hair. I desperately need a hair cut before I head home for x-mas...

The late-night-self-portrait pose

Friday, November 21, 2008

1:27 PM

Amarok Win+c and the struggle to (re)claim my global hotkeys

I wanted to record this for prosperity, if for no other reason.

Amarok is a great music player and collection organizing program in Linux. The global hotkeys (also known as the global shortcuts) are set up to use the windows button on the keyboard, some of the most useful are:

Play/Pause: Win+c
Forward: Win+b
Backward: Win+z

Well when I installed Ubuntu 8.04 recently some of these hotkeys stopped working, for example Win+c centered my mouse on the screen, and Win+m, which should have muted the volume, instead made the screen go to negative colours. It turns out the the fancy graphics program called Compiz which makes things look sexy in Ubuntu was taking control of these hotkeys.

If you are having problems with the Amarok hotkeys type Win+m, if the colours become negative then you're experiencing the problem I'm describing.

One solution is to simply disable Compiz by going to

Start -> System -> Preferences -> Appearance

on the visual effects tab select the button for None. Restart amarok and set the hotkeys back to the defaults, if you've changed them, and things should work.

The other solution, which lets you keep the sexy graphics, is to edit these Compiz shortcuts in gconf-editor (if you are not in gnome I guess I can't help you). Type gconf-editor into a terminal, this should launch the program and you should see a window appear. In Edit -> Find enter <Super>m and click the button to search within key values. This should find all keys that have <Super>m defined, this is case sensitive so make sure you type a capital S.

Note that <Super> is the Win key, it's also the fancy Mac key if you're on a Mac, I assume a similar problem would occur if you had a Mac keyboard hooked up to Linux, or if you could install Amarok on a Mac...

When you find <Super>m all occurrences will appear in a list at the bottom of the gconf-editor window, click on each of them to see the entry, you will see two columns in the upper part of the window displaying the Name of the Key and the Key Value (which in this example is <Super >m). Note that all the keys you find should be originating from the Compiz program and should be in subdirectories of

/apps/compiz/plugins/

You have to go through deleting all key values that match the Amarok hotkeys that are being stolen. I had issues with the following hotkeys:

<Super>c (aka Win+c or Winkey+c)
<Super>m (aka Win+m or Winkey+m)
<Super>v (aka Win+v or Winkey+v)

Once I deleted all key values that had <Super>c <Super>m or <Super>v I restarted amarok and my hotkeys worked!

If anyone finds this useful huzzuh!!

Thursday, November 20, 2008

3:12 PM

Avril knows where it's at

I've been thinking about getting a camera lately. I really enjoy taking photos and I've been envious of people's amazing cameras for a long time... when you're holding a 3 year old canon PowerShot it's pretty easy to feel inadequate. The nice thing about the Canon PowerShot is that it fits in my pocket... kind of... except it makes me have chipmunk pockets and if William Sledd is any authority on fashion sense (pssst, he is!) then I really shouldn't be cramming a camera into my pocket. I encourage you to check out the Murse Edition of their show:



Nonetheless portability is a concern of mine when it come to cameras I don't want to have an amazing camera that sits at home collecting dust. Of course it's up to me to make sure I take it with me and make the most out of it, I feel like I would use a bigger camera, but I'm sure a lot of people think that and then use them for a month before they get shuffled into a dark closet somewhere emerging only during boring family events where everyone has a camera anyway.

The knowledge of this risk does not seem to be a strong enough deterrent of my desire. The next problem is deciding which camera to choose. Judging from their respective sales pitches it seems I can't live without any of them, but then I run into a serious budgetary problem so I'll have to narrow down the list to at most two. My brother (the younger sexy one) has a Canon Rebel --I'm not sure if it's an XT, XTi or XSi-- which he seems to like. When Ashley visited this summer we discovered that she has the same camera and seems to like it. Knowing only this and that it falls just within the acceptable range of my budget I've been thinking about getting one. Not to mention that Avril has been advertising the camera... and if they feel comfortable endorsing the product it must be good....

Anyway if people have any thoughts on the matter, especially Adam (if you read this, I couldn't find your email... isn't that sad...), please share.

Monday, October 27, 2008

10:07 PM

Telescope Time

The type of research I do requires large surveys, my masters work used data from 4 large surveys which represents years worth of observing on many telescopes operated by many countries around the world. So I haven't had the chance to goto a large telescope to collect data. Thomas, a fellow Ph.D. student, is currently in the process of observing on every clear night that he can manage, and the telescope that he uses is just outside of Vancouver. He needs a second person at the telescope for safety reasons, and when his supervisor isn't around he recruits people like me.

The telescope is truly remarkable, at 6 meters in diameter it's the largest liquid mirror telescope ever built, and it's the third largest telescope in North America regardless of construction. The idea behind liquid mirror telescopes is pretty ingenious, if you spin a liquid at a constant rate it will naturally form a paraboloid. The alternative is to polish a conventional mirror into this shape, which is very hard and very expensive. Making a liquid mirror is a lot cheaper, however, as you can imagine, there are several complications when trying to rotate a ton of mercury at a constant speed. Check out the telescope's website for more information and pictures. Here's a shot I took of the main mirror, there is a mylar cover which protects the mercury layer from wind which can distort it's shape. The mirror is rotating which is why it's blurred out in the photo which has an exposure time of roughly 0.4 seconds. The mirror rotates roughly once every 5 seconds.

The Large Zenith Telescope: the world's largest liquid mirror


Thomas' project involves sending a pulsed laser up into the sodium layer of the atmosphere, since the laser is pulsed when the photos come back down after scattering off of sodium atoms he can reconstruct the height at which the scattering took place. The number of photos returning from each height tells him how much sodium there is as a function of height. This information is crucial for current and future adaptive optics systems. Such systems use a laser to excite atoms in the sodium layer creating a 'fake star'. Such a star should be a point source and any deviation from being a point can be attributed to distortions caused by the atmosphere, thus it's possible to remove these atmospheric distortions by changing the wavefront of the observed light such that these fake stars look like points again. This is the cutting edge of ground based optical observations, and provide a huge improvement in resolution.

Measuring the density of the sodium layer as a function of height is needed to characterize these fake stars and further improve the resolution. If the fake star is at a height of 80km a different correction is needed than if it were at a height of 100km. If all of this is confusing, don't worry I didn't explain it very well... he's a shot of the laser in action, the terminal point is about 80 km from the ground. This was a 15 second exposure, hence all the nice stars :)

Laser being shot at the large zenith telescope


I'll be observing with Thomas all night, I think the sunrise is at 7am, so wish me luck (probably retroactive luck) since it's been many years since I've stayed up all night. Here's one more shot of the laser, again a 15 second exposure, you can see the building as well as the prime focus of the telescope poking up from within.

The Large Zenith Telescope: laser and prime focus



--------------------------------
In response to Jeremy's comment
--------------------------------

Cool beans, I didn't know Dal had a Lidar system, apparently they're involved with the Phoenix Mars mission which will use a similar Lidar to probe Mars' atmosphere. Here's a media shot from Dalhousie's Dunn building:



The dal Lidar is meant to probe water molocules and dust in the atmosphere. The green laser light they use has a wavelength of 532nm which is similar to Thomas' Lidar which uses 589nm. Tom has to use this wavelength since he's measuring the sodium layer, and the famous double sodium line is at this wavelength. His laser excites the electrons in the sodium layer by hitting them with exactly the right amount of energy to push them into the excited state, when they come back down they emit a photon of the same wavelength which shoots off in a random direction, some of them come back to the telescope and provide the information Tom needs to reconstruct the density profile of sodium.

The dal Lidar is meant to measure water vapor and dust and can probe them to a height of about 20 km. Tom's Lidar also interacts with water and dust but he's not concerned with anything below 80 km. I assume his laser is a lot more powerful if it's meant to probe the atmosphere at such a high altitude, he also has the advantage of collecting photons with a 6 meter telescope which means he's far more sensitive which is likely necessary for measuring photons scattering back from the sodium layer.



The point being that although Luke used a green light saber and his father a red one, I think in this case the dark side would prevail should we engage in Lidar combat :)

Monday, October 20, 2008

5:47 PM

Geocaching: The opposite of parkour

Parkour is the art of movement, translated from the slightly more poetic and appealing French term, l'art du déplacement. Parkour aims to engage the human body in moving through its environment and overcome obstacles. As such it is not concerned with achieving a destination per say, but in the fluidity of the motion that connected the departure with the destination.

Geocaching, though an equal with parkour in terms of being a subcultural phenomenon, is concerned only with the the destination. A geocache is an a vessel that contains --at the very least-- a log of those who have found it. Some caches are medium-large containers that have lots of items in them, and if you find them you are free to take an item in exchange for leaving one behind. At their most basic level geocaches are associated with GPS coordinates that allow people to find the hidden container. The website www.geocaching.com is the world wide base of operations for the community, and keeps records for hundreds of thousands of caches all over the world.

I've been marginally aware of geocaching for several years because an old friend from Bishops is an extremely active geocacher. I was talking to Bridget yesterday and the conversation hit on geocaching eventually, her an Tom have done quite a bit, mostly due to the influence of this mutual friend. For some reason the idea struck me as very appealing yesterday, in a way that it hadn't before. I promptly made an account and found a nearby cache, and before I knew it Jen and I had found our first geocache :)

Our first geocache


It was a bit tricky to find this one without a GPS, but we eventually put two-and-two together. It didn't help that the hint mentioned the colours of nearby flowers given that they have been out of bloom for nearly two months. It took a bit of detective work, and a dab of horticultural knowledge, to pin point the cache.

The whole experience was pretty great. I think the appeal for me right now is the mystery of finding these little boxes that are all around us but go unnoticed by everyone. On the sight non-caches are referred to as muggles... and you certainly do get the feeling that you're trying to dart into the 9 and 3/4 departure when you grab a cache between passersby :)

Tuesday, October 14, 2008

1:46 PM

The dawn of goo

So much neglect... I wonder what prompts me to write these entries, they occur so randomly it seems. My ear rings are not feeling very new anymore, I can't notice them even if I try, unless I jiggle my head around or tug on them. I need to order some hardware to allow me to stretch them, I'm pretty sure that my destination is 2 gauge (0.65 cm diameter).

Jen and I recently discovered a kick ass game for the Wii called World of Goo, it's available via the Wii store (under Wii ware, which contains games specifically designed for the console) for $15 USD. The game is a physics simulation puzzle game, and gives you god like control of cute little balls of goo. Your job is to stick them together in an efficient way in order to reach the goal with as many of them as possible. I've been having a great time globing them together and the game has so far been offering loads of really clever levels. You encounter many species of goo who behave in different ways including drool, balloons and detachable goo balls.



Apparently there is a Windows version of the software you can buy from the official website, and the Mac/Linux versions are on the way. It was an amazing fluke that Jen and I were buying games in the Wii store yesterday since that was the first day the game was available! Huh... I guess it was destiny all along.

This is the second physics simulation puzzle game that I'm aware of for the Wii, the other is Boom Blox and it's also a lot of fun. I love the way these designs interact with the unique features that the Wii has to offer, and I hope these titles are followed up with more, necessarily less novel but nonetheless entertaining games.

Saturday, August 02, 2008

7:31 PM

Fancy New Earrings

As promised, photos of my fancy new ear piercings:

After

My fancy new earrings


The plan is to stretch to 6 gauge and put in tunnels. I might decide to stretch to a smaller gauge, like 2, I'll have to play it by ear...

Friday, August 01, 2008

1:42 PM

Vancouver Bliss

I don't have much to say but I'm bored of thinking about work. The project I'm working on right now is pretty interesting to me but it's partly theoretical which isn't something I've done a lot of. I'm writing out equations and trying to understand why matricies might not be invertible, and frankly I don't feel that I'm very good at it. Still the overall project is quite interesting, and I'm working with people who --so far-- I really like working with.

Adam (my brother) is in Squamish right now climbing, we hiked the chief a few weeks ago. It was good fun, I'd like to do it again before he leaves, but it might be hard since a rock slide has blocked the main highway between Squamish and Vancouver. We met a chipmunk at the top of our climb and managed to snag a couple photos of it.




If you have access to his facebook photos check them out because he's been uploading a lot of great shots:





I've been reading quite a bit lately. Gary Francione's latest effort "Animals as Persons" which is a collection of essays on animal rights. I really enjoyed this book I found the arguments to be a bit more academic and concise than those in "An Introduction to Animal Rights". On the whole An Introduction is probably a more accessible book, but if you want a more distilled analysis of moral theory then Animals as Persons is better. For those who may be wondering, when he says 'persons' he's refering to the legal sense of the word. There are essential two types of legal entities, persons and things, right now animals are things. In this context it should be obvious the need to move them from the class of objects to the class of persons who are not objects.

I also read Peter Singer's infamous book 'Animal Liberation', which I was actually surprised to find had a lot of interesting stuff in it. There were several chapters detailing the horrible treatment of animals by humans, which I didn't read. The chapters on theory were actually much more similar to my own thinking than I thought they would be since Singer thinks some pretty crazy shit that I definitely don't agree with. For example he thinks that animals don't have an interest in existing, that is they don't desire to live... which is baffling. In any event I actually think the last few chapters of the book are quite good and worth reading.

Lastly I'm reading 'The Amazing Adventures of Kavalier and Clay' which I started quite a while ago but am totally engrossed in now. The book takes place before and during the second world war and focuses on two Jewish young adults. One comes from German occupied Prague and want to earn money in America to save his family back home. The other is his New York born cousin. They are both artists and they want to make comic books, the late 1930's was during the golden age of comics and so is a pretty interesting time to be exploring the motivations of comic book creators. I don't know how to articulate what it is I like about the book, the themes of imagination and escapism are poignant especially given the era. Perhaps the part I've been enjoying the most at the moment is the repressed sexuality of one of the characters.

That's all for now, I think I'll force myself to think about work again. I'll post a photo of my fancy new ear piercings soon... so stay tuned, you don't want to miss that :)