Assume that we have a Lagrange functional $L = L(\psi, \partial_t\psi,\partial_x\psi)$ with $\psi:(x,t) \rightarrow \psi(x,t)$.
From the this I want to calculate the Hamiltonian. I was wondering how here the generalized impulses look like? For $L(q,\dot{q})$ it would simply be $p = \frac{\partial L}{\partial \dot{q}}$. How do the generalised impulses look like if I have a field that also depends on the x-coordinate? Do I need two generalised impulses, one for $\partial_x \psi$ and one for $\partial_t \psi$?