Unix & Shell scripts

IRAF Related:
  • [Colraf: making colour astronomical images] – Earlier this year I put together a few scripts that takes rgb FITS files and makes nice colour images. This was completed as part of development of tools for the University of Birmingham Observatory. Anyway, I meant to make this available before but I didn’t have the chance to make it friendly. Its quite simple to use but requires the user has [IRAF] installed [more here]

AWK/Bash Scripts:

  • [Awk decimal to sexigesimal higher precision] – newer version of the script below.. useful. [more here]
  • [Awk sexigesimal to decimal] – Ages ago I put on here some awk scripts to convert between decimal numbers and sexigesimal (i.e. very useful with astronomical catalogues) and I think I’ve also gone the other way… anyway here is an updated and a more useful bash script todo this, still using awk at the heart of it) [more here]
  • [Awk decimal to sexigesimal] – convert a decimal number to a sexigesimal one [more here]
  • [Basic Parallelisation in Bash] – I have recently started writing some quite CPU intensive code and since we have a nice cluster here (without any management software on it) I decided that it would be best for me to take advantage of the number of cores on them. Actually, this works nicely on my desktop which has four cores anyway (and 4GB of RAM). Essentially, I’m lazy and this basically runs my pipeline in parallel for different sources by sending off different jobs to different cores (to the maximum number that you specify)… and then when they finish runs then next few… and so on until they are all done. No longer do I have to worry about waiting for the jobs to finish and wasting time by missing their finishing point. I also no longer have to have lots of [screen] sessions or loads of terminals open… bliss… [more here]
  • [Organising FITS data] – Over my years of teaching undergraduate astronomy labs I’ve seen many different ways that students save observational data, well its all FITS but the filename and extensions can vary. [more here]
  • [Using Awk to add a column to a file] – I had a need to add an extra column of numbers (all the same) to dataset the other day… so simple todo with an awk script [more here]


Other *Nix stuff:

  • [Removing CTRL M characters] – Sometimes if you modify or create a file in Windows or DOS and then copy it to a Linux (well Unix like) file system you get ^M characters at the end of each line [more here]
  • [Convert video to PSP format on Linux] – Gaming / videos are important at airports… [more here]
  • [Converting Video for the Ipod on a linuxbox] – videos are important at airports… [more here]
  • [Convert images to a document (Ubuntu)] – I’m currently working on refurbishing the University of Birmingham Astronomical Society’s Grubb telescope which dates back to 1882. Anyway, I’m not here to write about this, I essentially have a big bunch of pictures that I took when we took it apart and now I’m putting it back together I thought it would be rather useful to put the images together in order in one document. [more here]
  • [Bash rename] – scripting the renaming of files. [more here]
  • [Playing with gnuplot] – The otherday it was about time I tried out [gnuplot] for a change. I used to do all of my scientific ploting (and actually a lot of my analysis) in [R]. These days I tend to use [python+matplotlib]… but I wanted something that would allow me quickly to visualise data and plot functions without much effort… this is where [gnuplot] really does seem to be powerful. [more here]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s