Wednesday, September 1, 2010

Damlalar her yerde

Evet, hepsini içmek serbest hatta kendi sıvınızda dahil. Olur ya kurak bir yerde mahsur kalarsınız diye Les Stroud’un Kalahari çölündeki bölümünü izleyebilirsiniz ya da burda kalıp okumaya devam ederek kendinize banyo yaparken soracak yeni sorular edinebilirsiniz.

Duş almaktan söz ediyoruz ya, ilk soru şöyle belirdi: sıcak bir duşta, pek bir havalandırması olmayan bir odanın içinde, yukarıya lamba tarafına doğru bakınca havada asılı danseden bir sürü parçacık göze çarpıyor. Gerçektende havada asılı duran parçacıklar, üfleyince bile uçuşuveriyorlar. Soruyorum, bu parçacıklar ne ölçüde aktifleşmiş? İçerideki ortam hangi oranda neme doymuştur? Sonraki soru bir şekilde banyo duvarına ya da perdesine sıçramış parçacıkların büyümesini, süzülüşünü ve diğerlerine karışıp akıp kaybolmasını izlerken aklıma geliyor. Çok sayıda küçük damlacık ve az sayıda büyük parçacık. Gamma ve Marshall-Pallmer dağılımları ne kadar doğru tanımlamakta bu parçacık dizilimini? (Diğer dağılımlara Kolmogorov–Smirnov testi yapmak isteyen?) Son sorularsa en ilginci. Bu kez damlacıkların üstümden sıçramasını izlerken düşünüyorum ve seyre dalıyorum. Çarpan yüzeyden seken damlacıklar (bu durumda benim omzum) ne şekilde parçalanıyor ve nasıl bir yörünge takip ediyor, ne zaman sonra çiseleyerek yere doğru düşüyor ve ne kadarı buharlaşıverip ya da yan duvarda kümeleşen parçacıklara yapışıp etkisiz hale geliyor?

Ya bu kapta yoğunlaşan parçacıklara ne demeli? Nedir gerçekte onları bu şekilde dengede tutan? Nasıl bir etkileşimle öyle değişik şekiller alabilmekteler ve ne kadar büyümeleri gerekir tutundukları zeminden aşağıya kaymaya başlayıncaya kadar.

Bazıları Percy W. Bridgman’ın “Eğer ölçemiyorsak büyük ihtimalle ne demek istediğimizi bilmiyoruz” sözünü fazlasıyla dikkate alaraktan ya da Meinrat O. Andreae’nin bir konuşmasında alıntıladığı gibi “Gözlemleyerek öğrenmeyecek şey yoktur” sözünün büyüsüne fazlasıyla kendilerini kaptırdıklarından, yukarıdaki soruların bazılarının yanıtlarına ulaşmışlar gibi. Tabii bu bazıları dediklerim akışkanlar mekaniği ve yağış fiziği konularında ileri seviyede bilgisi olup dahası bu minik dünyalardaki hareketlilikleri çok yüksek hızlarda izleyebilecek araç-gerece sahip kişilerdir.

Böyle bir uğraşın sonucunda ortaya çıkanlar ise sadece bir su damlacığını analiz ederek yağmur damlalarının genel dağılımı hakkında bir görüye ulaşılabileceğini gösteriyor. (“Bilinen bir konu üstüne çalışarak, yeni bir olguyu keşfetme.” Bu alıntının nereden geldiğini çözemediyseniz sizi James Burke’nin “Evrenin değistiği gün” belgeselinin ilk bölümüne alalım.) Devam edersek, düşen yağmur parçacıklarının parçalanmaya başlamadan önce teorik olarak ulaşabilecekleri çapın en fazla 6-7 mm dolayında olabileceği (bazı istisnaları ile birlikte). En ilginci ise, her ne kadar Galileo zamanından beri bilinen ve yağış ile ilgili kaynaklarda damlaların belli bir hızın üstüne gidemeyeceği bilgisinin (en azından benim böyle bilişim) yerel olarak doğruluğunu yitirişi. Parçalanış esnasında anne damladan kopan parçacıkların tekrar dengeye ulaşıncaya kadar limit hızdan aşırı hızlarda hareket ediyor oluşu. Detaylarını merak edenler şu makaleyle devam edebilirler,  ya da şu bağlantıdan görüntülenmiş bir parçacığın dansını seyredebilirler.

Tuesday, June 29, 2010

