For warnings, ``warnings.warn`` should be used: http://docs.astropy.org/en/v0.2.1/development/codeguide.html#standard-output-warnings-and-errors