psrdada-python

Python bindings to the PSRDada ringbuffer implementation

https://github.com/trasal/psrdada-python

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.2%) to scientific vocabulary

Keywords

astronomy data nlesc psrdada python ringbuffer
Last synced: 6 months ago · JSON representation ·

Repository

Python bindings to the PSRDada ringbuffer implementation

Basic Info
Statistics
  • Stars: 11
  • Watchers: 4
  • Forks: 8
  • Open Issues: 2
  • Releases: 2
Topics
astronomy data nlesc psrdada python ringbuffer
Created almost 8 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog Contributing License Citation Zenodo

README.md

PSRDada Python

DOI

Python3 bindings to the ringbuffer implementation in PSRDada

It allows you to connect to a ringbuffer, read header info, and read/write ringbuffer pages as numpy arrays. I aim to be interoperable, and bug-for-bug compattible, with PSRDADA. It also supports reading multiple datasets from a ringbuffer for connecting to dada_dbevent.

This is a proof-of-concept implementation, only functions from PSRDADA immediately necessary for my project will be implemented. The code is inspired by the example code in the cython userguide

Error messages, together with a start-up and shutdown message, are written to the syslog. Depending on your OS, you can read those using:

bash $ grep psrdada-python /var/log/syslog $ journalctl --since "10 minutes ago" | grep psrdada-python

Documentation

The documentation is available here See the two scripts in the examples directory, and the tests.

```python

!/usr/bin/env python3

import numpy as np from psrdada import Reader

Create a reader instace and connect to a running ringbuffer with key 'dada'

reader = Reader(0xdada)

loop over the pages

for page in reader: # read the page as numpy array data = np.asarray(page) print(np.sum(data))

reader.disconnect() ```

Installation

clone the repository
git clone git@github.com:TRASAL/psrdada-python.git change into the top-level directory
cd psrdada-python
install the dependencies (in a virtual env) python -m venv env && . env/bin/activate && pip install -f requirements.txt build the package make && make test && make install

Dependencies

PSRDada, see their website:

  • PSRDada dada_db exectuable in the PATH for testing;

  • PSRDada header files needed for compilation, set CPATH or CFLAGS.

  • PSRDada library needed during runtime, set LD_LIBRARY_PATH

License

Copyright (c) 2018, Jisk Attema Apache Software License 2.0.

Contributing

All contributions are welcome! Please use the github issue tracker to get in touch.

Contributing authors so far: * Jisk Attema * Leon Oostrum * Liam Connor * Wael Farah

Owner

  • Name: TRAnsients Software ALliance
  • Login: TRASAL
  • Kind: organization

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    affiliation: "Netherlands eScience Center"
    family-names: Attema
    given-names: Jisk
    orcid: "https://orcid.org/0000-0002-0948-1176"
  -
    affiliation: "ASTRON / UvA"
    family-names: Oostrum
    given-names: Leon
    orcid: "https://orcid.org/0000-0001-8724-8372"
  -
    affiliation: "ASTRON / UvA"
    family-names: Connor
    given-names: Liam
    orcid: "https://orcid.org/0000-0002-7587-6352"
keywords: 
  - PSRDada
  - Python3
  - Astrophysics
  - Pulsars
  - "Fast Radio Bursts FRB"
  - "Data processing"
cff-version: "1.1.0"
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
title: "psrdada-python"
version: "0.1.0"
date-released: 2020-07-14
...

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
Last Year
  • Issues event: 1
  • Watch event: 1