Consider a finite and flat morphism $f\colon X \rightarrow Y$ of schemes of degree $d$. If $Y$ is locally noetherian, then the sheaf $f_*\mathcal O_X$ is a finite locally free $\mathcal O_Y$-module of rank $d$.
Under which hypotheses is the sheaf $f_*\mathcal O_X$ the sum of $d$ invertible sheaves?
The specific situation I have in mind is a finite morphism of curves $f\colon C \rightarrow E$, where $C$ is a curve of genus $5$ and $E$ is a curve of genus $1$ which is the quotient of $C$ by an automorphism $\sigma$ of order $4$. The ramification indexes are all $\leq 2$, so $f$ is branched over $4$ points on $E$.