migrate to astropy