schnips.dk

En Haute Couture blog.

Eyjafjallajökull volcano links

without comments

Almost live measurements of earthquakes:

     http://en.vedur.is/earthquakes-and-volcanism/earthquakes/myrdalsjokull/#view=map

Live webcam and thermograph of Eyjafjallajökull:

     http://eldgos.mila.is/eyjafjallajokull-fra-thorolfsfelli/

Live webcam of Katla:

     http://www.ruv.is/katla

Pictures

     NationalGeographic.com

     Boston.com.

Written by schnipper

May 22nd, 2010 at 5:38 pm

Posted in Aha!, Physics

Use the microphone input as a powerful tool for signal analysis

without comments

During work in the laboratory, I often find it convenient to characterise dynamical states of a setup by the fourier spectrum of an appropriate aquired signal. For example, you can determine the rpm of a motor from the sound emitted by the gearbox, etc. I have written a small Matlab code that reads and analyses signals send to your microphone input. An example of a recording signal is seen from the picture below. The signal is generated by me humming happily the note A to Oscar Danielson’s “Norska gränsen”.

It is not the most elegant tool that the world has ever seen, but it works quite nice. If you change toe Sample signal lenth and/or Sample frequency, you need to restart the code by toggle twice. By the way - the two frequencies show is the most dominant, and half this value.

To use it, you should download these files and put them in your Matlab root/work folder.

readsoundgui.m
readsoundgui.fig

Be careful not to fry your mic input!!!!

Written by schnipper

January 16th, 2010 at 4:01 am

Posted in Matlab, Physics

Logitech Quickcam causes green screen in Skype - Ubuntu 8.10

without comments

I’ve just borrowed a Logitech Quickcam to use with skype under Ubuntu 8.10 (Intrepid Ibex). To my unpleasant surprise the camera did not work as-is, although it apparantly functions well with Cheese. What seems even worse is the apparant extend of this problem. After googling and following links, this page finally provided the correct answer: Make sure you have installed the video4linux driver libv4l-0

sudo aptitude install  libv4l-0

Then open Skype with the command

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

or make an executable as described in the link.

Written by schnipper

March 10th, 2009 at 8:25 pm

Posted in Aha!, Ubuntu

No sound in Firefox flash, Ubuntu 8.10 (Intrepid Ibex)

without comments

Lack of sound in flash media (such as youtube) in Firefox seems to be a common problem for Ubuntu 8.10 users. Follow the link to this guide, which worked on my laptop, IBM T42-2373. In part 2, I chose MPLAYERPLUG-IN (option 2) and instead of editing the local settings, I edited

sudo gedit /etc/mplayerplug-in.conf

Hopefully It will do the same for others.

Written by schnipper

January 2nd, 2009 at 11:50 pm

Posted in Aha!, Ubuntu

Matlab: Graphics with legends for TeX

with 2 comments

See previous post.
Producing graphics for TeX documents is quite easy following the previous post. However, Matlab (7.2.0.232 (R2006a) and others) has a bug preventing the root command

set(0,'defaulttextinterpreter','latex')

to affect the font in the legend box. A workaround to enforce latex typesetting of the legend box is including the following to your plot command:

[L,Obj] = legend('legend entry 1','legend entry 2','etc...');
t = findobj(Obj,'Type','Text');
set(t,'Interpreter','latex');

Problem solved!

Note: On a Matlab running on a Windows platform, text with LaTeX-math does not print correct to neither paper nor pdf. I have not bothered to solve this, one workaround is to save the figure to an eps and print that.

Written by schnipper

December 16th, 2008 at 3:40 pm

Posted in Matlab, Physics

Exporting graphics in Matlab

without comments

A common mistake by people using Matlab to produce graphics for reports, presentations etc. is the use of too small font size on figure axis. In the beginning of each Matlab session I run a script containing

path = 'e:/matlab_stuff';

cd(path)

display(' ')
display('   working directory changed to')
display(['   ',path])

format compact

set(0,'defaultaxesfontsize',18,'defaultaxeslinewidth',.7,...
'defaultlinelinewidth',.8,'defaultpatchlinewidth',.7,...
'defaulttextfontsize',18,'defaulttextinterpreter','latex',...
'defaultaxesfontname','century')

clear all

The first line sets the working directory to my preferred working directory. The interesting command is line 11: Here I specify the font size on figure axis and text. I’ve found that size 18 usually works fine, but this is up to personal preference. A piece of advice, though: I tend to forget that people older than 28 (say, a professor) has limited sight. Thus, use a BIGGER font than you thought!
The argument ‘defaulttextinterpreter’ produces text (axis labels, text) being typeset in LaTeX = beautiful! I still havent figured out how to enforce Latex interpretation of axes numbers, so for now this is done by setting defaultaxesfontname to century (this looks like Latex font the most).

Written by schnipper

December 16th, 2008 at 3:00 pm

Posted in Matlab, Physics

Jeg er en nørd…

with one comment

Både Kåre og Tjansson (se links) er nørder, og begge 92% af slagsen iflg. en online test. Jeg faldt for fristelsen og tog samme test som de (i hvert fald tjansson) linker til, egentlig mest fordi jeg ville have bekræftet at det nok ikke stod så galt til med mig. Tilsvarende stor var fristelsen så, da jeg efter endt test (og jeg mener faktisk at jeg svarede ærligt) havde følgende score:


I am nerdier than 99% of all people. Are you a nerd? Click here to find out!

Foruroligende! Aftenens planer er hermed erstattet af pizza, cola og computerspil iført tennissokker og grå, stumpede træningsbukser fra start-90erne.

Written by schnipper

September 22nd, 2008 at 10:01 am

Posted in Aha!, Nonsense

Tropiske lavtryk under opsejling

with one comment

For de af jer - der som jeg - synes det er spændende at følge med i lavtrykkenes rasen derovre i det der USA findes her en oversigt over de nuværende tropiske lavtryk (som på denne tid af året ofte går hen og bliver til orkaner).

Her i kølvandet efter Gustav er der allerede tre nye lavtryk under opsejling - Hanna, Ike og Josephine.

Written by schnipper

September 2nd, 2008 at 6:00 pm

Posted in Ukategoriseret

The Saloon Men

with 2 comments

A small recording of The Saloon Mean (featuring yours truly on the banjo) shot at Annexet in Helsingør.

Credits to Henrik Tang for shooting the video

Written by schnipper

September 1st, 2008 at 9:24 am

Posted in Aha!, The Saloon Men

Viskøst plask

with one comment

For nogen tid siden optog Anders og jeg en video af en glycerindråbe der efter et frit fald på 2.5m kolliderer med en vandret liggende glasplade, hvorpå der ligger et lille, tyndt lag sprit.

Plasket kan ses af videoen nedenfor. Bemærk hvordan der vokser en “skål” af glycerin, som derefter bryder op i et smukt netværk. Opbruddet sker som konsekvens af at små sprit-dråber rammer glycerin skålen og dermed lokalt nedsætter overfladespændingen som derefter skaber opbruddet. En instabilitet forårsaget af overfladespændingen kaldes en marangoni instabilitet.

Written by schnipper

August 31st, 2008 at 1:50 pm

Posted in Physics