Updates from February, 2008 Toggle Comment Threads | Keyboard Shortcuts

  • Akarsh Simha 3:02 pm on February 23, 2008 Permalink  

    A feast for the Astronomically Obsessed! 

    http://www.discoverytelescope.com/televue/tv_photos/tvgroup.jpg

    Bad quality, web optimized image, but does convey the idea!

    And TeleVue eyepieces (especially the Naglers and the Panoptics) are well known for being a feast!

     
  • Akarsh Simha 12:25 pm on February 15, 2008 Permalink
    Tags: Convolution, Dirac Delta, Function Space, Hilbert Space, Mathematical Physics   

    Convolution as a basis expansion! 

    We’re doing a course called ‘EP211’ titled ‘Mathematical Physics’ as part of our BTech, Engineering Physics programme at IITM. Currently, we’re working with Fourier Series expansion in Hilbert Spaces.

    In another course called ‘EC204’ titled ‘Networks and Systems’ offered by the Electrical Engineering Department, we’re working with Linear, Time invariant systems and Fourier transforms, frequency domain analysis etc.

    Within 1 month, we can already draw parallels between the courses. Since signals are functions in Function Space and linear time-invariant systems are like linear operators in this Function space, whatever we learn in the Mat. Phy. course can probably be applied to the Net. Sys. course!

    The first realisation of some connection was when we wrote eigenvalue equations in Net. Sys: We showed that e^(st) is an eigenstate of any LTI system. Today, though it might be a trivial thing, I realised that “Convolution” with the Dirac Delta function delta(t), which we kept using repeatedly in the Net Sys course was just a kind of series expansion of a function f(t) in the basis of Dirac Delta functions delta(x – t):

    f(x) = integral[ f(t)dt.delta(x – t) , -inf, +inf ]

    Think of f(x) as a function in Function space. f(t)dt is a coeffecient in the expansion of f(x) in the basis of Dirac Delta functions delta(x – t). ‘t’ is a kind of ‘label’ for the basis, like how we label bases with countable number of basis vectors with an index like e_{i} being labelled with index ‘i’.

    Now, Dirac Delta provides an orthonormal basis, because:

    integral [ delta(x – t1).delta(x – t2)dx, -inf, +inf ] = delta(t1 – t2)

    because

    integral [ f(y).delta(y – y_{0})dy, -inf, +inf ] = f(y_{0})

    However, convolution with any other function as in f(t)*h(t) is also similar, excepting that the basis vectors {h(x – t) for all ‘x’} is not orthonormal:

    integral [ f(t).h(x – t)dt, -inf, +inf ] = f(x)*h(x)

    Again, f(t)dt looks like a weight for the basis vector h(x – t).  However, {h(x – t)} (which I like to call h_{x}(t) to lay emphasis on the fact that ‘x’ is acting like a continuous ‘index’) need not constitute an orthonormal basis:

    integral [ h(x1 – t).h(x2 – t)dt, -inf, +inf ] != delta ( x1 – x2 ) in general.

    Can we do Gram-Schmidt orthogonalisation on a general {h(x – t)} basis? What do we get then? I still have to work out! I guessed I’d get delta(x – t), but it doesn’t seem to work out that way!

    Another interesting thing is that the Dirac Delta orthonormal basis comes from the eigenvectors of the Hermitian (? – Need to check this) operator ‘x_{op}’ (multiplication by independent variable) in the Function space:

    x_{op}|delta_{y}> =  y|delta_{y}>

    i.e.

    t.delta(x – t) = x.delta(x – t)

    Taking ‘t’ to be the independent variable, and ‘x’ to be the eigenvalue and the label for eigenstates. But are these the only eigenvectors?

    (We used the ‘x_{op}’ operator in class today for something, that I’m yet to understand :-D)

    I wish WordPress had a LaTeX feature in the free version itself.

     
    • anonymous24 5:55 pm on February 15, 2008 Permalink | Log in to Reply

      Good post. I remember Fishy telling me last year (in his 4th semester) that he is sort of seeing Elec and Phy courses merge together. Engg Physics Rocks da. Much better than Electrical Engineering 😛

    • Akarsh Simha 7:12 pm on February 15, 2008 Permalink | Log in to Reply

      Yes… I’m glad I’m doing Engineering Physics.
      That’s nice to know that the courses kind of merge.

      Probably we can do a complete treatment of Linear Time Invariant Systems in terms of vectors and operators in Function Space.

    • name 9:32 am on September 1, 2008 Permalink | Log in to Reply

      Good day!,

  • Akarsh Simha 5:53 pm on February 14, 2008 Permalink
    Tags: mail filtering, mail processing, , procmailrc   

    Managing Mail – procmail 

    I like the way I manage my email, so I thought I should put it up on my blog, so that it might be of some use to others as well.

    Here’s a list of what I use for what:

    • exim4 – To send outgoing e-mail
    • getmail – To fetch my mail from an IMAP server
    • procmail – To process my mail and deliver it into appropriate mailboxes
    • mutt – To read my mail
    • emacs – To compose mail 😀

    Much of my configuration was ‘stolen’ from KMap (a.k.a Kumar Appaiah) including the getmailrc, exim4 configs, procmailrc, muttrc and .emacs :-D. I’ve put up full instructions on configuring this combination inside IIT Madras over here.

    Most of the modifications I felt the need to make were done in the .procmailrc, which is the (default) configuration file for procmail. This post is going to focus on how I handle my mail in my procmailrc.

    I love procmail. Using procmail is like doing ‘programmable’ mail filtering, or even better programmable mail processing! Here are some tidbits from my procmailrc:

    Header

    # kstar’s .procmailrc

    SHELL=/bin/sh
    MAILDIR=$HOME/Mail
    LOGNAME=kstar
    LOGFILE=$HOME/pmlog
    LOG=”

    VERBOSE=yes

    This is what the beginning of my procmailrc looks like. It tells procmail various things, like that it should maintain a log, and deliver mail into ~/Mail and use /bin/sh as the shell. The debugging logs are sometimes helpful. procmail is so flexible that you can run into bugs in your procmail script which will cause mail to be delivered incorrectly.

    Anything that starts with ‘#’ is a comment, as usual 😀

    NOTE: procmail does not recognize ‘~’ as your home directory. You should use $HOME instead.

    Deleting Unwanted Mail

    I no longer am on these social networking sites, and I keep getting invites to various social networking sites – minglebox, hi5, blah blah blah. This is what happens to all those “invites”:

    The Example:

    # Trash all mail with the subject line “invites you”
    :0

    • ^Subject.*invites you

    trash/

    The funda:

    As the comment explains, what this block does is to put all mails which have “invites you” in the subject line into a mailbox called trash (which is a directory, as indicated by the ‘/’ at the end).

    Every rule (procmail calls it a ‘recipe’ :-D) in your .procmailrc should begin with a ‘:0 <something>’. The last rule begins with a ‘:0:’.

    That is followed by a list of conditions (optional). In this case, the line ‘* ^Subject.*invites you’ is a condition. The ‘*’ at the beginning tells procmail that this rule applies to all mails that match the regular expression that follows it. So only mail that matches the regular expression ‘^Subject.*invites you’ will pass. (^ matches the beginning of a line, .* matches 1 or more arbitrary characters)

    The set of conditions is followed by exactly one action. In this case the action is ‘trash/’ which tells procmail to put the mail into a directory called trash under MAILDIR, i.e. into $HOME/Mail/trash in my case.

    Another Example:

    # Delete all birthday calendar requests
    :0

    • ^Subject.*when’s your birthday

    /dev/null

    Another example, just to get the hang of it. In this case, the action is to put it into /dev/null which is the infinite sink for all unwanted information. Anything that is redirected into /dev/null vanishes from the realms of virtual existance for ever, ever and ever. (Don’t you wish you could ‘cat’ your institute’s dean into /dev/null as well?)

    Processing mail to remove nonsense

    The Example:

    # Remove Yahoo! Groups links
    :0 fHB

    • ^To.*yahoogroups\.com

    | sed ‘/__\._,_\.___/,$d’

    CAUTION: Do not use this code – this is only an example. It fails when attachments are sent with e-mail, and simply deletes them!

    The Funda:

    This rule looks a bit different from the earlier ones. It begins with a ‘:0 fHB’. The ‘f’ stands for ‘filter’. This tells procmail to treat this rule as a filter, i.e. to pass this through a command and deliver the output as if it were email. ‘HB’ tells procmail to look for the regular expression patterns (specified using ‘*’) in both the header (‘H’, which is default) and the body. I do this so that the links added by Yahoo! Groups at the end of emails are removed not only in direct messages from Yahoo! Groups, but also forwarded posts from Yahoo! Groups.

    The second (functional) line is straightforward – it looks for the pattern ^To.*yahoogroups\.com in the Header and the Body (because we specified so) and applies the filter to only those mail which match this pattern. Notice that the ‘.’ is escaped, as in ‘\.’ – that’s part of the regexp syntax: In regexp ‘\.’ matches a ‘.’, and ‘.’ matches any character (it has “special meaning”).

    The third line tells procmail to pipe the mail’s contents into sed, which cuts out all that is in the mail after the pattern “__._,_.___” (which Yahoo! Groups use at the end of the message). It also cuts out attachments, so be careful! (I’m still trying to find time to fix this 🙂 Any solutions for this problem are welcome.)

    Copying mail to the inbox

    I like my inbox clean, with no e-mail in it. I delete email as and when I read them – so that my inbox looks empty. Now, I want a backup of every e-mail I receive to be archived into an appropriate mailbox and a copy to be delivered to my inbox. So this is what I do:

    The Example:

    # Now copy all stuff to inbox
    :0 c
    inbox/

    The Funda:

    The ‘c’ in ‘:0 c’ stands for copy and tells procmail to apply this to a copy of the mail. So a copy of all mail that passes the tests described earlier, irrespective of content (no ‘*’ regexp conditions) gets into my inbox.

    procmail stops looking for rules when it finds a destination for mail. So when it finds some mail which is a social networking invite, it writes it to trash/ (or /dev/null) and since it has found a target destination, it stops there. Thus, the above example copies only mails which have passed those tests into my inbox. But this is not a final target, because of the ‘c’ in the recipe header, so procmail will continue to look through other recipes as well.

    Archiving Mail

    I prefer to archive mail from different mailing lists or frequently-mailed people into different directories. So this is what I do.

    The Example:

    # All linuxusers_iitm mail goes into the linuxusers_iitm folder
    :0

    • ^TOlinuxusers_iitm

    linuxusers_iitm/

    The Funda:

    The above recipe puts all mail that was sent to an address containing linuxusers_iitm into a box called linuxusers_iitm/

    Any mail that matches the condition here will find its final destination in linuxusers_iitm/ mailbox and procmail stops looking for additional rules.

    The “TO” is a procmail standard macro that looks for whatever that goes after it (in this case ‘linuxusers_iitm’) in many email headers – To, Cc, BCc… Read the man page for more.

    Another Example:

    # All Facebook mail doesn’t get archived
    :0

    • ^From.*Facebook

    /dev/null

    (I no longer am on Facebook, so this is useless for me now :-P)

    The Final Target

    The Example:

    # Finally, that which matches nothing is archived into ‘archive’
    :0:
    archive/

    The Funda:

    This is the last rule in my .procmailrc

    It puts any mail that hasn’t found a destination mailbox for archival into the ‘archive’ mailbox.

    Resources:

    I hope this was useful. Here are many other resources that I found with Google, to save you some trouble Googling 😛

    Also, there are always the man pages on procmailrc – and they are a very useful source, indeed.

     
  • Akarsh Simha 8:37 pm on February 1, 2008 Permalink
    Tags: FossConf   

    FossConf and a failure presentation on KStars! 

    Yeah… I was to give a talk on ‘Astronomy and Linux’ at FossConf 2008, Anna University MIT Campus, Chromepet – yet another of those FOSS Conferences. After all, it looks like India is becoming a breeding ground for FOSS activity and it’s so nice to know that every metro (and even the “non-metros”) now are making an effort to organize FOSS Conferences. There are reasons to feel more at home at FossConf, than at FOSS.IN and I think they are best not discussed. But I must say that FossConf needs a long way to go as far as good organization is considered – and this is completely acceptable because this is the first time it is being held!

    The best part of FossConf was:

    1. The conference is free – delegates are not charged anything

    2. The conference is Free, free as in freedom – anybody can walk in to the talks. No ‘registration’ required.

    3. The conference is Open Source 😛 – There is hardly any procedure and everything is straightforward in the procedure. You can see through the entire conference’s logistics.

    Just like the genre of software it is all about!

    It was a nice time – met many of those guys we met at FOSS.IN and the ILUGC guys.

    Today morning, I started off along with Mr. Arun Khan (an IIT Alumnus, working to bring FOSS into corporate sector) to Chromepet. Mr. Khan was staying at Taramani House, so we walked down to G.C. and took a bus to the main gate, then walked down to the Gandhi Mandapam Bus Stand, took a bus to Guindy, and finally got to AU-MIT-Chromepet by local train from the Guindy station.

    The conference started late. So everything was cascadingly delayed. But come on, it’s the first time they’re organizing this! Doesn’t matter.

    So, my talk was to start at 1:30 PM, I got the projector only by about 2:00 PM, and it nearly took me till 2:15 to get my slides on the system. I had carried my friend Prakash’s Debian laptop, but I didn’t know we needed to install some i810-switch package or something like that to switch display to projector. So we tried for several minutes to get the laptop projection, in vain. Thejaswi Puthraya’s laptop didn’t work as well because his monitor was not detected by the Xorg, and anyway it wouldn’t have worked later either. So I couldn’t set up projection even after 2:30, which is when my talk was supposed to end! Anyway, the FossConf people provided us with a Desktop, I loaded my .pdf from the thumb drive I was carrying and rushed through my presentation. Unfortunately had to drop the part about how we did Webcam astrophotography with Linux. Just blurted something out about why Astronomers use Linux and something about KStars. I said that I couldn’t get projection going, so I wouldn’t demo KStars, which is what I wanted to do for a large fraction of the talk, (The next speaker was waiting, and I regret having made him wait) and that I would however demo it on a laptop screen for those who were interested. So after my ‘talk’, I went out to an empty classroom with friends from my institute, Thejaswi Puthraya et al, and gave a ~20 minute long demo of KStars on Prakash’s laptop screen. I also met a gentleman who was interested in helping us come up with an open source stacking software – i.e. “Registax equivalent”, and he took my contact. I really liked the ‘planet trails’ feature in KStars which lets you see the retrograde motion of planets beautifully! I demoed the use of the Alt-vs-time tool, the Jovian Satellites tool, the Solar System tool, the Details dialog, etc. Unfortunately, I only had KStars from KD 3.5.8 or whatever, and not from KDE 4.0, so it was really slow and lacked a few nice features that are now in KStars 1.3

    After this, I was just in time for the last few minutes of Sudarshan’s workshop on building Python extensions from C libraries. My friend Arun Chaganty a.k.a Slinky was there throughout and I really regret having missing it. Sudarshan works on Python for OpenMoko (don’t know what exactly the project is called) – the Linux distro for the OpenMoko GTA-* Neo-* “Open”Mobiles. Sudarshan owns an OpenMoko GTA-01 himself, and he showed towards the end (after I walked in) a demo where he SSHed into his phone, invoked the python interpreter and showed how his port of libgsm into a Python module was capable of doing the GSM operations like sending SMS, detecting network service providers etc etc. Slinky feels honoured for having got an SMS from what seems like his next guru, Sudarshan, during his demo! (Sup3rkiddo, are you reading this?)

    After that, we (Slinky and me) walked into Mr. Raman’s talk on Perl for Beginners and I must say that it was very well presented. Then, we head back to our institute with Mr. Arun Khan, talking about various topics ranging from FOSS to How IIT has changed or Whether they had a lingo in those days as well on the train back. It was an entertaining journey back to the campus.

    We met Mr. Khan again at 8:00 PM at Gurunath for a further discussion (which ensued till 11:00 PM) on various things – FOSS, Linux, Gen-fart (Random and arbitrary discussions in IIT lingo) – lots of things. Mr. Khan had a message to convey to us – and if I’ve got it right (and I hope I have) – in summary, it read “Advocate FOSS” and “Contribute to FOSS”. He explained why he’d like to see us working towards these – so that the corporate industry adopts FOSS solutions! All of us – Varun Hiremath, Prasanna, Saad, Slinky, Prakash and myself had a nice time with Mr. Khan.

    Now I’m back here at Prasanna’s room typing this blogpost – preparing for yet another astronomy session – the highlight being the Jupiter-Venus conjunction.

     
    • pavithran 8:12 pm on February 4, 2008 Permalink | Log in to Reply

      Hi ..dont worry dude I presented KStars at fossconf’08 🙂

      Well My talk was on plasmoids ..I extended it to show the latest kde4 edu apps .
      in which I covered kstars a bit !!
      I didnt know how to use ..show just showed few functionalities..

    • akarshsimha 1:13 am on February 5, 2008 Permalink | Log in to Reply

      @pavithran: Wow. I was rather disappointed because I missed your talk in favour of the talk on GCC hacking. Anyway, I hope you have the presentation material up, so I’ll go and check that out.
      Nice to know that you covered KStars.

    • sudharsh 4:35 pm on February 11, 2008 Permalink | Log in to Reply

      guru, me!?!?..LMAO…Poor Slinky
      btw I dont own the neo, wish i could though :(.
      It belongs to the folks at NRCFOSS

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel