Experimental setup and analysis method for the KDK ground state electron capture measurement of K-40