pydalec
Library for the Dynamic Above-water radiance(L) and irradiance(E) Collector (
DALEC) from In-situ Marine Optics.
Usage example
>>> from pydalec import DALEC
>>> IP:str = '192.168.2.11' # Replace with your correct IP
>>> dalec = DALEC.connect_tcp(host= IP)
>>> dalec
DALEC at TCPTransport (192.168.2.11:23)
>>> dalec.start_measurements()
>>> dalec.measurement_log[0]
device_id='DALEC',
serial_number='0011',
channel_type='Ed'
utc_time=datetime.datetime(
2026, 5, 12, 10, 48, 0, 925000, tzinfo=datetime.timezone.utc
),
location=Coordinates(lat=51.2352524, lon=2.931144),
sat_compass_heading=141.43,
solar_azimuth_deg=156.026, solar_zenith_deg=34.893,
gear_position_deg=-76.47,
azimuth_deg=64.96, relative_azimuth_deg=-91.07,
pitch_start_measurement_deg=-3.9, roll_start_measurement_deg=1.8,
telemetry=Telemetry(
voltage_volts=12.5,
humidity_mm_hg=17.5,
temperature_diode_celsius=20.855,
status_flag=0,
),
int_time=22,
signal_percentage=41.8,
dark_counts=864,
max_counts=27871
spectrum=[3724, 4050, 4455, # Rest of spectrum
CLI connection testing
Useful to quickly validate TCP connectivity and get live measurements from the command line.
>>> pip install pydalec # or uv, or ...
>>> # Replace with correct IP, and/or add --port xxx to override port
>>> pydalec-test 192.168.2.11
Connected to DALEC at 192.168.2.11:23
Current location: Location(lat=51.2352524°N, lon=2.931144°E)
Current sun zenith: 34.892 deg
Press Enter to start streaming measurements...
Started measurements. Press Ctrl+C to stop.
device_id='DALEC',
serial_number='0011',
channel_type='Ed'
utc_time=datetime.datetime(
2026, 5, 12, 10, 48, 0, 925000, tzinfo=datetime.timezone.utc
),
location=Coordinates(lat=51.2352524, lon=2.931144),
sat_compass_heading=141.43,
solar_azimuth_deg=156.026, solar_zenith_deg=34.893,
gear_position_deg=-76.47,
azimuth_deg=64.96, relative_azimuth_deg=-91.07,
pitch_start_measurement_deg=-3.9, roll_start_measurement_deg=1.8,
telemetry=Telemetry(
voltage_volts=12.5,
humidity_mm_hg=17.5,
temperature_diode_celsius=20.855,
status_flag=0,
),
int_time=22,
signal_percentage=41.8,
dark_counts=864,
max_counts=27871
spectrum=[3724, 4050, 4455, # Rest of spectrum
This will:
- print a "successful connection" message
- print the current instrument location, if available
- print the current sun zenith, if available
- start measurements and stream them to stdout
- keep running until you stop with
Ctrl+C
Logging
By default, pydalec does not configure the root logger so it can be safely used as a library.
For REPL troubleshooting:
>>> from pydalec import enable_debug_logging
>>> enable_debug_logging()
>>> # then use dalec = Dalec.connect_tcp(...)
For CLI troubleshooting:
>>> pydalec-test --debug 192.168.2.11
Release History
See CHANGELOG.md
Metadata
Release files for pydalec 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydalec-0.1.0.tar.gz | 297.0 kB | Without provenance | Details for pydalec-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydalec-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pydalec-0.1.0-py3-none-any.whl |
Total release size: 338.6 kB
Release files / pydalec-0.1.0.tar.gz
| Download URL | pydalec-0.1.0.tar.gz |
|---|---|
| Size | 297.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec79fc41d3ed7041f31bba45f0309eeb29ac1ee8cb8b15cd197177254b22859a
|
|
BLAKE2b-256 checksum How to use checksums |
ee0bf6b0d3af421e6d14023492b17bd1cedee5ed633ca139f754c0c177c74aed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pydalec-0.1.0-py3-none-any.whl
| Download URL | pydalec-0.1.0-py3-none-any.whl |
|---|---|
| Size | 41.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36719b5d54f2f022e8e993464b856041abad35ea45184558d0796eb93e4eddc1
|
|
BLAKE2b-256 checksum How to use checksums |
a74ad59dc0f7d259c5af631d79f89d9cbb4b2c587649f05ae7d492a20b0fc863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pydalec 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.