@alexander-rennie , generally the income is earned where the work is performed ( absent any agreements to the contrary ). Thus because you performed the work in CA, the income is CA sourced for tax purposes. You have to pay Federal and CA taxes on the income. Not to NY. But please look at your contract -- that may dictate complications .
Is there more I can do for you ?
pk