Closed DanHickstein closed 8 years ago
I incorporated the g12 calculation into SSFM.py as SSFM.SSFM.calculate_coherence
. It's ~15 lines of code, so I didn't think that it was worth creating a new file for it as we were originally thinking.
I also included an example of the coherence calculation in pynlo/examples/SSFM_coherence.py
. The example could use some cleaning up.
@ycasg, let me know what you think about the general approach for including the coherence calculation and I can work to clean it up a bit.
This looks good. There are a few changes I'll make, but style-based. I think that the algorithm is good.
This is a work in progress, so don't merge yet. The new examples will be changed/removed as I migrate the code into the main PyNLO codebase.
So far, I have implemented the noise calculation into PulseBase.py. I will also migrate the other aspects of the calculation, such as generating multiple pulse and calculating g_12 into the main PyNLO code.