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_level = 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.5.0.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.5.0-py3-none-win_amd64.whl (6.1 MB view details)

Uploaded Python 3Windows x86-64

File details

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

File metadata

  • Download URL: nkt_basik-0.5.0.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.5.0.tar.gz
Algorithm Hash digest
SHA256 c1d5c58098b080524237010ccb1359dcba0330c6b81f0bbe6f1cb045199e8c2f
MD5 c748d5b973e14d961673904e27c03860
BLAKE2b-256 6b928551e3a0d90ff360850149d0a430b9f35af24af76aec0169cf37d968c346

See more details on using hashes here.

Provenance

The following attestation bundles were made for nkt_basik-0.5.0.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.5.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: nkt_basik-0.5.0-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.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2ef124b87dac831a57a7ca90333b66a45047c8d711ffb5b5282bbd4c3db4fe80
MD5 dfb269042cb4b3f463a677e6d0626399
BLAKE2b-256 b4c84537af4d88294b458fd810da6046bc8d629a4ba144ecc8cdf5f054634d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for nkt_basik-0.5.0-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