Loris
With loris you can read and write different file formats from neuromorphic cameras such as .aedat4, .dat, .es or .csv. Loris is also an amazing animal
Supported formats
| version | read | write | |
|---|---|---|---|
| .aedat4 | 4 | ☑ | ☐ |
| .dat | 1/2 | ☑ | ☐ |
| .es | 2.x | ☑ | ☑ |
| .csv | - | ☑ | ☐ |
Install
pip install loris
How to loris
Read a file, for example a .dat file and loop over all events
import loris
my_file = loris.read_file("/path/to/my-file.dat")
events = my_file['events']
for event in events:
print("ts:", event.t, "x:", event.x, "y:", event.y, "p:", event.p)
Write events from an array to an .es file
ordering = "xytp" # corresponds to the order in your array
loris.write_events_to_file(event_array, "/path/to/my-file.es", ordering)
Write structured events (with dtypes) to an .es file
loris.write_events_to_file(structured_event_array, "/path/to/my-file.es")
Windows test (for developers)
To make sure the library works on Windows (if you use macOS or Linux), follow these steps:
- Download Vagrant (https://www.vagrantup.com/)
cd windowsvagrant up(this will download a virtual machine and build the package)vargrant ssh(optional, to inspect the Windows VM)vagrant destroy -f(cleanup)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
loris-0.5.3.tar.gz
(8.9 MB
view details)
File details
Details for the file loris-0.5.3.tar.gz.
File metadata
- Download URL: loris-0.5.3.tar.gz
- Upload date:
- Size: 8.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.8.0 tqdm/4.33.0 CPython/3.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c77d110182e6bb78a7eeffc0d7dfbc3d56883bb26717cb05ac46cabc3091669
|
|
| MD5 |
41f5e9756ca94fd966b8703d21cadf2b
|
|
| BLAKE2b-256 |
77b19161807338c220a11a9780c1c0c6afd021061dc263f86f7417971342d17d
|