Suppose I have a motive $M$ over $\mathbb{Q}$, and can compute the Euler factor of the associated $L$-function for any good prime $p$. How can I compute the Zariski closure of the image of the Galois group? In particular I am interested in the case where $M$ is a hypergeometric motive as implemented in Magma.