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.modulation_amplitude = 10.0
device.modulation_offset = -5.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.2.tar.gz (6.2 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.2-py3-none-win_amd64.whl (6.1 MB view details)

Uploaded Python 3Windows x86-64

File details

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

File metadata

  • Download URL: nkt_basik-0.4.2.tar.gz
  • Upload date:
  • Size: 6.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nkt_basik-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6ef1d553e19c44a0b9cb75bcb4db27fa54dd223160eadd444c7a67e183ac6a8e
MD5 f447b116f6d55dfefc18ed0d54e048d0
BLAKE2b-256 e758b4231a4e729b8e6f56f514ccea2916163fd3e5ebbda3afaa99a01e5ea865

See more details on using hashes here.

Provenance

The following attestation bundles were made for nkt_basik-0.4.2.tar.gz:

Publisher: publish.yml on ograsdijk/NKT-Basik

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nkt_basik-0.4.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: nkt_basik-0.4.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nkt_basik-0.4.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8afdc63857399a3170044f4e832b28954d8c424e92b4eb665bc832d0877979ec
MD5 f250046327c521c978f7e45a3910da38
BLAKE2b-256 c608400129f8148f71354ac196b2f6cfd6b96a2e38c847d7b4ecd4def3ef4429

See more details on using hashes here.

Provenance

The following attestation bundles were made for nkt_basik-0.4.2-py3-none-win_amd64.whl:

Publisher: publish.yml on ograsdijk/NKT-Basik

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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