We study the behaviour of linear partial differential operators with polynomial coefficients via a Wigner type transform. In particular, we obtain some results of regularity in the Schwartz space $mathcal S$ and in the space ${mathcal S}_omega$ as introduced by Bjorck for weight functions $omega$. Several examples are discussed in this new setting.