Buradan karşısı daha mavi

    Yok yok, buranın karşısı değil. Bu taraf geçen haftanın macerası idi. Dağın maceracısı çokmuş: kimi normal yoldan çıkıp, bisikletle patikalardan inermiş, kimileri de dağdan aşağıya atıyor kendini paraşüte güvenip :) 

    Evet işte o tepelerin ardı deniz. Şehir bir dağ ile bir tepe arasında alabildiğine uzanmış. Ne güzel bir gün öncesinden karşı taraf kendini açıkça gösteriyordu, fakat oradan dağa bakınca pek açık bir görüntü almak mümkün olmadı. Kirlilikten mi desem, buluttan mı yoksa bulut olamamış parçacıklardan mı desem dağ kendini göstermedi ertesi günü. Yandan uzanan el bana gidilecek tarafları gösteriyor: Gündoğdu, oradan aşağı Kurşunlu, sonra yan yan Mudanya.
(Son cümle tamamlanamadan bir bölünme oldu, annem tarafından ekmek ve yufka almaya gitmem gerekçesiyle, yazı bekler patatesler kızarıyor neticesinde :) Ben yolda, acaba diyorum şimdi Texas'daki SciPy10 eğlencesinde olmak nasıl olurdu diye söyleniyorum kendi kendime, ya da Oregon'daki Bulut Fiziği konferansında geziniyor olup, poster sunmak, makalelerde ve kitaplarda adlarını gördüğümüz kişilerle karşılaşıp iki laf yapmak hiç fena olmazdı.)

    Karşısı yalnızca daha mavi değil, ayrıca daha da yeşil. Yol boyu isteyene zeytinlik, sahibine incirlik, yoldan geçenine çamlıklar dizili. Kimi dut vardı, kimi erik, şeftali, armut yemek isteyenine. Ara ara çeşmelerde vardı yol boyunda, ama su içmek isteyeni dağa çıkmalı...

    Bu resmi yukarıdakinin önüne koyunca körfeze baktığımız anlaşılıyordur sanırım. Aslında tepeden denize inince kanoya tekneye binip karşı tarafa kürek çekmek vardı. Belki ileride; tepeler yeşilini, deniz de mavisini korumaya devam ederse...

    Her inişin bir çıkışı varmış. Gerçi bisikletler güzel güzel poz verse de, elde taşındılar epeyce. Özellikle bu çıkış dağa çıkışın çok benzeri, yalnız bir farkla; burası 5-10 dakikada tükenip yine aşağıya akıyor, fakat dağ yolunda buna benzer en az 100 tanesi aşılmayı bekleyen. 

    Bu sefer N900'ün şarjı tam doluydu yola çıkmadan. Bizim gezi yaklaşık 10 saat sürsede hem resimler hem de yol koordinatları bu kez bir aksiliğe uğramadılar. Bu yukarıdaki Runsaturday sitesinden; GPS olunca gezi daha başka bir hal oluyor. Gerçi yol boyu halinden memnun olmayanlar olsa da, bol iniş-çıkışlı ve bol manzaralı, yine son dönüş kısmı geceye kalan eğlenceli bir bisiklet turu oldu. 

Friday, June 25, 2010

A is for Acceleration

    I was reading the comments for Best Way To Publish an "Indie" Research Paper? entry on Slashdot. Then I have jumped to The Journal of Irreproducible Results. Somehow I have ended up meeting the Annals of Improbable Research magazine. Among the titles I semi-randomly clicked on their March-April 2007 Theoretical Figures issue. "Stress Analysis of Gawn" has kept me busy for a little while (keeping my comments private, no worries) Here comes a part of the poem in the same issue. See the free PDF if you are curious to read the rest...
You’d think there were enough. You’d think
There were no need for tricks.
The letters of our alphabet
Seem plenty— twenty-six.

The choices should be obvious
When making letters stand
For quantities of physics. Well,
Things weren’t quite that well-planned.

The quantities are many, 
And the letters not enough.
Some choices feel intuitive,
But some feel off-the-cuff.

Yes, some are fairly obvious,
But others feel make-do.
In case you have forgotten, kids,
Let’s do a quick review.

A is for acceleration.
B, magnetic feld.
C is for the speed of light
That prism tests revealed.

Monday, June 21, 2010

