Let $\mathscr{S}$ denote the space of all Hilbert-Schmidt operators on $L^2(\mathbb R)$. Consider the Hilbert space $L^2(\mathbb R, \mathscr S)$ of square-integrable $\mathscr S$-valued function, that is, for any $T\in L^2(\mathbb R, \mathscr S)$ we have $$\int_\mathbb{R} \|T(\lambda)\|^2_{HS} d\lambda<\infty,$$ where $\|\cdot\|_{HS}$ denotes the Hilbert-Schmidt norm. Next, consider an orthonormal basis $\{e_n\}_{n\ge 0}$ of $L^2(\mathbb R)$. For any $\lambda\in \mathbb R$ define $e^\lambda_n(x)=|\lambda|^{1/2}e_n(\lambda x)$. Note that for each $\lambda$, $\{e^\lambda_n\}_{n\ge 0}$ is an orthonormal basis in $L^2(\mathbb R)$. For each $n\ge 0$ we denote the projection operator on $\text{Span}\{e^\lambda_n\}$ by $P^\lambda_n$. Based on these projections, let us define the following subspaces of $L^2(\mathbb R, \mathscr S)$: $$H_n=\{\lambda\mapsto f(\lambda)P^\lambda_n: f\in L^2(\mathbb R)\}.$$
Question: Is it true that $$L^2(\mathbb R, \mathscr S)=\bigoplus_{n=0}^\infty H_n?$$