Follow the reluctant adventures in the life of a Welsh astrophysicist sent around the world for some reason, wherein I photograph potatoes and destroy galaxies in the name of science. And don't forget about my website, www.rhysy.net



Tuesday, 26 November 2013

The Princess, Some Goblins, And A Magical Moose

Astronomy may be many things, but dull and predictable it is not. One day you're sorting through endless lines of code trying to find a wrongly-placed minus sign, the next you're detecting hydrogen with the help of an imaginary monkey. Even so, I never expected that I would end up writing a story about a princess and a magical moose in order to explain data visualisation, but that's what happened.

FRELLED, my custom 3D data viewer, cannot be said to be intuitive to learn. It can't be really, because Blender is designed to make art, not love science. So there are plenty of idiosyncrasies and unexpected pitfalls for anyone trying to just load in data who's never used Blender before. And though I try and work around as many of these as possible, avoiding some of them would involve learning C++ and recoding Blender. Which is not what I signed up for.

Neither can I expect everyone else to spend ten years learning Blender, so I put some effort into writing a fairly detailed manual. Alas, the latest AGES thrall complained that the manual was unreadable. She said it needed, "a joke on every page" and "a story about a princess". And that the princess' name should be - by a remarkable coincidence - Olivia. Well, I managed a joke every other page (but you'll have to actually read the manual for that) and decided that a story would be a good format for a quick-start guide. So here it is, complete with princess, goblins, and a magical moose (moose being the name of said student's computer).



The Story Of Princess Olivia And The Magical Moose Whose Name No-One Could Quite Remember 

Once upon a time, the fair Princess Olivia was bored and decided to look in her magic mirror. “Mirror, mirror, on the wall,” said the Princess, “who has the best HI data of them all ?”
“You, O Princess”, said the mirror, “but it would be even better if you looked at it with FRELLED.”
The Princess decided that this was a good idea and would go to the library to learn all about it. It was a long way to walk, but luckily a magical moose appeared from nowhere. That’s what magical mooses do.

“Climb aboard !” said the moose, “I’ll take you to the library in no time at all.” The moose ran to the library at an amazing speed. “Thanks, moose !” said the Princess, “I don’t suppose you know where I could find out about FRELLED ?”
“Why yes,” said the moose, “for I am a magical moose.” The moose and the Princess sat down in front of one of the library’s many computers. “First,” said the moose, “you should look at your data in ds9 or kvis”.*
 * The moose had the magical ability to pronounce italics.

“Why ?” asked Princess Olivia.
“You need to know how bright your sources are,” explained the moose, “then you will be able to tell FRELLED which parts of the data should be dark, and which should be bright.”
The Princess looked at the data and discovered that the lowest value was about 0 Jy and the highest was about 1 Jy. “How very convenient” she declared in a regal manner. “What’s next, moose ?”
“Now you open the ExportFITS script,” said the moose, “and enter those values in the data range boxes.”
“Anything else ?” asked the Princess.
“Yes,” said the moose, “You must choose which projections to export. Let’s try just the XY projection for now, it will be faster. And press the 3D button and the map 1 button. Then press go.”
The Princess did as she was bid and in no time at all, the FITS cube had been rendered into lots of .png images.

“Amazing !” said the Princess.
“Well done,” said the magical moose, “now you can import the images into FRELLED. Load and run the ImportFITS script.”
“Alright,” said the Princess, “but will this take long ? I have to go and fight off an invading horde of goblins this afternoon.”**
 “Oh no, it’s very fast,” the moose reassured her, “Just press the ‘Axes’ button... that’s the one. Now press ‘XY’ and then ‘Import images’ ”.
** Princess Olivia was a warrior princess.

The Princess marvelled to see a wonderful three-dimensional image appear on the screen. “Wow !” she exclaimed, “This is better than Avatar ! But.... oh, if I rotate it too much, it all disappears !”
“Ah, yes,” said the moose, who magically blushed and shuffled his feet in an embarrassed manner, “I’m afraid you must press the ‘Enable script links’ button when looking the data.”
Princess Olivia was not amused. “Why ?” she asked, scornfully, “That’s not intuitive at all !”
“Sorry !” said the luckless moose, “It’s a software limitation.”
“Oh well,” said the Princess, “I suppose this will have to do. But what about all these other buttons ?”
 “There isn’t any time to explain. This is only a quick start guide,” said the moose, magically breaking the fourth wall. But he tipped his head and something white and fluttery fell from his antlers. “Try reading this manual. That should answer all your questions.”

Princess Olivia thought about this and adjusted her tiara in a haughty fashion. She wasn’t sure that Princesses were allowed to read manuals. Perhaps she could find a servant to read it for her. “Oh, alright,” she said. “Goodbye moose !”
The moose magically disappeared. Later on, Princess Olivia decided that fighting the goblins was too much effort. Instead she decided to teach them all about FRELLED. And they all analysed HI data ever after.

THE END. 

No comments:

Post a Comment