On my way to the summit

    This is the story of my unsuccessful attempt to reach to the peak of Uludağ on Saturday, June 19. I had to give up my ascent about 200 m below the summit. I had to give up because I ran out battery on my N900 where I was logging my coordinates, communicating with my family down in the city of Bursa, and capturing all those beautiful moments that I came across along the way. To my luck, the battery died just at the point where I photographed the little summit without being saved to the device memory. Coincidentally, this was the point where I stopped climbing any further.
    I was readying myself to greet Erden Eruç from the top for his amazing solo journey. Along with him, I was going to send some special messages to a few people in my life, and to a few that I have met in the last couple of years in my life. Unfortunately I couldn't touch the sky from the summit; I couldn't keep the sun up for two more hours nor managed to last my batteries to document all my progress. However I managed to got back home safely; without being eaten by wolves or birds while biking in the dark from the mountain top to the almost downtown area. I returned with beautiful stories and beautiful pictures. Sometimes reaching the destination isn't all about, but it is the journey what matters most (What!, you haven't read the Alchemist yet?).
    Here on, the real story begins. We started ascending (me and my bike in the same cabin) in a famous aerial tramway. I spent about 8$ for one-way two stage trip for both myself and the bike. It takes about 15-20 minutes without to reach up to Sarıalan and as seen in the above picture the trip is highly scenic but a scary one especially if you feel fear from looking down high heights.
