catalog: extract continuum computation code

It isn't used yet.