Basis for modular forms of half-integral weight Given a character $\chi$ and $k$ odd how can one compute a basis for the space of modular forms $M_\frac{k}{2}(\Gamma_0(4),\chi)$. By compute a basis I mean, finding the beginning of the Fourier expansions. I am looking for computer programs, which can do that for me.
I have heard of the package SAGE, which seems to do the job for integral weight modular forms. There is even the function http://www.sagemath.org/doc/reference/sage/modular/modform/half_integral.html but the examples all have q-expansions starting with q, so I guess this is not really a basis for the space of all modular forms but only cusp forms.
MAGMA does not seem to include this functionality, either.
So, are there any packages which can do this? Since I have not found a package, I have some doubts that there is really an algorithm working in general. If there is no algorithm known to handle this, what methods are available in order to compute a basis "by hand"?
Thanks.
 A: 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.]
A: "MAGMA does not seem to include this functionality, either."

Basis(HalfIntegralWeightForms(DirichletGroup(4).1^2,11/2));

[
    1 - 88*q^3 - 330*q^4 - 4224*q^7 - 7524*q^8 - 30600*q^11 + O(q^12),
q + 4*q^3 + 56*q^4 + 132*q^5 + 224*q^6 + 512*q^7 + 912*q^8 + 1525*q^9 + 
2752*q^10 + 4044*q^11 + O(q^12),

q^2 + 6*q^3 + 20*q^4 + 56*q^5 + 130*q^6 + 256*q^7 + 472*q^8 + 800*q^9 + 
1266*q^10 + 1970*q^11 + O(q^12)

]

Basis(HalfIntegralWeightForms(DirichletGroup(112).1^2,3/2)); 

[
    1 + 2*q^16 + 2*q^28 + O(q^30),
q - q^21 + 2*q^29 + O(q^30),

...
]
http://magma.maths.usyd.edu.au/calc
A: Here is a standard approach: One has the Jacobi $\theta$-function
$\sum_{n = -\infty}^{\infty} e^{2 \pi i n^2 \tau}$, which is weight $1/2$
on $\Gamma_1(4)$.  Thus multiplication by $\theta$ induces an embedding
$M_{k+\frac{1}{2}}(\Gamma_1(4N)) \hookrightarrow M_{k+1}(\Gamma_1(4 N)),$
for any integer $N$.
It is not too hard to determine the image: given an element $f$ in
$M_{k+1}(\Gamma_1(4 N))$, one must determine if $f/\theta$ is holomorphic
in the upper half-plane, and at the cusps.  This is just a question
of $f$ having zeroes at the location of the zeroes of $\theta$.  One can
use this condition to compute the dimension of the image, and with more
effort one should be able to find an actual basis of the image (although
I have never tried to implement this latter step myself, and I don't know
how hard it is in practice).
A: You might also try Eichler and Zagier's book on the theory of Jacobi forms. For example, they show how to compute half-integer weight mf's of weight k+1/2 and level N from Jacobi forms when k is odd. 
