<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rot(self, t=0., transposed=False):
 """2D Rotation matrix for non-zero pa or pattern speed to goto the aligned coordinates """

        rotmat = np.array(
            [[np.cos(self._pa+self._omegab*t),np.sin(self._pa+self._omegab*t)],
             [-np.sin(self._pa+self._omegab*t),np.cos(self._pa+self._omegab*t)]])
        if transposed:
            return rotmat.T
        else:
            return rotmat