A computer program product, comprising a computer usable medium having a non-transitory computer readable program code adapted to be executed to implement a method comprising:
- in a system comprising:
- a laser;
- a periodic poled lithium niobate (PPLN) crystal configured to receive laser input from the laser;
- a temperature control device configured to adjust the temperature of the PPLN crystal;
- a temperature sensor configured to monitor the temperature of the PPLN crystal:
- while the PPLN crystal is receiving laser input from the laser, changing, using the temperature control device, a temperature of the PPLN crystal;
- monitoring the temperature of the PPLN crystal and corresponding power of the temperature control device during the changing, the temperature of the PPLN crystal monitored using the temperature sensor;
- and,
- determining one or more of operating conditions of the temperature control device and an operating temperature of the PPLN crystal from a slope of a function of the power vs. the temperature, the function comprising a slope corrected function of the power vs. the temperature, a constant trend for heating the PPLN crystal one or more of separated and subtracted from the power vs. the temperature.