Linc
Linc is a fast way to convert Licel Raw Format into netCDF4. Made for GFAT internal use but writer is highly customizable.
Examples
GFAT legacy writer
By default, the standard way to write a netCDF file is using the GFAT legacy writer. Assuming a directory with several measurement files, the conversion would be as follows.
measurements/
├─ RM2332919.194794
├─ RM2332919.184654
├─ RM2332919.204924
├─ RM2332919.215054
├─ ...
from linc import write_nc_legacy
from linc.config import get_config
meas_path = Path("measurements")
meas_files = list(meas_path.glob("RM*"))
config = get_config("config.toml")
write_nc_legacy(
meas_files,
output_file,
config=config,
)
Using a custom writer
Linc have utilities to read and convert raw files data into Python objects. The simplest way to start is the linc.reader.read_file.
from linc import write_nc_legacy
from linc.config import get_config
meas_path = Path("measurements")
meas_file = list(meas_path.glob("RM*"))[0] # A single file
config = get_config("config.toml")
current_file = read_file(meas_file, config=config)
# Header information
# Such as filename, location
# Laser list, Channel list, etc
print(current_file.header)
# Returns a Pandas dataframe which columns are the channels of the measurement
# and rows are bins.
print(current_file.dataset)
Then, you can create an iterative writer with nectCDF4 utitilities.
Config file
Linc works with a configuration file that expects the following format:
# Lidar-specific parameters. Mandatory
[lidar]
bin_count = 16380
bin_width = 3.75
bins_per_microsecond = 40
# This are custom attributes that will be present in the final neCDF file. Not mandatory
[lidar.attrs]
location = "Granada"
system = "ALHAMBRA"
manufacturers = "Raymetrics"
overlap_is_corrected = "false"
BCK_MIN_ALT = 50000
BCK_MAX_ALT = 60000
Each channel has to be declared an linked to its device identificator this way:
[[lidar.channels]]
name = "signal_532xpa"
link_to = "BT0"
[[lidar.channels]]
name = "signal_532xpp"
link_to = "BC0"
Metadata
Release files for linc 3.0.6
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 |
|---|---|---|---|---|
| linc-3.0.6.tar.gz | 10.7 kB | Without provenance | Details for linc-3.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linc-3.0.6-py3-none-any.whl | Python 3 | none | any | Details for linc-3.0.6-py3-none-any.whl |
Total release size: 25.4 kB
Release files / linc-3.0.6.tar.gz
| Download URL | linc-3.0.6.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14275bb0dce2c2716599fd2461936537e32f7e6241313d48f756f9fd67db4630
|
|
BLAKE2b-256 checksum How to use checksums |
39b5f3ac626e1f452b03244376338d6c2fac792eb350fdacf9dba3f815d38e68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.6
|
Release files / linc-3.0.6-py3-none-any.whl
| Download URL | linc-3.0.6-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bc9b303979a3dc846b21e9b1a2b7404fca7eba629e6c81869b0c42be74a8087
|
|
BLAKE2b-256 checksum How to use checksums |
9226ecdc0a33411601f8eb23936da932fa8d715689e7a74fa417d1e4cc3bd339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.6
|
Security for linc 3.0.6
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.