Does the following operation on modular forms yield something modular? Let $f(z) = \sum_{n=0}^\infty a_nq^n$ be the fourier expansion of a (quasi-)modular form (with $q = e^{2\pi i z}$). Consider the following related functions:
$$f_{m,k}(z) = \sum_{n=0}^\infty a_{mn + k}q^n$$
$$g_{m,k}(z) = \sum_{n=0}^\infty a_{mn + k}q^{mn+k}$$
for, naturally, $0 \leq k < m$.
My question: are these in any way modular? For some congruence subgroup, etc. etc.?
What if we put some restrictions on $f(z)$? Or shift the powers of $q$ somewhat?
As an example of when we do retain (quasi-)modularity, consider the case $f(z) = E_2(z), m = 2$. Then it is not too hard to show that
$$
E_2(z) = g_{2,1}(z) + 3E_2(2z) - 2E_2(4z)
$$
and so it follows that $g_{2,1}(z)$ is indeed quasi-modular for $\Gamma_0(4)$. Since then $g_{2,0} = E_2(z) - g_{2,1}(z)$, this is also quasi-modular.
So is this in general true?
 A: I know nothing about quasimodular forms, so let me answer the question for modular forms in the classical sense.
First, your $f_{m, k}$. If $k = 0$ this is essentially the image of $f$ under the Hecke operator $U_m$, so it is always going to be modular of some level (and if f has level $\Gamma$, then $f_{m, 0}$ will have level $ \Gamma \cap \Gamma_0(m)$ or something like that). If $k \ne 0$ then $f_{m, k}$ will not be modular, because $f_{m, k}(mz) = q^{-k} g_{m, k}(z)$, $g_{m, k}$ is modular, and dividing by a power of $q$ destroys modularity.
Now $g_{m, k}$. This is just a linear combination of the forms $f(z + j/m)$ for $j = 0, ..., m$ by finite Fourier theory, and all these are modular, so $g_{m, k}$ is modular (although if $g$ is modular of level $\Gamma_1(N)$, then $g_{m, k}$ will have level something like $\Gamma_1(mN) \cap \Gamma_0(m^2 N)$ in general). 
The forms $g_{m, k}$ are closely related to the forms
$$ g_{\chi} = \sum_n \chi(n) a_n q^n $$
for Dirichlet characters $\chi$ modulo $m$, which are very interesting (and well-studied) objects; if $g$ is a Hecke eigenform then so are the forms $g_{\chi}$ (although the $g_{m, k}$ generally aren't).
