Skip to main content

Library for handling x-y pattern data.

Project description

codecov CI

xypattern

Description

A simple small library to handle x-y patterns, such as are collected with x-ray diffraction or Raman spectroscopy.

Installation

pip install xypattern

Usage Examples

Reading a file

from xypattern import Pattern
import matplotlib.pyplot as plt

p1 = Pattern.from_file('path/to/file')
p1.scaling = 0.5
p1.offset = 0.1

plt.plot(p1.x, p1.y)
plt.show()

Use a background pattern

p2 = Pattern.from_file('path/to/file')
p2.scaling = 0.9
p1.background = p2

Scale and stitch multiple patterns

p1 = Pattern.from_file('path/to/file1')
p2 = Pattern.from_file('path/to/file2')
p3 = Pattern.from_file('path/to/file3')

from xypattern.combine import scale_patterns, stitch_patterns

patterns = [p1, p2, p3]
scale_patterns(patterns)
stitched_pattern = stitch_patterns(patterns)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xypattern-1.1.0.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distributions

xypattern-1.1.0-cp312-cp312-win_amd64.whl (83.1 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

xypattern-1.1.0-cp312-cp312-manylinux_2_35_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

xypattern-1.1.0-cp312-cp312-macosx_12_0_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.12 macOS 12.0+ x86-64

xypattern-1.1.0-cp311-cp311-win_amd64.whl (82.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

xypattern-1.1.0-cp311-cp311-manylinux_2_35_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

xypattern-1.1.0-cp311-cp311-macosx_12_0_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

xypattern-1.1.0-cp310-cp310-win_amd64.whl (82.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

xypattern-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

xypattern-1.1.0-cp310-cp310-macosx_12_0_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

xypattern-1.1.0-cp39-cp39-win_amd64.whl (82.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

xypattern-1.1.0-cp39-cp39-manylinux_2_35_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

xypattern-1.1.0-cp39-cp39-macosx_12_0_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

xypattern-1.1.0-cp38-cp38-win_amd64.whl (82.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

xypattern-1.1.0-cp38-cp38-manylinux_2_35_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

xypattern-1.1.0-cp38-cp38-macosx_12_0_x86_64.whl (14.1 kB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page