update the astropy function