Skip to main content

A function fitting tool

Project description

Languages

PyCFF

A Python-based curve fitting tool


1. Introduction

A simple program written in Python, which implements function fitting through numpy and scipy, and uses PySide to write the user interface. It implements the function of fitting function parameters from input data to output, and supports data prediction and custom function functions.

Repository:PyCFF

2. User Interface

The software interface is implemented using Qt6 (PySide6). It supports function drawing, allowing users to customize drawing content and save output images. 1.1-MainWindow-en.png

3. Input data

The software uses Excel spreadsheets for data input. Users select the independent variable (x) and dependent variable (y) to fit the function by specifying columns. Data can be entered manually or pasted from spreadsheet software like Excel. The Paste Replace Column method allows for rapid data entry. Tabular data supports formula operations and simple function calculations (see Custom Function Description for supported functions). 1.2-Input-en.png

4. Output Window

The software's output interface displays the coefficients and expressions of the output function in both table and text format. The software pre-defines some common functions. Selecting a function displays the function parameters in the table on the left and the complete function expression in the text box. Users can customize the precision of the output parameters and whether to use scientific notation. The default setting is scientific notation with six decimal places, which meets the needs of most engineering calculations. 1.3-Output-en.png

5. Custom Functions

The software includes predefined functions such as polynomials, exponentials, logarithms, and power functions. In addition to these predefined functions, the software also supports user-defined functions. Custom functions such as a+b*x**1+c*x**2 and -omega-alpha * exp(x) automatically extract their parameters and fit them to the input data. Custom functions support not only the four arithmetic operations (+, -, , /) and power operations (* or ^), but also common functions. See the table below for specific functions and their descriptions.

Function Usage Description
exp exp(x) Calculates the exponential value of x
pow pow(x, y) Calculates x raised to the power of y
abs abs(x) Calculates the absolute value of x
sqrt sqrt(x) Calculates the square root of x
cbrt cbrt(x) Calculates the cube root of x
log log(x) Calculates the base e logarithm of x
log10 log10(x) Calculates the base 10 logarithm of x
log2 log2(x) Calculates the base 2 logarithm of x
min min(x) Calculates the minimum value of x
max max(x) Calculates the maximum value of x
sin sin(x) Calculates the sine of x
cos cos(x) Calculates the cosine of x
tan tan(x) Calculates the tangent of x
asin asin(x) Calculates the inverse sine of x
acos acos(x) Calculates the inverse cosine of x
atan atan(x) Calculates the inverse tangent of x
sinh sinh(x) Calculates the hyperbolic sine of x
cosh cosh(x) Calculates the hyperbolic cosine of x
tanh tanh(x) Calculates the hyperbolic tangent of x
asinh asinh(x) Calculates the inverse hyperbolic sine of x
acosh acosh(x) Calculates the inverse hyperbolic cosine of x
atanh atanh(x) Calculates the inverse hyperbolic tangent of x
pi pi() Pi
e e() Base of natural logarithms

6. Release Notes

Currently, this application has been tested and verified on Windows amd64 and Linux x86-64 platforms, but has not yet been fully tested on MacOS and Linux Aarch64 platforms.

7. License

This software is open source under the LGPL license, and you are free to use, modify and distribute it under the terms of the license.

8. Acknowledgements

The development of this software relies on the following projects:

For more suggestions and feedback, please submit Issues. You can also contribute code via Pull Requests.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pycff-1.3.1-cp313-abi3-win_amd64.whl (727.1 kB view details)

Uploaded CPython 3.13+Windows x86-64

pycff-1.3.1-cp313-abi3-manylinux2014_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.13+

pycff-1.3.1-cp313-abi3-manylinux2014_aarch64.whl (5.9 MB view details)

Uploaded CPython 3.13+

pycff-1.3.1-cp313-abi3-macosx_12_0_universal2.whl (1.7 MB view details)

Uploaded CPython 3.13+macOS 12.0+ universal2 (ARM64, x86-64)

File details

Details for the file pycff-1.3.1-cp313-abi3-win_amd64.whl.

File metadata

  • Download URL: pycff-1.3.1-cp313-abi3-win_amd64.whl
  • Upload date:
  • Size: 727.1 kB
  • Tags: CPython 3.13+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pycff-1.3.1-cp313-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cdc28258474df64e11935433bc4de8495bdd5a83806cd8bc62fa35b216ec9ea3
MD5 8704d41bd7ac6cad0a9faa39d250dd27
BLAKE2b-256 2a544057ff886987dcf6893f5f6dc925ccc618e76d0f3e29fc9618d00bb01838

See more details on using hashes here.

File details

Details for the file pycff-1.3.1-cp313-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycff-1.3.1-cp313-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0dcabd72dc4a608ca19106dcea9b0a0b78f4a0460e5f6b48048ade596b4fcd97
MD5 86a042d478bd3e0372ac19ca65c99205
BLAKE2b-256 4772501ce87c45b9d1298f3a792c6983874bd036a160e20db6c75ab5563938f9

See more details on using hashes here.

File details

Details for the file pycff-1.3.1-cp313-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pycff-1.3.1-cp313-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2e2be9bf1853229e968118d63de07a01e51ffcb632c5378136a37a2bdea48512
MD5 9e2b0ca8b9ae243f98a47363319ba4df
BLAKE2b-256 b10f3458620f3b06903d1335ea922301b5c415852f94dae2c139868650ac412a

See more details on using hashes here.

File details

Details for the file pycff-1.3.1-cp313-abi3-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for pycff-1.3.1-cp313-abi3-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 88c6a014a8a5bc3d75264a200bd742870ebc62f14ecbac0066c50dc0339f11a0
MD5 1d201d4963725387a1e2c60bf1de7d91
BLAKE2b-256 d968a3306b5d1acefe51d8cd97c76b1a83505be958513f7b50de3208e9d1ff74

See more details on using hashes here.

Supported by

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