General Functions for Astronomy