AvsReturnCode

class lsst.ts.fiberspectrograph.AvsReturnCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

These codes were taken from avaspec.h and should match the code list in section 3.6.1 “Return Value Constants” (page 44) of the “Avantes Linux Library Manual” PDF version 9.6.0.0.

Attributes Summary

ERR_ACCESS

ERR_COMMUNICATION

ERR_DEVICE_NOT_FOUND

ERR_DLL_INITIALISATION

ERR_INVALID_COMBINATION

ERR_INVALID_CONFIGURATION

ERR_INVALID_DEVICE_ID

ERR_INVALID_DLL_VERSION

ERR_INVALID_INT_TIME

ERR_INVALID_MEASPARAM_AVG_RAM

ERR_INVALID_MEASPARAM_AVG_SAT2

ERR_INVALID_MEASPARAM_DYNDARK

ERR_INVALID_MEASPARAM_FWVER_RAM

ERR_INVALID_MEASPARAM_LEVEL_RAM

ERR_INVALID_MEASPARAM_SAT2_RAM

ERR_INVALID_MEASPARAM_SYNC_RAM

ERR_INVALID_MEAS_DATA

ERR_INVALID_PARAMETER

ERR_INVALID_PARAMETER_ADC_GAIN

ERR_INVALID_PARAMETER_ADC_OFFSET

ERR_INVALID_PARAMETER_NR_PIXELS

ERR_INVALID_PASSWORD

ERR_INVALID_PIXEL_RANGE

ERR_INVALID_REPLY

ERR_INVALID_SIZE

ERR_INVALID_STATE

ERR_NOT_SUPPORTED_BY_FPGA_VER

ERR_NOT_SUPPORTED_BY_FW_VER

ERR_NOT_SUPPORTED_BY_SENSOR_TYPE

ERR_NO_MEAS_BUFFER_AVAIL

ERR_NO_MEMORY

ERR_NO_SPECTRA_IN_RAM

ERR_OPERATION_NOT_SUPPORTED

ERR_OPERATION_PENDING

ERR_SL_CALIBRATION_NOT_AVAILABLE

ERR_SL_ENDPIXEL_NOT_IN_RANGE

ERR_SL_MFACTOR_OUT_OF_RANGE

ERR_SL_STARTPIXEL_NOT_IN_RANGE

ERR_SL_STARTPIX_GT_ENDPIX

ERR_TIMEOUT

ERR_UNKNOWN

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

invalidHandle

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

success

Methods Summary

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

Attributes Documentation

ERR_ACCESS = -24
ERR_COMMUNICATION = -16
ERR_DEVICE_NOT_FOUND = -3
ERR_DLL_INITIALISATION = -20
ERR_INVALID_COMBINATION = -12
ERR_INVALID_CONFIGURATION = -13
ERR_INVALID_DEVICE_ID = -4
ERR_INVALID_DLL_VERSION = -18
ERR_INVALID_INT_TIME = -11
ERR_INVALID_MEASPARAM_AVG_RAM = -111
ERR_INVALID_MEASPARAM_AVG_SAT2 = -110
ERR_INVALID_MEASPARAM_DYNDARK = -116
ERR_INVALID_MEASPARAM_FWVER_RAM = -115
ERR_INVALID_MEASPARAM_LEVEL_RAM = -113
ERR_INVALID_MEASPARAM_SAT2_RAM = -114
ERR_INVALID_MEASPARAM_SYNC_RAM = -112
ERR_INVALID_MEAS_DATA = -8
ERR_INVALID_PARAMETER = -1
ERR_INVALID_PARAMETER_ADC_GAIN = -101
ERR_INVALID_PARAMETER_ADC_OFFSET = -102
ERR_INVALID_PARAMETER_NR_PIXELS = -100
ERR_INVALID_PASSWORD = -7
ERR_INVALID_PIXEL_RANGE = -10
ERR_INVALID_REPLY = -22
ERR_INVALID_SIZE = -9
ERR_INVALID_STATE = -21
ERR_NOT_SUPPORTED_BY_FPGA_VER = -122
ERR_NOT_SUPPORTED_BY_FW_VER = -121
ERR_NOT_SUPPORTED_BY_SENSOR_TYPE = -120
ERR_NO_MEAS_BUFFER_AVAIL = -14
ERR_NO_MEMORY = -19
ERR_NO_SPECTRA_IN_RAM = -17
ERR_OPERATION_NOT_SUPPORTED = -2
ERR_OPERATION_PENDING = -5
ERR_SL_CALIBRATION_NOT_AVAILABLE = -140
ERR_SL_ENDPIXEL_NOT_IN_RANGE = -142
ERR_SL_MFACTOR_OUT_OF_RANGE = -144
ERR_SL_STARTPIXEL_NOT_IN_RANGE = -141
ERR_SL_STARTPIX_GT_ENDPIX = -143
ERR_TIMEOUT = -6
ERR_UNKNOWN = -15
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

invalidHandle = 1000
numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

success = 0

Methods Documentation

as_integer_ratio(/)

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count(/)

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length(/)

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()

Returns self, the complex conjugate of any int.

from_bytes(/, bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

to_bytes(/, length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.