This is the Sarıalan plateau, and also showing where I was heading to. Although the mini-buses on the front was waiting for passengers to go to the hotels region, I have passed my chance for  the next time to experience the scenery as closely as possible and to mimic Erden's style a bit. The sub-motivation of this trip was to see if the white looking parts on the slope of the summit was really snow packs or some sort of rocks. 
    Wasn't I right? It is all green in between lovely bird songs. This was one my most beautiful biking path I have ever taken. Although after less than a kilometer pedaling the slope of the road got steeper, I reached to a point that I was after in about 3 km more biking.
    Finally, my bike is at the crossroad. It is actually my cousin's bike. I stressed the bike probably more than what its manufacturer had done on it. Through wet or dry, bumpy or straight, rocky or sandy roads, day or night and blazingly fast or turtle slow, in climbing or descending it never broke down, and never had me to touch on it once. Thank you Bisan, you really know how to make a durable mountain bike at very affordable prices.
    Water water everywhere, and all drops for drinking. This was another pure joy moment. I should have stopped my climb after washing my head under this fridge cold spring. I know of myself being content with small things most of the time. Apparently, this was not of those moments. I ended up continuing upwards and instead the bike carrying me I had to carry it on the very harsh roads.  On the way up there was many small creaks flowing downwards conveniently freeing me from carrying water. I gave about 4-5 water breaks. Could those be any signs of melting rocks? :)  Although the nature was very generous to water me any time I needed, there wasn't much to eat around the grass and on trees.

    
    Here comes the challenges. I felt like playing the latest Prince of Persia game when I came by these missing bridges. The trail was getting rougher; partially eroded by the flowing water mostly, and covered by rocks at its particular places. The first pass was the easier one, since the columns were as if specially designed for bikers in mind. When I came to the next one, I paused for a moment and Damian Walter's clip started playing in my head, immediately.  I saved this part for him; one wrong move could have stranded me there. I took the easier path and walked around the bridge by spending 2 extra minutes, refreshing myself once again from that fresh snow water. 
    This photo was my final summit capture. It was taken about half an hour before I reach my bridge challenges. At point A, I left my bike behind departing from the trail a bit uphill. It took me about another half an hour to get to the point B.  If "C" had located on one down the right, I would have continued and touched there in a good one hour in spite of lack of all the supplies. I saw two hikers and a car parked on one hill along the way. Definitely, I would camp somewhere on the hills if I had enough equipments and companied by a good friend. 
    And a bonus sunset. I was lucky enough to see double suns appearing in the sky. I should improve my ability to interpret universe's language. (Haven't I mentioned somewhere above about the Alchemist?) When the nature has sent me omens like above I should have been wiser and not to turn my back at them. Clearly, one of the suns (illusion or not) was setting and telling me it's time to go back home. 
   After about three hours ascent, in almost an hour I managed to return to the hotels region safely. Only at one point, I was stopped by a watchdog and had to veer off to bushes. I was not sure whether the dog was leashed or not. He barked a few times and stepped a few feet towards me, while I was backing up at the same time. Later on, I stopped for a short snack break. 
    It was after 45 minutes fast descent, when I called my dad to pick me up by the İnkaya sycamore about 10 minutes biking distance before I could reach to the downtown. (You still don't know the story of the Alchemist starts by a sycamore? :)  Through the dark, water splash, wind whispering, dog barking, car lighting, and half moon lit ways my 25-30 km descent was completed within 45 minutes, slowing down at a few points but without ever once stopping. It could be argued if it was smart to take this adventure alone at night, but one thing is for sure; there is a lot to learn facing the darkness. In case someone still wonders, this bike proved me once again that a bike's most essential feature is its tires turning unceasingly when one most needs them to be.    
    Final words are taken from a verse attributed to Imam al-Shafi which I heard in the The Man Who Walked Across the World titled documentary made for the Islamic seyyah Ibn Battuta:



         Travel! Set out for pastures new
                                 Life tastes richer when you have road-worn feet.
                No water that stagnates is fit to drink,
                 For only that which flows is truly sweet.

Friday, April 16, 2010

Celebrating the first year of IPython logging

It was last year today when I first started logging my IPython sessions explicitly using Pierre Raybaut's idea. All you need to do is just to make the changes/additions described in this piece of documentation (Logging to a file) on its soon-to-be-change LP repository. (Applies to IPython 0.10 and below)

You get a time-stamped log file (in your ~/ipython/ or wherever your IPython home directory is set at) created per day that looks like below:

#!/usr/bin/env python
# 2009-04-16.py
# IPython automatic logging file
# 13:15
# =================================
d = loadtxt(file, skiprows=30)
plot([d[i][8:] for i in range(12)])
# =================================
# 14:08
# =================================
boxplot(d[:][8:])

As of writing this entry I count almost 300 separate logs and combining them into one file using this little script yields about 37.5 k-lines (including lots of multiple entries, time-stamps, empty comments, many copy-paste codes that I haven't actually typed in)

Besides having this combined file as a rough measure for myself there is another good use for it as triggered with this question: How to exit IPython properly? IPython internal history file forgets what was in the session if you accidentally or intentionally kill your IPython session without issuing an Exit at the exit :) That new combined history file comes to our help.

First we will append all the time-stamp logs into one file (rename it to "history" so that IPython can load it at the start-up) Then from iplib.py comment the readline.set_history_length(1000) line to prevent 1000 lines limit in your history file. Now I can access all my previous coding history from within IPython again no matter how I end my sessions. (Providing that I will stitch my logs periodically)

Lazy coding at its best!

It would be great if IPython could handle history lines more smartly to read multiple lines back properly. Who knows maybe an IPython super user has a solution for that laziness as well.

By the way anyone knows how to remove duplicate lines from a file without actually sorting it?

Monday, April 5, 2010

GVIM+IPython with Conque plug-in

Here is an alternative way to bridge (G)VIM and IPython applications. GVIM is my editor-of-choice and IPython is a great interactive Python interpreter. If you are a user of these two environments, this simple integration technique could greatly boost your programming / prototyping speeds.

First go to conque (Thanks to Nico Raffo for the plug-in and helping me to include IPython functionality in it) page and install the plug-in following the simple installation instructions. (In my Fedora 12 system, I pulled the latest tar.gz package from the download list section and extracted it under ~/.vim folder.) Next grab the latest conque_term_pylab.vim file from the same section and place under ~/.vim/plugin directory.

When you open a simple Python script you can easily launch an "IPython -pylab" instance by hitting F6 and execute the whole script content by F8, use F9 to send a visual selection. The IPython inside the buffer acts as a part of GVIM, so you can easily switch between buffers and copy/move text from/to buffers. You can modify the IPython switch, default window position, mapped keys editing conque_term_pylab.vim

The screenshot below shows the bridge in action:


Hint: Add the following line into your vimrc file to get equally spaced buffer windows independent of the main GVIM window size.

autocmd VimResized * wincmd =

Currently only %run magic of IPython is implemented. Here are some of the ideas that could be added to improve this IPython + VIM integration:
  • Add %whos key-mapping
  • Launch IPython -pylab on start-up automatically if a Python script is opened.
  • If "run" command is sent before an IPy launched instantiate one automatically.
  • Make sure only one instance of IPython is running!
  • GUI integration, create GVIM menus, reading %whos values back into a separate window and changing values.
These last points could be well achieved by working on PIDA project. It is very possible to have an VIM + IPython powered IDE that is especially suited towards scientific use.

Saturday, April 3, 2010

Scenes from under a microscope window

This photo is showing about 40 μm dry soda lime glass microspheres. They are perfectly spherical indeed. We use these particles to calibrate optical particle detectors e.g. Forward Scattering Spectrometer Probe (FSSP) The picture with less beads shows even tinier particles -- I will say sizes down to 5-10 μm from the same bottle. However these are the smallest sizes it gets from the microscope we used. It is not possible to detect by eye the sphericity of microspheres from the 2.1 μm bottle.

The microscope we used is a Nikon SMZ-U (Zoom 1:10) Unfortunately, our efforts were not successful in trying to show the more sphericity of Ammonium Sulfate {(NH4)2SO4} particles than Salt (NaCl) crystals. We definitely need a powerful electron microscope to confirm this riddle. See the rest of the images at my Particles titled Picasa album.
PS: In one of the pictures the hands belong to Julia Beard. Without those hands it would take me a day to finish this work. Thanks Julia for your patience and tolerating my never-ending requests.
PPS: This posting has really nothing to do with Dream Theater's Scenes from a Memory album :)