Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e9610e9261 | ||
![]() |
f86b162889 | ||
![]() |
4d9a980471 | ||
4a7cdd16b2 | |||
![]() |
51fc0a393d | ||
![]() |
64cda090f0 | ||
![]() |
c0299e9232 | ||
![]() |
2af14f0272 | ||
![]() |
294a95f121 |
8 changed files with 53 additions and 29 deletions
|
@ -4,16 +4,18 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:22-bookworm
|
||||
|
||||
steps:
|
||||
- name: Update package list
|
||||
run: |
|
||||
sudo apt-get update
|
||||
apt-get update
|
||||
|
||||
- name: Install git
|
||||
run: |
|
||||
sudo apt-get install -y git
|
||||
apt-get install -y git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
@ -31,7 +33,7 @@ jobs:
|
|||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
|
||||
apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
|
||||
|
||||
- name: Install the package
|
||||
run: |
|
|
@ -4,11 +4,10 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
runs-on: docker
|
||||
container:
|
||||
image: archlinux:latest
|
||||
options: --privileged
|
||||
options: '--privileged'
|
||||
|
||||
steps:
|
||||
- name: Install git
|
||||
|
@ -22,7 +21,7 @@ jobs:
|
|||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yes | pacman -S python python-pip hdf5 limesuite python-build automake gcc pkgconf base-devel
|
||||
yes | pacman -S python python-pip hdf5 limesuite python-build automake gcc pkgconf base-devel expat
|
||||
|
||||
- name: Install the package
|
||||
run: |
|
||||
|
@ -40,4 +39,4 @@ jobs:
|
|||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: built-package
|
||||
path: dist/
|
||||
path: dist/
|
|
@ -1,4 +1,4 @@
|
|||
name: Build, Test, and Upload Python Package
|
||||
name: Build, Test, and Upload Python Package (musllinux)
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -16,18 +16,20 @@ jobs:
|
|||
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:22-bookworm
|
||||
|
||||
# needs: [test]
|
||||
|
||||
steps:
|
||||
- name: Update package list
|
||||
run: |
|
||||
sudo apt-get update
|
||||
apt-get update
|
||||
|
||||
- name: Install git
|
||||
run: |
|
||||
sudo apt-get install -y git
|
||||
apt-get install -y git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
|
@ -1,4 +1,4 @@
|
|||
name: Build, Test, and Upload Python Package
|
||||
name: Build, Test, and Upload Python Package (sdist and manylinux)
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -16,18 +16,20 @@ jobs:
|
|||
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:22-bookworm
|
||||
|
||||
# needs: [test]
|
||||
|
||||
steps:
|
||||
- name: Update package list
|
||||
run: |
|
||||
sudo apt-get update
|
||||
apt-get update
|
||||
|
||||
- name: Install git
|
||||
run: |
|
||||
sudo apt-get install -y git
|
||||
apt-get install -y git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
19
README.md
19
README.md
|
@ -1,6 +1,6 @@
|
|||
# Python Bindings for LimeDriver
|
||||
|
||||
This is a Python package for the [LimeDriver](https://github.com/nqrduck/LimeDriver/) library.
|
||||
This is a Python package for the [LimeDriver](https://git.private.coffee/nqrduck/LimeDriver/) library.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -27,6 +27,21 @@ python3 -m venv venv
|
|||
source venv/bin/activate
|
||||
```
|
||||
|
||||
You can install the Python bindings using pip:
|
||||
|
||||
```bash
|
||||
pip install limedriver
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Alternatively you can clone the repository and install the Python bindings from source:
|
||||
|
||||
```bash
|
||||
git clone <this-repo-url>
|
||||
cd LimeDriverBindings
|
||||
```
|
||||
|
||||
Ensure that the LimeDriver submodule is initialized:
|
||||
|
||||
```bash
|
||||
|
@ -51,7 +66,7 @@ import limedriver
|
|||
Npulses = 1000
|
||||
|
||||
# Create a new PyLimeConfig object
|
||||
config = limedriver.PyLimeConfig(Npulses)
|
||||
config = limedriver.binding.PyLimeConfig(Npulses)
|
||||
|
||||
# Modify the config as needed
|
||||
config.srate = 1e6
|
||||
|
|
|
@ -11,6 +11,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
]
|
||||
dependencies = [
|
||||
"h5py",
|
||||
|
@ -38,16 +39,13 @@ extend-select = [
|
|||
"D", # pydocstyle
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["F401"]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://nqrduck.cool"
|
||||
"Bug Tracker" = "https://github.com/nqrduck/limedriverbindings/issues"
|
||||
"Source Code" = "https://github.com/nqrduck/limedriverbindings"
|
||||
"Bug Tracker" = "https://git.private.coffee/nqrduck/limedriverbindings/issues"
|
||||
"Source Code" = "https://git.private.coffee/nqrduck/limedriverbindings"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/limedriver"]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import limedriver.binding as binding
|
||||
import limedriver.hdf_reader as hdf_reader
|
||||
import limedriver.hdf_reader as hdf_reader
|
||||
|
|
|
@ -40,7 +40,7 @@ class HDF():
|
|||
# initialize data array
|
||||
dsize = f[HDFkey].shape
|
||||
inddim = dsize[0]
|
||||
self.tdy = np.zeros((int(dsize[1]/2), int(dsize[0] * len(HDFkeys))),dtype=np.complex_)
|
||||
self.tdy = np.zeros((int(dsize[1]/2), int(dsize[0] * len(HDFkeys))),dtype=np.complex128)
|
||||
|
||||
# initialize the output objects
|
||||
self.attrs = [dynclass() for jj in range(len(HDFkeys))]
|
||||
|
@ -66,9 +66,15 @@ class HDF():
|
|||
# Get the data
|
||||
data_raw = np.array(f[HDFkey])
|
||||
try:
|
||||
self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float_(data_raw[:,::2])) + 1j*np.transpose(np.float_(data_raw[:,1::2]))
|
||||
except:
|
||||
pass
|
||||
self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float64(data_raw[:,::2])) + 1j*np.transpose(np.float64(data_raw[:,1::2]))
|
||||
except Exception as e:
|
||||
print('Problem reading the data of the HDF file! Error: ' + str(e))
|
||||
self.tdy = []
|
||||
self.tdx = []
|
||||
self.attrs = []
|
||||
self.parsoutp = {}
|
||||
self.parvar = {}
|
||||
return
|
||||
|
||||
|
||||
# Get the arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue