Help me write my project time!

December 13, 2007

Right, so drafts for projects were due in yesterday. So now I’ve been forced in to making one, I can throw it around to be reviewed/spell and grammar checked/slagged off. Anyone interested in helping out can download it at http://people.pwf.cam.ac.uk/nrp28/draft.pdf (26mb download). Thanks!


Part III posters – getting away with it…

November 30, 2007

Poster time. Dreaded by Part III students, we all have to present a poster of our work in progress projects, which is then carefully studied by respected members of the department then taken apart and criticised in front of you, while you stand at the side crying “but, but” over and over again. What’s worse is that although beer is provided, it runs out rapidly as our betters drink it all before we get a look in.

So how do you avoid this problem? Simple! Choose a project that no-one has a clue about! Such as mine – a poster titled “Seismic Oceanography. There are perhaps four people in the world interested in this. So all the palaeontologists, sedimentologists and even geophysicists pass it by with only a glance at the title before hurriedly moving on. Putting my poster next to a brilliant one about the length of dinosaur bones was also a great move I feel, as no-one could get close to mine due to the gaggle of dino experts around that one.

Let that be a lesson to you. Always choose the most rediculous, esoteric project there is going :)


Working smarter, not harder: Remote access to the Bullard

October 23, 2007

Let’s face it, nobody wants to spend twenty minutes cycling up to the Bullard to set something processing on the computer system, then spend the rest of the day waiting for it to complete before cycling home again. Wouldn’t it be so much easier if you could just log in to that computer from home, then go back to bed while the processing happened?

Well, now you can, because this handy guide will show you how! (unless you’re a linux user, in which case it’s an absolute doddle: ssh -X username@sirius.cam.ac.uk, ssh -X username@computer, run the software you want…).

First step is to download an X server for Windows. This means that when you run a piece of software on the Bullard computer, all the processing will be done on the Bullard machine but the graphical display will be sent over the network and your Windows PC at home will display it. Recommended for this is Xming – yeah, the name sucks, but it does the job :) You’ll need both the latest release of the server and the fonts to go with it. Install the server then the fonts.

Next, you’ll need something that actually allows you to log on to the Bullard machines. This is a piece of software called PuTTY, and takes the place of the terminal that the linux machines provide. Easiest thing to do is download the installer and run it.

Now we’ll set up Xming so that it will listen to commands from PuTTY. On your desktop there will now be an “XLaunch” icon, looking something like this. Run it.

XLaunch and Xming icons

You don’t need to change anything – just keep clicking next…




… until it minimises down into the task bar.

This has left the X server running in the background, waiting for it to be triggered by some other software. The software doing the triggering will be PuTTY, so open that now. The first screen is where you enter the server to log in to – in this case, sirius.esc.cam.ac.uk, where you can reach all the other machines from.

We then need to fiddle around with some of the settings – firstly, we need to tell PuTTY to forward X (the graphics) to Xming by forwarding to “localhost:0″…

… and we need to use tell it to use compression when sending graphical data, especially if you’re using a slow network that isn’t connected to one of the colleges.

Then click open to start PuTTY, and after a few seconds, a screen will pop up asking you to log in to sirius. Answer the questions :)

Once logged in to sirius, you can log in to any other machine with the command “ssh -X username@machine” (in my case, ssh -X omuser1@cu003).

Then run whatever you want, as if you were sitting in front of that machine.

Give it a few seconds, and that program will open just like on the machine – in this case, Omega2.

And that’s it! Use the software just as you if you were physically accessing the machine. Some software might be a little slower, especially if there are lots of graphics to send, but it’s worth it to stay in bed that extra hour :)


How to print an A0 map

February 25, 2007

Because the guide on the library blog didn’t work for either myself or Issy, here is a better way to print your A0 map…

Step 1: Prepare the map

Open your Corel file.

Change the paper size to A0, if it isn’t already that size.

Draw a hairline, unfilled box all way round the page outline itself. This ensures that the file will print at the right scale, rather than using the furthest out bit of your map as the border and stretching it to fit A0. You might want to put that box on a layer of it’s own at the bottom of the map and lock it so that you can edit the map if necessary.

(If you’re map is say A1 size, like mine, then put some tick marks or a box around the A1 page before changing the paper size and bordering that, etc, so you know where to cut it)

Step 2: Export to pdf

DON’T USE CUTEPDF. It’s shit and screws up your fills.

Instead, use “File” > “Publish To PDF…” You’ll be asked where to save your file – give it an obvious name, and dump it in your space on the network.

Wait :)

Step 3: Print it

Open the pdf file. Check it looks alright. If it doesn’t, see the common errors bit at the end of this page…

Select “File” > “Print…”

Select the plotter. It’s called “HP8000-something”. It’s the only HP printer in the room, so you’re unlikely to choose the wrong one.

Click the “Properties” box. Click “Advanced” near the bottom right corner, and under paper size select “ISO A0″. Hit OK.

Click on the “Effects” tab. Make sure “Enable Scaling” is ticked, and the paper size is down as A0. Click OK to get out of there

Back in the printer window. “Page scaling” should be set to “None”, and “Auto-rotate and center” should be ticked. This should leave your map filling the entire page as it should in the little preview window to the right.

