Enkaptic


Anthony Smith's software site

When we write code, we shape the world

Fascinating talk by Avdi Grimm at last month’s LoneStarRuby on The Soul of Software. He contrasts two perspectives on software: Formalism. This is ...

bundle open gem source

I didn’t realise you could do this, from a Ruby or Rails project using bundler/Gemfile: bundle open activerecord Then it opens the source code for tha...

Depot application with RSpec

An excellent introduction to Ruby on Rails is Agile Web Development with Rails 4 by Sam Ruby. Around half of the book is devoted to building the “depot”...

Rails architecture

Three thought-provoking talks about the architecture of a Rails application First, Bob Martin (2011) argues that Rails ought to be an irrelevant detail...

Too much Rails code? Put it in a gem!

If you extract some of your Rails code into a gem, and test the gem separately, this will guarantee that the gem cannot depend on the rest of your appli...


This blog has moved: NEW FEED LOCATION

I’ve moved this blog over to Jekyll, and over to my new(ish) domain, www.enkaptic.co.uk. Old links should keep redirecting… but not for very long! In p...

WordPress to Jekyll

Change of plan: I'm moving this site not from WordPress to Rails, but from WordPress to Jekyll. It was kind of fun developing a blog from scratch in Rai...

WordPress to Rails (5) static pages

WordPress lumps posts and static pages together in one database table, but they need to be handled quite differently. At least for the time being, I’m ...

WordPress to Rails (4) uploads

WordPress allows you to upload files (such as images) and include them in posts. These end up in a location such as .../wp-content/uploads/2012/06/githu...

WordPress to Rails (3) Bootstrap

Rails is more about making web applications that actually do things than it is about making web sites that just look nice. But sooner or later, some att...

WordPress to Rails (2) permalinks

Various changes since last time, such as adding user login authentication, with the following in the User model, which seems to mimic the WordPress auth...


pIDLy update

It's been a while since I posted anything here. And today won't mark a significant change in that pattern, I'm afraid. But my python-IDL interface, pIDL...

Authors list script

One of my most important roles within HerMES has been to generate the LaTeX for the lists of authors and affiliations in the astronomy journal papers (p...

pIDLy on GitHub

I thought I'd better figure out what Git and GitHub are. Git is a revision control system, enabling you to keep track of changes to computer software (...

Aspect-oriented programming

That's right, not object-oriented, but aspect-oriented. What's that all about then? Computers store data, and computer programs do stuff to the data. Yo...

Update

Regular visitors to this, my boring technical blog, may be forgiven for thinking that nothing is going on. This is my fourth post here in two years, so ...

On Gaussian approximations

You have a function that you want to approximate as an N-dimensional (multivariate) Gaussian (normal) distribution. What do you do? If you are me, you s...

HerMES point source catalogues

Well, it's finally here: HerMES: point source catalogues from deep Herschel-SPIRE observations, by yours truly and lots of other people otherwise known ...


MNRAS line wrapping in authors lists

In case anyone else using the MNRAS LaTeX class has been tearing their hair out inserting line breaks manually into long author (and institution) lists,...

Bayesian number counts

Here's a simple bit of statistics for a Friday lunchtime. You count the number of galaxies in a certain area on the sky (with the galaxies satisfying so...

Herschel for everyone

I've just learned that the Herschel Science Archive has been opened up to the world, so any old Tom, Dick or Harry can download the data and start writi...

Astropython

You (both of you) might well be interested in the new Astropython site, which looks excellent. Here’s the site’s own description: Research in astron...

Astroinformatics

Data volumes from multiple sky surveys have grown from gigabytes into terabytes during the past decade, and will grow from terabytes into tens (or hundr...

Pixelating a 2-D Gaussian with Python

They're coming thick and fast now. Here's a Python function to accompany the previous post. It's not maximally efficient, but should make sense... from ...

On the normalization of PRFs

Yesterday I said that the PRF for a map in Jy/beam (or similar) should be normalized so that that peak is 1. But this is true only for an idealised (not...

Estimating the flux of a point source

You have a map and you know what a point source looks like. How do you filter the map so that the value of each pixel is now the most likely flux of a p...

Visualizing noisy images

You have an image. Each pixel has a value with some uncertainty. How do you visualize the uncertainty in each pixel? Like this: Here's the Python code ...

Python, FITS and DS9

Here's an easy way to display FITS images (or any array) in DS9 using Python (with PyFITS, NumPy and Numdisplay, which is part of stsci_python). First l...

PSFs in IDL

Two methods of approximating a point-spread function in IDL: 1. StarFinder seems to do a great job at finding point sources in crowded fields. It includ...

The eclipse of IDL 7

I've finally made the transition from IDL 6.4 to IDL 7. Here are my handy hints... IDL Workbench rocks! (This is because it is basically Eclipse, which...

The science of galaxy formation...

...is the title of a provocative article by Gerry Gilmore(*) on today's astro-ph. There's a bit about the scientific method, such as: The appropriate sc...


UKIDSS paper submitted

Well, the deed has been done, and the paper has finally been submitted to MNRAS and to astro-ph. You can read it if you really want to: Luminosity and s...


Evolution of Schechter function ... so?

This is some work in progress: K-band luminosity function from the UKIDSS Large Area Survey (LAS, black dots), showing the number of galaxies per unit ...

A galaxy being emitted by a star

Why is the universe so crowded? This kind of thing is really messing up my data! Makes me want to work with simulations...

pIDLy: IDL within Python

Now Python and IDL can talk to each other (okay, Python talks to IDL and IDL does what it's told), using pIDLy (pronounce as you please). I experimented...

IDL code miscellany

IDLdoc 3.0 (more info here) gives my badly-written bits of IDL the deceptive appearance of being well designed, useful and user-friendly. So I've made a...

UKIDSS at ESO

Just back from my first visit to Garching (near Munich). ESO, to be more specific. The reason for the visit: a three-day workshop on Science from UKIDSS...

Filtering astro-ph with CosmoCoffee

One of the things mentioned in Sarah Bridle's talk at YAM last week was a filter for arXiv.org provided by CosmoCoffee. I decided to sample it this week...

UKIDSS poster

Last Friday was the RAS Young Astronomers Meeting up in Edinburgh. I presented a poster, ‘A census of K-band galaxies from the UKIDSS Large Area Survey,’ which I’ve just put online on my (very short!) publications page.

Nothing worth reading

This is the first entry in the new Research Blog, reserved for posts of a tedious, technical or boring nature related to my research in astronomy. See w...