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.0.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.0-py3-none-any.whl (6.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nkt_basik-0.4.0.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.0.tar.gz
Algorithm Hash digest
SHA256 a09c00f92b21aabe995ea0113b45d47e9074f80475ef6549d2ce257f0e65ac6a
MD5 98fce93e47d428011a8174ce70c07788
BLAKE2b-256 c7484fb4e49519d6d75862a64b278fad26b3d35425a185396086a01ec8568806

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nkt_basik-0.4.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf990db533186101431355a37eed08cf780e104a772d7a2ef3536b0dd015e07f
MD5 3d2c4ddd7a815924d90a879572f17805
BLAKE2b-256 1aaffbb68b7fd83b1cb14ca3aa3afccef46afcf0f880783e2e9a76fbb7b6d3ac

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