renzocom/PCIst ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library for calculating PCIst, the Perturbational Complexity Index based on state transitions, using the method from the paper by Comolatti et al. I want a simple function that takes evoked response data and time points, then returns the PCIst value plus the component wise values for each channel or component.
Please make it easy to use for both TMS EEG and SPES SEEG style data, with sensible default parameter values for each case, like baseline window, response window, k, minimum SNR, max variance, whether to embed, number of steps, and optional average reference handling. Keep the API straightforward so someone can call one function and get the result without needing to understand all the internals.
If you need to check details, look up the current docs or the original method online. Also include a short README example showing how to install it and how to call it with a NumPy like evoked array and times vector.
Are you gonna build this?
make sure you review the code using coderabbit