An introduction to radiative transfer :methods and applications in astrophysics