Questions tagged [photutils]

Photutils is an affiliated package of Astropy, to provide tools for detecting and performing photometry of astronomical sources. This tag is for questions that make use of this particular package. For general questions about the Astropy package, use the 'astropy' tag.

Photutils is an affiliated package of Astropy to provide tools for detecting and performing photometry of astronomical sources.

20 questions
3
votes
1 answer

How to create a progress bar for iterations happening within installed modules

I am aiming to create a progress bar for an iteration happening inside an installed module. To create a progress bar for an iteration inside a user-defined function, I pass an tqdm.notebook.tqdm_notebook object as iterable: import time import numpy…
zabop
  • 6,750
  • 3
  • 39
  • 84
3
votes
3 answers

Coordinates are not conserved after cropping fits file

Consider the following code (download test.fits): from astropy.io import fits from photutils.utils import cutout_footprint # Read fits file. hdulist = fits.open('test.fits') hdu_data = hdulist[0].data hdulist.close() # Some center and box to…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
1
vote
1 answer

How can one plot Elliptical apertures for a list of values of major and minor axes?

I want to plot elliptical apertures in different regions on a UV FITS file, for different values for major and minor axes and theta, the angle made by the major axis with positive x-direction. I have an array of values to define the required center…
1
vote
0 answers

Goodness of fit in PSF photometry with photutils BasicPSFPhotometry

I'm using BasicPSFPhotometry from photutils.psf to obtain the photometry of a source. Here an example of my code (sadly is not a working example but can help understanding what I'm doing and what I need). Most of this was copied from…
1
vote
1 answer

How to crop a FITS image in Python in a given shape?

I want to crop a FITS image area between two circles. For example, I want to crop out an area in the FITS image between circles of radii of R1 and R2. How do I go about it?
1
vote
1 answer

Photutils/Aperture photometry How can I find the error on photometry?

I am performing aperture photometry using photutils. I've followed the tutorials in the photutils page, calaculated the background from a circular annulus around the source and subtracted it. Now I have to calculate the error on the photometry, but…
1
vote
1 answer

Photutils error: cannot import name 'NUMPY_LT_1_14_1'

I'm new to using python for photometry so I'm working through the Photutils tutorial on Background extraction, Aperture photometry etc I'm using a notebook in Python 3 and have downloaded the latest Photutils package using anaconda. When I try to…
Helen U
  • 11
  • 1
1
vote
2 answers

Photoutils/Aperture photometry is triggerring "Nonetype" error

I am performing aperture photometry over thousands of images and have this piece of code in my module. b_aperture = SkyCircularAperture(b_position, r= r*u.arcsec) b_annulus_aperture = SkyCircularAnnulus(b_position, r_in= r_in* u.arcsec, r_out=…
Abhishek
  • 49
  • 1
  • 7
0
votes
0 answers

According to documentation photutils.aperture.CircularAperture does not accept a list of floats for 'r', what is the recommended method for this?

It would be useful to combine photutils.detection.IRAFStarFinder's ability to provide the fwhm of stars to the radius parameter of photutils.aperture.CircularAperture to construct a set of apertures, which can then be processed by…
Gerald
  • 166
  • 1
  • 13
0
votes
0 answers

TypeError: __init__() got an unexpected keyword argument 'registry'

I'm doing some packages importations on google colab - I was working on these for a time, but then one day this message appeared to me when I tried to import photutils package, a package used by astronomers: TypeError …
0
votes
1 answer

ModuleNotFoundError: No module named 'photutils.geometry.circular_overlap

I'm trying to install the latest version of photutils (version 1.5) on my google-colab. Since it requires python >= 3.8, I first install python 3.8 using the code below. I also change the sys.path, and I install photutils successfully using pip. The…
0
votes
0 answers

How to tell `photutils` to plot only apertures which satisfy a condition?

I'm following an example in the photutils documentation to detect sources in an image: from astropy.stats import sigma_clipped_stats from photutils.datasets import load_star_image import numpy as np import matplotlib.pyplot as plt from…
Jim421616
  • 1,434
  • 3
  • 22
  • 47
0
votes
2 answers

How to save a QTable to a file (.txt, .csv, etc.)

I am trying to save a QTable object which originates from a Isophote list of an elliptical isophote fit, to really any filetype (.txt, .csv, etc.) that allows me to simply just load it back into the script without having to clean it or any of that…
Valentino
  • 15
  • 3
0
votes
0 answers

Find_Peaks: Invalid shape (4951,) for image data. Possible solutions?

Hello all I ran into this error when I tried to display an via imshow: Invalid shape (4951,) for image data This data is the pixel "peak_vals" output I got from running an image through photutils.find_peaks(). The original shape was (5820,). I'm…
0
votes
1 answer

Precise detecting light sources center from the image with oversaturated pixels

I have a 16bit image on which the main objects are 6 LEDs, two reflective squares, and the rest of the image is pretty much dark. These two squares partially overlap two LEDs. Around 50% of visible LEDs are oversaturated (their center)with a pixel…
Falco Peregrinus
  • 507
  • 2
  • 7
  • 19
1
2