Metadata-Version: 2.1
Name: chronos-inst
Version: 1.5.0
Summary: Python wrapper API for Chronos Instrument
Author-email: "Chronos Inc." <support@chronosci.com>
License: MIT
Project-URL: Homepage, https://www.chronosci.com
Project-URL: Documentation, https://www.chronosci.com
Keywords: chronos,instrument,tdc,cinstapi
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: MIT
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/plain
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: scipy>=1.7.0

==================================================
ChronosInst Python API (for Python 3.7 or newer)
Version 1.1.0
==================================================

This package provides the native Python interface to the Chronos Instrument (For example: Time-to-Digital Converter - TDC) 
via the cinstAPI C library.

✅ Features:
- Interface with native DLLs to control devices directly
- Get connected devices and connect/disconnect device
- Config device parameters
- Acq raw data from device
- Advanced data analysis (TOF, TOT, Period, etc.)
- Clean resource management

--------------------------------------------------
📁 Package Contents
--------------------------------------------------

chronos_inst/ — Core Python Package (Installed via pip)
  ├── __init__.py                         — Auto-configures environment variables   
  ├── cinstapi.py                         — Core SDK class definition
  ├── data_analysis.py                    — Data processing utilities
  ├── multi_data_analysis.py              — Multi-devices data processing utilities
  ├── gaussian_fit.py                     — Gaussian fitting algorithms
Examples:                                    — Usage scripts(Copy these to your project folder)
  ├── tdc_basic_example.py                — Basic functionality demo
  ├── tdc_ces_analysis_example.py         — CES analysis demo
  ├── tdc_es_analysis_example.py          — ES analysis demo
  ├── tdc_networking_example.py           — Multi-device series connection test demo in single process
  ├── tdc_networking_example2.py          — Multi-device series connection test demo in multi-process
  ├── tdc_period_analysis_example.py      — Period analysis demo
  ├── tdc_startstop_analysis_example.py   — Start-stop analysis demo
  ├── tdc_tof_analysis_example.py         — TOF analysis demo
  └── tdc_tot_analysis_example.py         — TOT analysis demo

--------------------------------------------------
⚙️ Installation
--------------------------------------------------

1. Ensure Python 3.7+ is installed on your system.

2. Install the package via pip:
Open terminal/command prompt and run:
   - pip install ./chronos_inst-1.1.0-py3-none-win_amd64.whl    # Install from local whl file
   - pip install chronos-inst                                   # Install from remote repository
Note: All dependencies (numpy, scipy) and native binary files (cinstapi.dll / libcinstapi.so) are automatically installed.

3. NO manual DLL path configuration is needed.
The package automatically locates the internal binaries upon import.
You do NOT need to set PATH, LD_LIBRARY_PATH, or pass dll_path arguments in standard usage.

--------------------------------------------------
🚀 Basic Usage
--------------------------------------------------

1.In your Python script:

Import the module:
   - from chronos_inst.cinstapi import ChronosInst

2. Create Instance:
   - tdc = ChronosInst(config_path='config/apiconfig.ini')

3. Use methods:
   - devices = tdc.get_devices()
   - tdc.connect(devices[0].type)  # The first device
   - result = tdc.set_dac(0, 500)
   - data = tdc.acq_rawdata(...)

4. Always disconnect/stop when done:
   - tdc.disconnect()
   - tdc.stop()

See "tdc_basic_example.py" for a complete working example.

--------------------------------------------------
⚠️ Notes & Limitations
--------------------------------------------------

- Requires Python 3.7 or newer.
- Import Order: Always import chronos_inst as the very first line in your script to ensure internal DLL/Qt 
paths are configured correctly before other libraries load.
- Ensure your Python architecture (64-bit) matches the DLL architecture.
- Some analysis features require NumPy and SciPy (automatically installed via pip).
- Tested on Windows 10/11 and Ubuntu 22.04; other platforms may require adjustments.

--------------------------------------------------
📄 License
--------------------------------------------------

Copyright (c) 2025 Chronos Instruments, Inc  
All rights reserved.
http://www.chronosci.com

This software is provided "as-is". Use at your own risk.

--------------------------------------------------
📬 Support
--------------------------------------------------

For questions or issues, contact: support@chronosci.com
Please provide: Python version, OS, error traceback, and output of diagnostic scripts.
