def to_si(mas, mas_yr, d):
    """Convert from mas -> km and mas/yr -> km/s
        Input: 
         mas (array) [mas]: distance in mas
         mas_yr (array) [mas/yr]: velocity in mas/yr
         d (float) [pc]: distance to system in parsecs
        Returns:
         km (array) [km]: distance in km
         km_s (array) [km/s]: velocity in km/s
    """
    import numpy as np
    import astropy.units as u
    km = (mas * u.mas.to(u.arcsec) * d * u.AU).to(u.km)
    km_s = (mas_yr * u.mas.to(u.arcsec) * d * u.AU).to(u.km)
    km_s = km_s.value * (u.km / u.yr).to(u.km / u.s)
    return km.value, km_s
