initial code for theta derivatives and elliptic function derivatives (NEEDS DOC/TESTS/CLEANUP)