def calc_dzetatildes(thetas, k, cangles, alphas, jmfs):
    """
    calculate derivative zetatilde functions for all drums resct to drum k
    thetas is numpy array of size 8 of rotation angles
    k is which of drums angle is taken respect to (1-indexed)
    cangles is numpy array of size 8 of coating angles
    alphas is numpy array of shape (8,9) of model coefficients
    jmfs is list of functions for inward current
    return is 8 element array
    """
    alpha_slice = alphas["alpha" + str(k)].values
    dgamma = -jmfs[k-1](thetas[k-1] + cangles[k-1]/2) + jmfs[k-1](thetas[k-1] - cangles[k-1]/2)
    return alpha_slice*dgamma