semvec/pypi-packages huggingface dataset:
bafpipe 1.0.8
Automated deconvolution and analysis of Bruker mass spectra datasets using UniDec
Requires Python: >=3.6

# BafPipe
Automated deconvolution of mass spectra datasets using [UniDec](https://github.com/michaelmarty/UniDec).

Cite Marty et al. Anal. Chem. 2015. DOI: 10.1021/acs.analchem.5b00140

Automates the UniDec deconvolution algorithms for large Bruker mass spectra datasets and quantifies relative peak intensity. Converts Bruker .baf to numpy arrays using baf2sql and then automates unidec to deconvolute protein mass spectra and quantify species. 

`pip install BafPipe`

The software uses an input excel file containing deconvolution parameters, species identities/masses and data plotting parameters. 

### Setting up the input file

Sheet 1 of input file contains the directory folder of your mass spectra and the unidec configuration parameters. 

You can also add masses to detect and a corresponding colour. These are done by stipulating **Species** + *name* and **Color** + *name* in the Parameter column, followed by the desired mass or colour in the Input column.


**Example input directory**

| Parameter | Input | Comments |
| --- | --- |--- |
|Directory|D:\mass spec\protein labelling|
|Species Protein| 48127|
|Color Protein| orange|
|Start Scan|	490	|
|End Scan|540	|
|Tolerance (Da)	|10	|Peak matching tolerance |
|Config masslb	|15000|	Deconvolution window low mass|
|Config massub	|50000|	Deconvolution window high mass|
|Config massbins|	1|Mass bins for deconvolution - sample mass every|
|Config peakwindow|	10|	|
|Config minmz|	700|	m/z lower bounds (defaults to 0)|
|Config maxmz|		|m/z upper bounds (defaults to 10e12)|
|Config startz|	1	| |
|Config endz|	100	| |
|Config numz|	100	| |
|Config numit|	60	|number of iterations of deconvolution algorithm|

Each file within the directory can be linked to custom variables defined in a second sheet of the input directory. This comes in handy if wanting to filter data or perform analyses/comparison on subsets of your experiment. 

Any column names can be defined aside from 'Name' in column 0. Name corresponds to your filename (can be partial match).

Make sure var_ids=True ```load_input_file(var_ids = True)```  

**Example variables table**

|Name|	var1	|var2|var3|
| --- | --- | --- | --- |
|Nexp 1	|1	|1	|1|
|Nexp 2	|2	|13	|3|
|Nexp 3	|1	|25	|3|
|Nexp 4	|3	|25	|1|
|Nexp 5	|2	|13	|5|

### Running the code
```

from bafpipe.pipe import *

path = r"C:\users\input_file.xlsx

bafpipe = on_bafpipe(path)
 ```
Quantified results will be exported to Excel results table containing MS metadata from .xml (including aquisition time, e.g. for kinetics/real time MS)


#### Other functions:


##### loading input file with var IDs:
from bafpipe.ms_processing import *
eng = BafPipe()
eng.load_input_file(path, unzip=False, clearhdf5=True, var_ids=True)
eng.on_unidec()
```
This will export quantified results to the Excel results table with additional sample metadata.
torchrge256 0.1.1
PyTorch-native implementation of the RGE-256 pseudorandom number generator
Requires Python: >=3.8
Keywords: pytorch, prng, random, rge, arx, machine-learning, deep-learning

# TorchRGE256
A PyTorch-native implementation of the RGE-256 pseudorandom number generator.

Author: Steven Reid  
ORCID: 0009-0003-9132-3410  
Zenodo Preprint: https://zenodo.org/records/17713219  
Repository: https://github.com/RRG314/torchrge256

## Overview
TorchRGE256 is a PyTorch-native implementation of the RGE-256 pseudorandom number generator (PRNG). RGE-256 is a 256-bit ARX (Add-Rotate-XOR) generator whose rotation schedule is derived from geometric entropy constants obtained through Recursive Division Tree (RDT) analysis. The PyTorch version is designed for machine learning workflows, GPU execution, reproducible training, and deterministic data generation.

TorchRGE256 provides:
- A 256-bit internal state (8 x 32-bit words)
- Deterministic and reproducible output
- CPU and CUDA support
- Full state checkpointing
- Domain separation for independent streams
- High-level random sampling utilities (uniform, normal, randint, Bernoulli, permutation, shuffle, dropout masks, and more)

This implementation is written entirely in Python and uses only PyTorch and the Python standard library.

## Scientific Background
The rotation constants in RGE-256 are derived from three geometric entropy values that emerge from Recursive Division Tree (RDT) analysis:
- zeta_1 ≈ 1.585
- zeta_2 ≈ 1.926
- zeta_3 ≈ 1.262

These constants represent stable entropy ratios observed in computational experitments with entropy.

## Key Features
- PyTorch-native PRNG
- Reproducible training
- CUDA support
- Domain separation
- Deterministic ARX core

## Installation
Once published:
pip install torchrge256

## Example
import torch
from torchrge256 import TorchRGE256
rng = TorchRGE256(seed=123)
x = rng.rand((3, 3))

## Citation
@misc{reid2025rge256,
  author = {Reid, Steven},
  title = {RGE-256: A New ARX-Based Pseudorandom Number Generator With Structured Entropy and Empirical Validation},
  year = {2025},
  doi = {10.5281/zenodo.17713219}
}

## License
MIT License