Read spectra
The examples below show how to read out different types of spectra from the Monipa 1 and give more information on how they are acquired. We recommend using the regions from 834 cm⁻¹ to 3000 cm⁻¹ for most applications. Outside of this range, the signal-to-noise ratio can be too low for reliable analysis.
Note
As of version 4.5.1 there are no methods to read the wavenumbers or interferograms via OPC UA.
Read the processed absorbance spectrum via OPC UA
import asyncio
from asyncua import Client
url = "opc.tcp://localhost:4840/freeopcua/server/"
async def main():
async with Client(url) as client:
mode = "standard_v2"
n_scans = 10
response = await client.nodes.objects.call_method(
"2:Monipa/2:Spectrometer/2:Spectra/2:GetSpectraProcessedMode",
mode,
n_scans,
)
print(f"Absorbance: {response}")
asyncio.run(main())
When requesting an absorbance spectrum, you can change number of scans to average via the parameter n_scans. You can also request different processing modes.
standard_v2: Processing with drift stabilization.evaluation: Fast processing.
Read out the current raw energy spectra
import asyncio
from asyncua import Client
url = "opc.tcp://localhost:4840/freeopcua/server/"
async def main():
async with Client(url) as client:
response = await client.nodes.objects.call_method(
"2:Monipa/2:Spectrometer/2:Spectra/2:GetSpectraAveragedMode",
"standard_v2",
5,
)
p, s = response
print("Polarization spectra:")
print(f"P energies: {p}")
print(f"S energies: {s}")
asyncio.run(main())