Pyimfit
This is a Python wrapper for the astronomical image-fitting program Imfit.
Online documentation: https://pyimfit.readthedocs.io/en/latest/.
Sample Usage
The following assumes an interactive Python session (such as an iPython session or Jupyter notebook):
from astropy.io import fits
import pyimfit
imageFile = "<path-to-FITS-file-directory>/ic3478rss_256.fits"
imfitConfigFile = "<path-to-config-file-directory>/config_exponential_ic3478_256.dat"
# read in image data, convert to proper double-precisions, little-endian format
image_data = fits.getdata(imageFile)
# construct model from config file; construct new Imfit fitter based on model,;
model_desc = pyimfit.ModelDescription.load(imfitConfigFile)
# create an Imfit object, using the previously loaded model configuration
imfit_fitter = pyimfit.Imfit(model_desc)
# load the image data and image characteristics and do a standard fit
# (using default chi^2 statistics and Levenberg-Marquardt solver)
result = imfit_fitter.fit(image_data, gain=4.725, read_noise=4.3, original_sky=130.14)
# check the fit and print the resulting best-fit parameter values
if result.fitConverged is True:
print("Fit converged: chi^2 = {0}, reduced chi^2 = {1}".format(imfit_fitter.fitStatistic,
result.reducedFitStat))
bestfit_params = result.params
print("Best-fit parameter values:", bestfit_params)
Release files for pyimfit 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyimfit-1.1.tar.gz | 10.8 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyimfit-1.1-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
| pyimfit-1.1-cp312-cp312-macosx_10_13_x86_64.whl | CPython 3.12 | CPython 3.12 | macOS 10.13+ x86-64 | Details |
| pyimfit-1.1-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details |
| pyimfit-1.1-cp311-cp311-macosx_10_9_x86_64.whl | CPython 3.11 | CPython 3.11 | macOS 10.9+ x86-64 | Details |
| pyimfit-1.1-cp310-cp310-macosx_11_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 11.0+ ARM64 | Details |
| pyimfit-1.1-cp310-cp310-macosx_10_9_x86_64.whl | CPython 3.10 | CPython 3.10 | macOS 10.9+ x86-64 | Details |
Total release size: 20.9 MB
Release files / pyimfit-1.1.tar.gz
| Download URL | pyimfit-1.1.tar.gz |
|---|---|
| Size | 10.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ede06abb63dc2741ad3debf7f866471bfb8fc123eca40da8d4754dbb62e219b1
|
|
BLAKE2b-256 checksum How to use checksums |
36d18d6de714d933e01aa7d0040c4cc186038403897c706807d2ea2ca11af1ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pyimfit-1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1a0fc5403a0fad8b671c4b93ad9e0d1d9f8a24af8aa14230be866fdbdc93ca96
|
|
BLAKE2b-256 checksum How to use checksums |
48a863db3bbd4a265d36f93a56407b0be14543ac6644fe6d0fcad144903d0b59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | pyimfit-1.1-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
d493ccb3d3085ec5e4aeb5dfecf441df58c490f484f7a709af6b40b7fa7b99a6
|
|
BLAKE2b-256 checksum How to use checksums |
2ad3cc654198ab606ca92e28b9b828a95847f2e7534dde4a4863e62a5a7da588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pyimfit-1.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5ae7e70d7e318c9b271a4d7692d2c70595d8b9c880f4bcab9ed4090a435a5f83
|
|
BLAKE2b-256 checksum How to use checksums |
7e0bbeb1ecf5a2e89e1deea9b452a23646c2321906bb16704bd9067c2ccb296f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | pyimfit-1.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7a4212341dc3bca569f35137aa454d013089cc37dbe66eeb40db6accdbfaed8
|
|
BLAKE2b-256 checksum How to use checksums |
56b5d223a06aa153719dc71cd074b1adb59a7a0efe9abc78e1250f3461bf15f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pyimfit-1.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a85ca5149944d9fac20f7f83de57dbec0807fe0025305d4916e1d94a8fbe2f77
|
|
BLAKE2b-256 checksum How to use checksums |
8a352cd6405a901f13e236516f0647f6b880f8d085db52ab021c6a619e5fb4d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pyimfit-1.1-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | pyimfit-1.1-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
8deacc7947117ea3f827b219b629af6000abce6939f96607666bd87346b8d027
|
|
BLAKE2b-256 checksum How to use checksums |
f6c65e3bcbd251f65cae5b18f4180ef845c851e0718c494e83b838f4b96990f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|