5 Fixed q-expansion.

Edit: Here's a rather silly method that should work if SAGE is just giving you cusp forms: $\Gamma_0(4)$ has a single normalized cusp form of weight 6, given by $\eta(2\tau)^{12} = q - 12q^3 + 54q^5 - \dots$, so take your basis of cusp forms of weight $k/2 + 6$, and divide each element by this form to get a basis of the space of modular forms of weight $k/2$.

Edit in response to Buzzard: Thanks for pointing out that I should make this argument. Here is a proof that the cusp form has minimal vanishing at all cusps. $\Gamma_0(4)$ is conjugate to $\Gamma(2)$ by $\tau \mapsto 2\tau$, so it suffices to check that $\Delta(\tau)$, the square of $\eta(\tau)^{12}$, vanishes to twice the minimum order at each cusp of $\Gamma(2)$. The quotient $\Gamma(1)/\Gamma(2) \cong S_3$ acts transitively on the cusps of $X(2)$ with stabilizers of order 2, so the quotient map to $X(1)$ has ramification degree 2 at each cusp. $\Delta(\tau)$ is invariant under the weight 12 action of $\Gamma(1)$, and $\Delta(\tau)$ has minimal vanishing at infinity on $X(1)$.

Old answer: If you have a cusp form of weight $k/2$ for $\Gamma_0(4)$ (e.g., given to you by SAGE), you can multiply it by the modular function $\frac{\eta(\tau)^8}{\eta(4\tau)^8} = q^{-1} - 8 + 20q - 62q^3 + 216q^5 - \dots$ to get a modular form of the same weight, that is nonvanishing at one of the three cusps and vanishing at the other two. If you want a form that is nonzero at one of the other cusps, you can multiply by $\frac{\eta(4\tau)^8}{\eta(\tau)^8}$ (has a pole at zero) or by $\frac{\eta(\tau)^{16}\eta(4\tau)^8}{\eta(2\tau)^{24}}$ (pole at $1/2$). [Constant term $-8$ added Sept. 23, in response to an email correction from Michael Somos.]

4 minor cleanup

Edit: Here's a rather silly method that should work if SAGE is just giving you cusp forms: $\Gamma_0(4)$ has a single normalized cusp form of weight 6, given by $\eta(2\tau)^{12} = q - 12q^3 + 54q^5 - \dots$, so take your basis of cusp forms of weight $k/2 + 6$, and divide each element by this form to get a basis of the space of modular forms of weight $k/2$.

Edit in response to Buzzard: Thanks for pointing out that I claim should make this argument. Here is a proof that the cusp form has minimal vanishing at all cusps. $\Gamma_0(4)$ is conjugate to $\Gamma(2)$ by $\tau \mapsto 2\tau$, so it suffices to check that $\Delta(\tau)$, the square of $\eta(\tau)^{12}$, vanishes to twice the minimum order at each cusp of $\Gamma(2)$. The quotient $\Gamma(1)/\Gamma(2)$\Gamma(1)/\Gamma(2) \cong S_3$ acts transitively on the cusps , of$X(2)$with stabilizer stabilizers of order 2, so the quotient map to$X(1)$has ramification degree 2 at each cusp.$\Delta(\tau)$is invariant under the weight 12 action of$\Gamma(1)$, and$\Delta(\tau)$has minimal vanishing at infinity .on$X(1)$. Old answer: If you have a cusp form of weight$k/2$for $\Gamma_0(4)$ (e.g., given to you by SAGE), you can multiply it by the modular function$\frac{\eta(\tau)^8}{\eta(4\tau)^8} = q^{-1} + 20q - 62q^3 + 216q^5 - \dots$to get a modular form of the same weight, that is nonvanishing at one of the three cusps and vanishing at the other two. If you want a form that is nonzero at one of the other cusps, you can multiply by$\frac{\eta(4\tau)^8}{\eta(\tau)^8}$(has a pole at zero) or by$\frac{\eta(\tau)^{16}\eta(4\tau)^8}{\eta(2\tau)^{24}}$(pole at$1/2$). 3 answered question (I hope) Edit: Here's a rather silly method that should work if SAGE is just giving you cusp forms: $\Gamma_0(4)$ has a single normalized cusp form of weight 6, given by $\eta(2\tau)^{12} = q - 12q^3 + 54q^5 - \dots$, so take your basis of cusp forms of weight$k/2 + 6$, and divide each element by this form to get a basis of the space of modular forms of weight$k/2$. Edit in response to Buzzard: I claim the cusp form has minimal vanishing at all cusps. $\Gamma_0(4)$ is conjugate to $\Gamma(2)$ by$\tau \mapsto 2\tau$, so it suffices to check that$\Delta(\tau)$, the square of$\eta(\tau)^{12}$, vanishes to twice the minimum order at each cusp of $\Gamma(2)$. $\Gamma(1)/\Gamma(2)$ acts transitively on the cusps, with stabilizer of order 2,$\Delta(\tau)$is invariant under$\Gamma(1)$, and$\Delta(\tau)$has minimal vanishing at infinity. Old answer: If you have a cusp form of weight$k/2$for $\Gamma_0(4)$ (e.g., given to you by SAGE), you can multiply it by the modular function$\frac{\eta(\tau)^8}{\eta(4\tau)^8} = q^{-1} + 20q - 62q^3 + 216q^5 - \dots$to get a modular form of the same weight, that is nonvanishing at one of the three cusps and vanishing at the other two. If you want a form that is nonzero at one of the other cusps, you can multiply by$\frac{\eta(4\tau)^8}{\eta(\tau)^8}$(has a pole at zero) or by$\frac{\eta(\tau)^{16}\eta(4\tau)^8}{\eta(2\tau)^{24}}$(pole at$1/2\$).