A package to extract stars from an astronomical image
Project description
Welcome to the STAREXTRACTOR package
This package is an archive of scientific routines for data processing related to the source extraction from an astronomical image. Currently, operations on source extraction include:
- Read an astronomical image captured by cameras in fits format or in generic image format;
- Search for stars, extract their centroids and do photometry using
photutils
; - Show raw image with star marked;
How to Install
On Linux, macOS and Windows architectures, the binary wheels can be installed using pip by executing one of the following commands:
pip install starextractor
pip install starextractor --upgrade # to upgrade a pre-existing installation
How to use
Read an astronomical image
Images can be in .fits
format or in generic image format, such as .bmp
>>> from starextractor import AstroImage
>>> imagefile = 'obs/fits/img_00000.fits' #imagefile = 'obs/bmp/img_00000.bmp'
>>> image = AstroImage.read_image(imagefile)
Output the raw grayscale image with origin at bottom(the first row) left corner point.
>>> rawimage = image.rawimage
>>> print(image.raw_image,image.res) # image resolution
Show raw image
>>> image.show_image()
>>> #image.show_image('figs/raw_image.png') # save image to a file
Search for stars, extract their centroids and do photometry
Estimate the centroids coordinates, brightness(sum of grayvalue within an aperture), and SNR of star spots.
>>> centroids = image.find_centroid(fwhm=12,max_control_points=50,mask=True)
>>> print(centroids.xy,centroids.brightness,centroids.snr)
Show raw image
>>> centroids.show_image()
>>> #centroids.show_image('figs/centroids.png') # save image to a file
Change log
-
0.1.0 — Apr 5, 2023
- The starextractor package was released.
Reference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for starextractor-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2001e5231f1c51040d70d4361c36ba9aa7390c72167f57ed4f4ab9141daf5b9 |
|
MD5 | e85c5957a83b51f3848570eeed07562e |
|
BLAKE2b-256 | e2cb85f129b294dab2e8c7e0ae5894d7e7257800f5e2f97746f23f403c734ba9 |