acycle 0.3.1
Advanced data analysis tools including image processing and plotting capabilities
License: MIT
Requires Python: >=3.8
Keywords: image, processing, analysis, data-extraction, qt

# Acycle - Advanced Scientific Analysis Tools

A comprehensive suite of scientific analysis tools including image processing, data processing, and advanced plotting capabilities.

## Features

### Image Processor
- **Image Magnification**: Real-time magnifier with adjustable zoom factor
- **Coordinate Calibration**: Set reference points to transform pixel coordinates to real-world coordinates
- **Color Analysis**: Automatic dominant color detection and custom color selection
- **Data Point Extraction**: Extract data points from images based on color matching
- **Drawing Tools**:
  - Box selection for region-based extraction
  - Freehand drawing for custom path selection
  - Manual point marking
- **Data Export**: Save extracted data points to text files
- **Undo/Redo**: Full undo/redo support for drawing operations (Ctrl+Z / Ctrl+Y)

### PlotPro - Advanced Plotting Tool
- **Multiple Plot Types**: Line, scatter, bar, histogram, and more
- **Data Import**: Support for CSV, TXT, and Excel files
- **Customization**: Full control over colors, markers, line styles, and fonts
- **Subplot Support**: Create complex multi-panel figures
- **Interactive Editing**: Real-time preview and adjustment
- **Export Options**: Save plots as PNG, PDF, SVG, and other formats
- **Professional Styling**: Publication-ready plot templates

### Math Tools - Data Processing Suite

**Data Manipulation Tools:**
- **Interpolation Pro** (`acycle-interpolation`): Advanced interpolation with multiple methods
- **Data Extractor** (`acycle-data-extractor`): Extract specific data segments from time series
- **Section Remover** (`acycle-section-remover`): Remove data sections and adjust time values
- **Gap Adder** (`acycle-gap-adder`): Add gaps to data series with time adjustment
- **Data Clipper** (`acycle-data-clipper`): Clip data based on threshold values

**Image Analysis Tools:**
- **Image Analyzer** (`acycle-image-analyzer`): Advanced image processing and analysis

## Installation

### From PyPI

```bash
pip install acycle
```

### From Source

```bash
git clone https://github.com/yourusername/acycle.git
cd acycle
pip install -e .
```

## Usage

### Command Line

After installation, you can run the applications using:

**Image Processor:**
```bash
acycle-imageprocessor
```

**PlotPro - Advanced Plotting Tool:**
```bash
# Launch without files
acycle-plot

# Launch with single file
acycle-plot data.txt

# Launch with multiple files
acycle-plot file1.txt file2.txt file3.txt
```

**Math Tools - Data Processing:**
```bash
# Interpolation tool
acycle-interpolation [data_file]

# Data extraction
acycle-data-extractor [data_file]

# Remove data sections
acycle-section-remover [data_file]

# Add gaps to data
acycle-gap-adder [data_file]

# Clip data by threshold
acycle-data-clipper [data_file]

# Advanced image analysis
acycle-image-analyzer
```

Or as Python modules:
```bash
python -m acycle.imageprocessor
python -m acycle.plot
```

### As a Library

**Image Processor:**
```python
from acycle.imageprocessor import ImageProcessor
from PySide6.QtWidgets import QApplication
import sys

app = QApplication(sys.argv)
window = ImageProcessor()
window.show()
sys.exit(app.exec())
```

**PlotPro:**
```python
from acycle.plot import PlotPro
from PySide6.QtWidgets import QApplication
import sys

app = QApplication(sys.argv)
window = PlotPro()
window.show()
sys.exit(app.exec())
```

## Workflow

### Image Processor Workflow

1. **Load Image**: Click "Load Image" to open an image file
2. **Calibrate Coordinates** (optional):
   - Enter reference values for X1, X2, Y1, Y2
   - Click "Pick X1", "Pick X2", etc., then click on the image to set calibration points
3. **Select Tool**:
   - **Box**: Draw a rectangle to select a region
   - **Drawing**: Draw freehand paths to select custom regions
   - **Manual**: Click to manually mark individual points
4. **Analyze Colors**: The tool automatically detects dominant colors in the image
5. **Extract Data Points**:
   - Select a color (either from dominant colors or custom)
   - Adjust dx/dy sampling intervals
   - Click "Extract Data Points"
6. **Save Data**: Click "Save Data Points" to export extracted coordinates

### PlotPro Workflow

PlotPro is an advanced plotting tool for creating and customizing scientific plots:

1. **Load Data**: Import data from CSV, TXT, or Excel files
2. **Configure Plot**:
   - Select plot type (line, scatter, bar, etc.)
   - Customize colors, markers, and line styles
   - Set axis labels and titles
3. **Advanced Features**:
   - Multiple subplot support
   - Legend customization
   - Grid and axis formatting
   - Export to various formats (PNG, PDF, SVG)
4. **Interactive Editing**: Real-time preview and adjustment of plot parameters

### Math Tools Workflow

**Data Processing Tools:**

1. **Interpolation Pro**: Load data file, select interpolation method, set parameters, and generate interpolated data
2. **Data Extractor**: Specify start and end points to extract data segments
3. **Section Remover**: Enter section boundaries to remove and automatically adjust time values
4. **Gap Adder**: Define gap locations and durations to insert into data series
5. **Data Clipper**: Set threshold values and choose clipping method (zero, delete, or threshold)

All tools support command-line file input and save results with descriptive suffixes.

## Requirements

- Python >= 3.8
- PySide6 >= 6.0.0
- numpy >= 1.20.0
- matplotlib >= 3.3.0
- scikit-image >= 0.18.0
- scikit-learn >= 0.24.0
- Pillow >= 8.0.0
- qt-material >= 2.0.0
- scipy >= 1.6.0

## License

MIT License - see LICENSE file for details

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Author

Acycle (34638768@qq.com)
#\x00 \x00A\x00c\x00y\x00c\x00l\x00e\x00P\x00y\x00
\x00
\x00