Skip to content

Feasa LED Analyzers

Feasa LED Analyzers are used to measure the optical characteristics of LEDs. This module contains a class for controlling the Feasa LED Analyzers.

Feasa LED Analyzer

Reference Documents

Product Website

Datasheet

User Manual

Fixturing Guidelines

Quick Start Guide

Module Documentation

Feasa LED Analyzer Python Interface.

Feasa

Bases: object

Feasa LED Analyzer.

Source code in f3ts_hardware_utils/feasa.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Feasa(object):
    """Feasa LED Analyzer."""

    def __init__(self, port):
        """Initialize connection to the Feasa LED Analyzer."""
        self.ser = serial.Serial(baudrate=57600, port=port)

    def capture(self, intensity_range=""):
        """Capture the RGBI values for the given channel."""
        self.ser.write(f"capture{intensity_range}\r\n".encode("utf-8"))
        response = self.ser.readline().decode("utf-8")
        assert "OK" in response

    def capture_pwm(self, intensity_range="", averaging_factor=""):
        """Capture the RGBI values for the given channel."""
        self.ser.write(f"capture{intensity_range}pwm{averaging_factor}\r\n")
        response = self.ser.readline().decode("utf-8")
        assert "OK" in response

    def get_rgbi(self, channel):
        """Return the RGBI values for the given channel."""
        self.ser.write(f"getrgbi{channel:02}\r\n".encode("utf-8"))
        response = self.ser.readline().decode("utf-8").split(" ")
        return {
            "r": int(response[0]),
            "g": int(response[1]),
            "b": int(response[2]),
            "i": int(response[3]),
        }

    def close(self):
        """Close connection to the Feasa LED Analyzer."""
        self.ser.close()

__init__(port)

Initialize connection to the Feasa LED Analyzer.

Source code in f3ts_hardware_utils/feasa.py
 8
 9
10
def __init__(self, port):
    """Initialize connection to the Feasa LED Analyzer."""
    self.ser = serial.Serial(baudrate=57600, port=port)

capture(intensity_range='')

Capture the RGBI values for the given channel.

Source code in f3ts_hardware_utils/feasa.py
12
13
14
15
16
def capture(self, intensity_range=""):
    """Capture the RGBI values for the given channel."""
    self.ser.write(f"capture{intensity_range}\r\n".encode("utf-8"))
    response = self.ser.readline().decode("utf-8")
    assert "OK" in response

capture_pwm(intensity_range='', averaging_factor='')

Capture the RGBI values for the given channel.

Source code in f3ts_hardware_utils/feasa.py
18
19
20
21
22
def capture_pwm(self, intensity_range="", averaging_factor=""):
    """Capture the RGBI values for the given channel."""
    self.ser.write(f"capture{intensity_range}pwm{averaging_factor}\r\n")
    response = self.ser.readline().decode("utf-8")
    assert "OK" in response

close()

Close connection to the Feasa LED Analyzer.

Source code in f3ts_hardware_utils/feasa.py
35
36
37
def close(self):
    """Close connection to the Feasa LED Analyzer."""
    self.ser.close()

get_rgbi(channel)

Return the RGBI values for the given channel.

Source code in f3ts_hardware_utils/feasa.py
24
25
26
27
28
29
30
31
32
33
def get_rgbi(self, channel):
    """Return the RGBI values for the given channel."""
    self.ser.write(f"getrgbi{channel:02}\r\n".encode("utf-8"))
    response = self.ser.readline().decode("utf-8").split(" ")
    return {
        "r": int(response[0]),
        "g": int(response[1]),
        "b": int(response[2]),
        "i": int(response[3]),
    }