For generations, members of the Yamaji family had been assigned to the post of tenmonkata, or the officer in charge of astronomy, by bakufu (Japanese feudal government headed by a shogun).
山路家は幕府の天文方を代々歴任した。