Offer up a sacrifice to the gods of printing.

Click “print”. Pray.

It will take ages to spool, and then even longer to print. The plotter will display “Parsing PS” for a long while, then print out the map. Feel free to get a coffee or do something else.

Common issues

Lines don’t come out correctly? If any lines have had transparency applies that has been set to “fill only”, they will not print or export. This is crazy I know, but all you need to do is remove the transparency on those particular lines and it should work.


Making and using a LaTeX bibliography

February 25, 2007

LaTeX comes with a package called BibTeX that makes referencing easy. You fill in your references according to a specific format in a .bib file. You then reference them using the command

\cite{REFERENCE}

There is a slightly enhanced version designed with the natural scientist in mind, called Natbib. This provides a standard bibliography like you’re used to seeing in papers (BibTeX always adds a number/keyword at the front, which is just ugly), and offers two types of referencing. I’ll cover using Natbib here.

Step 1: Setting up your LaTeX file

Unlike BibTeX, Natbib isn’t loaded automagically with a file. So in the preamble you need to be call

\usepackage{natbib}

to tell LaTeX to use Natbib instead of BibTex.

Next, you need another (blank for now) file that will hold all your references. This can be called

anything.bib

and needs to be in the same folder as your report.

Finally, you need to choose where you’re going to place your references. Here you want to have the lines:

\bibliography{anything}
\bibliographystyle{abbrvnat}

The first of these says to have the bibliography generated here, and to use the file anything.bib. Obviously replace anything with whatever you called the file, but don’t include the .bib part. The second line tells LaTeX what style of bibliography we’re using – in this case, alphabetical order.

Step 2: Writing the .bib file

The anything.bib file contains all the references you can call in the document (you can always add more though!). These need to be added in a specific format. For a book, use:

@BOOK{BGS:solid,
 AUTHOR="BGS",
 TITLE="Geological map of Keswick, England and Wales sheet 29 solid edition",
 PUBLISHER="British Geological Survey",
 YEAR="1999"}

The first bit (@BOOK) says pretty obviously that it’s a book. The BGS:solid bit is the “key” for this particular book – if I wanted to reference it, I’d use

... as quoted in~\citet{BGS:solid}.

With the result coming back “… as quoted in BGS (1999)”. In the bibliography would now be the line “BGS. Geological map of Keswick, England and Wales sheet 29 solid edition. British Geological Survey, 1999.” What’s the use in that, I hear you ask. Well, you can reference the same book over and over again in different parts. And even in different documents, using the same key. Anyway, more on that later.

For an article, you need to use:

@ARTICLE{G:1977,
  AUTHOR="Green, J G",
  TITLE="Garnet in silicic liquids and itspossible use as a P-T indicator",
  JOURNAL="Contributions to Mineral Petrology",
  YEAR="1977",
  VOLUME="65",
  PAGES="59--67"}

Again, you would cite this using the key (G:1977 in this case), and the result would be something along the lines of “… garnets indicate high pressure crystallisation (Green, 1977)” and in the bibliography “J G Green. Garnet in silicic liquids and its possible use as a P-T indicator. Contributions to Mineral Petrology, 65:59–67, 1977.”

Multiple authors to papers need to be written in the form “name and name and name”, eg

AUTHOR="Soper, N J and Webb, B C and Woodcock, N H",

When cited, this will appear in the more normal form of “N J Soper, B C Webb, and N H Woodcock.”

Step 3: Citing articles (and books)

There are two ways to cite articles (and books, but I can’t be bothered to keep typing that). Whereas the standard BibTeX command

\cite{KEY}

Gives the result [Nick, 2007], Natbib can produce responses in the form Nick (2007) and (Nick, 2007). These are done by using

\citet{KEY)

to get a textual reference like “Nick (2007)”, and

\citep{KEY}

to get a reference in parenthesis like “(Nick, 2007)”.

The same article can be referenced multiple times, but it will appear only the once in the bibliography. To reference two articles at the same time, use

\citet{KEY1,KEY2}

which gives “Nick (2007); Kenny (1991)”. Obviously using \citep would give “(Nick, 2007; Kenny 1991)”. Other options which could be useful are

\citet[chap. 23]{KEY}

which gives “Nick (2007, chap. 23)”,

\citet[see]{KEY}

which gives “see Nick (2007)”, and

\citet[see][chap. 23]{KEY}

which gives “see Nick (2007, chap. 23)”.

\citet[and references therein]{KEY}

gives “Nick (2007, and references therein)”. Citing references with three or more authors will results in references in the style “(Nick et al., 1993)”, but they will be listed in full in the bibliography.

Step Four: Making the bibliography

Finally, you need to compile the LaTeX file to make the bibliography. You need to run “Build current file” (or just press ctrl+F7) three times in TeXnicCenter to work it out – once to run latex and bibtex, then run latex twice again (it’s all a bit silly, but the results are worth it).


Is w00t an allowable phrase?

January 11, 2007

Very script kiddie I know, but a suitable geeky saying having spent a day and a half in the Shell lab trying to make the A0 printer work. But now, it is complete! The masterwork is printed off and all dunky horey!

Anywho, to celebrate, have a lol internet.