Leakage Current from Iseg

From HELIOS Digital DAQ
Revision as of 02:37, May 5, 2021 by Ttang (talk | contribs) (→‎Program idea)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

The iseg HV is controlled by the windowsXP machine with a software provided from Iseg.

It may be impossible to get the HV reading directly (may be search for the memory?)

Another way around is using OCR (optical Character Recognition) program to extract the leakage current.

Require programs

in Mac, using brew can install the Tesseract, and using python3 pip for Pillow

Program idea

The program is called OCR.py, only work in python3

  1. remote desktop to the windowsXP, make it fullscreen (can be not fullscreen, but the code need modification)
  2. capture the screenshot of the remote desktop
  3. crop the Iseg control window
  4. find the position of the "C" in "Channel" using the OCR engine, use the coordinate of the "C" as an anchor.
  5. crop the leakage current for each channel
  6. save the leakage current into influxDB format
  7. push to the database

The whole process takes about 3.5 sec to finish.

Caution

  • the program only work in Mac
  • The Iseg windows must be at the upper left corner of the windowsXP
  • for the Mac to capture the screenshot, the window ID is needed. There is no easy way to find the window ID in Mac.
  • the OCR may fail to recognize the number, or missed the "dot" for decimal place, in that case, the data will be discarded.
  • the iseg only show 1 HV module at a time, so, cannot capture all recoil and array at the same time.

find the window ID in Mac

we have to use the Quartz Debug in the Additional tools for Xcode. I already downloaded it and put it in the Applications.

Once open the Quartz debug, on the manual bar -> Window -> Windows List

the window list will open, find the "Microsoft Emote Desktop". There should be two, convert the hex to dec, one of them is correct.