Skip to main content

Python interface for the NKT Photonics Basik fiber seed laser

Project description

NKT-basik

Python interface for NKT Photonics Basik fiber seed lasers.

Install

pip install nkt_basik

API design

The package now exposes one high-level API layer:

  • Basik
  • LaserMode
  • ModulationRange
  • ModulationSource
  • ModulationCoupling
  • ModulationWaveform
  • DeviceRef
  • find_devices() / find_device() / find_devices_by_names()

Mode and modulation setters require enum inputs.

Quickstart

from nkt_basik import (
	Basik,
	LaserMode,
	ModulationCoupling,
	ModulationRange,
	ModulationSource,
	ModulationWaveform,
)

device = Basik("COM4", 1)

print(f"Name: {device.name}")
print(f"Wavelength: {device.wavelength:.4f} nm")
print(f"Frequency: {device.frequency:.4f} GHz")

device.mode = LaserMode.POWER
device.emission = True

device.modulation = True
device.modulation_source = ModulationSource.BOTH
device.modulation_range = ModulationRange.NARROW
device.modulation_coupling = ModulationCoupling.DC
device.modulation_waveform = ModulationWaveform.SINE
device.modulation_frequency = 100.0

device.frequency_setpoint = 275.1000

print(device.status)
print(device.error)

device.close()

Context manager usage is optional:

with Basik("COM4", 1) as device:
	print(device.name)

Discovery

from nkt_basik import find_device, find_devices, find_devices_by_names

all_devices = find_devices()
named = find_device("seed-a")
grouped = find_devices_by_names(["seed-a", "seed-b"])

find_devices() always returns a list (possibly empty).

Errors

  • Connection failures raise nkt_basik.module.BasikConnectionError.
  • Bad API value types raise nkt_basik.module.BasikTypeError.
  • Register communication errors raise NKTRegisterException.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nkt_basik-0.4.1.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nkt_basik-0.4.1-py3-none-any.whl (6.1 MB view details)

Uploaded Python 3

File details

Details for the file nkt_basik-0.4.1.tar.gz.

File metadata

  • Download URL: nkt_basik-0.4.1.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nkt_basik-0.4.1.tar.gz
Algorithm Hash digest
SHA256 663a83760904890dc6370629e16360053948bab070b1129294d0be5f52810592
MD5 e9fc36c6815fc9ab9f792008836e71bf
BLAKE2b-256 2e57af9e082fc40edea7bbf44de77ec697c5b4a3b6430ed93a2203fb4649c7f7

See more details on using hashes here.

File details

Details for the file nkt_basik-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: nkt_basik-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nkt_basik-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce92a3688c27ec425bb375367ac2bd9e2ba709d17f68f9524fae6e4ac5b6c45
MD5 cbd7e1bd5cfc05203ebca479485a2e89
BLAKE2b-256 9de0b1ace4fe3ccf5d6d88294dc2bb446e53488b368263b5c5a5eedc217f2889

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page