Action of a certain operator on half-integral weight modular forms - a computation in Kohnen's paper This is regarding a certain computation in page 37 of W. Kohnen's 1982 paper, Newforms of half-integral weight (article here or here, but both require a paid access) - I am unable to follow a step.
Precisely, I cannot follow how equation (2) in the paper is obtained from the previous step. Elaborating, (after skipping/simplifying) the equation in hand is
\begin{align}
g(z) &= \epsilon^k \sum_{n\geq1} \left( \epsilon^{-1/2} i^{-k}e^{-\pi i/4}e^{\pi in/2} + \epsilon^{1/2} i^{k}e^{\pi i/4}e^{-\pi in/2} \right) a(n)e^{2\pi inz} \\
 &= (-1)^{[k+1/2]}\epsilon\sqrt2\left( \sum_{\substack{n\geq1\\ \epsilon(-1)^kn\equiv0,1\pmod4}}a(n)e^{2\pi inz} - \sum_{\substack{n\geq1 \\ \epsilon(-1)^kn\equiv2,3\pmod4}}a(n)e^{2\pi inz}  \right)
\end{align} where $\epsilon^2=1.$
How does the last step follows from the previous one? So far I have reached
\begin{align}
g(z) &= \epsilon^k \sum_{n\geq1} \left( \epsilon^{-1/2} i^{-k}e^{-\pi i/4}e^{\pi in/2} + \epsilon^{1/2} i^{k}e^{\pi i/4}e^{-\pi in/2} \right) a(n)e^{2\pi inz} \\
 &= \frac{\epsilon^k}{\sqrt2} \sum_{n\geq1} \left( \epsilon^{-1/2} i^{-k}(1-i)i^n + \epsilon^{1/2} i^{k}(1+i)(-i)^n \right) a(n)e^{2\pi inz}\\
&= \frac{\epsilon^k}{\sqrt2} \sum_{n\geq1} \left( \epsilon^{-1/2} (-1)^{-k/2}(1-i)(-1)^{n/2} + \epsilon^{1/2} (-1)^{k/2}(1+i)(-1)^n(-1)^{n/2} \right) a(n)e^{2\pi inz}.
\end{align}
How to proceed further?
[Edit : $\epsilon=\pm1$ always, with $(-1)^{1/2}=i$, and $[x]$ denotes integer part of $x$]
Note: The title of the question mentions "operator". Actually, $g(z)=f|\xi+\xi'$ where $f$ is a half-integral weight modular form and $\xi,\xi'$ are operators. I have skipped the details so as to keep only the relevant parts.
 A: I'll assume $\epsilon\in\{1,i\}$.
There's an awful lot of clutter here. Set $b(n)=a(n)e^{2\pi nz}$,
$A=\epsilon^{-1/2}i^{-k}e^{-\pi i/4}$ and
$B=\epsilon^{1/2}i^{k}e^{\pi i/4}$. The sum in question is then
$$S=\epsilon^k\sum_{n}(Ai^n+Bi^{-n})b(n).$$
We really just need to determine
$$C_n=Ai^n+Bi^{-n}.$$
Clearly $C_{n+2}=-C_n$ and $C_{n+4}=C_n$, so only $C_0$ and $C_1$ matter.
$$C_0=\begin{cases}2\cos((2k+1)\pi/4)&\text{if }\epsilon^{1/2}=1\\
2\cos((2k+3)\pi/4)&\text{if }\epsilon^{1/2}=i\end{cases}$$
and
$$C_1=\begin{cases}2\cos((2k-1)\pi/4)&\text{if }\epsilon^{1/2}=1\\
2\cos((2k+1)\pi/4)&\text{if }\epsilon^{1/2}=i\end{cases}$$
In each case $C_0$ and $C_1$ are either of $\pm\sqrt2$. When $k$ is even and
$\epsilon^{1/2}=1$, or when $k$ is odd and $\epsilon^{1/2}=1$, $C_1=C_0$.
Otherwise, $C_1=-C_0$. So $C_1=(-1)^k\epsilon C_0$. Using $C_{n+2}=-C_n$
gives
$$S=\epsilon^kC_0\left(\sum_{(-1)^k\epsilon n\equiv0,1\pmod4}b(n)
-\sum_{(-1)^k\epsilon n\equiv2,3\pmod4}b(n)\right).$$
We only need to identify the factor $\omega_k=\epsilon^kS_0$. This will depend on
$k$ modulo $4$. But $\omega_{k+2}=-\omega_k$, so we only need $\omega_0$
and $\omega_1$. When $\epsilon=1$, $\omega_0=\sqrt2$ and $\omega_1=-\sqrt2$,
and when $\epsilon=-1$, $\omega_0=\omega_1=-\sqrt2$.
To match the second formula, I think the sign in the formula should be $(-1)^{[(k+1)/2]}$
where $[x]$ denotes the integer part of $x$. Is that what you intended to write?
