I tried locking the SHG using the usual python script. But the PDH error signal plotted by the red pitaya looks very strange and the subsequent lock is not good: I have only ~5mW of green coming out of the SHG (measured at the entrance of the OPO) and the PD in reflection of the OPO confirms this problem (virtually zero 532nm light reaching it when SHG is locked). See below for pictures of the scope when the SHG is scanned, after I execute the shg.lock() command and the plot of the PDH error signal.
On the scope, channel 1 is the SHG PZT driving voltage, channel 2 is the incident IR power on the SHG, channel 3 is the transmission PD of the SHG cavity (transmitted IR), channel 4 is the PD in reflection of the OPO (i.e. measures the generated GR out of the SHG).
The scan looks normal: there is a clear dual resonance between the IR and the GR at the expected crystal temperature, the alignment of the IR into the cavity is good.
The locked scope trace looks bad: the transmitted IR power (channel 3) is twice as low as the peak value when scanned, there is no GR detected (channel 4). Changing the temperature of the SHG does not make the GR peak appear on channel 4.
The PDH error signal looks bad: instead of a linear region around the expected resonance setpoint, we have a strange flat region.
It is not clear to me what's going on on the PDH lock that would explain this kind of error signal.