ginga pick gets central position in 1-indexing
See original GitHub issueWhile doing my data analysis for PSF photometry, I found my code always give warning because the ginga pick location (which are fed as initial guess to the true centroid) and the DAOStarFinder
centroid differ more than 1 pixel all the time.
To test, I made a perfect Gaussian star at center = (31, 31) to a (51, 51) array.
from astropy.modeling.functional_models import Gaussian2D
g = Gaussian2D(amplitude=1, x_mean=31, y_mean=31, x_stddev=2, y_stddev=2)
test = np.zeros((51, 51))
test_xx, test_yy = np.mgrid[:51,:51]
test += g(test_xx, test_yy)
finder = DAOStarFinder(fwhm=5, threshold=0, exclude_border=True)
test_found = finder(test)
test_pos = (test_found["xcentroid"][0], test_found["ycentroid"][0])
print(test_pos)
# (31.0, 31.0)
plt.imshow(test, origin="lower")
plt.plot(*test_pos, 'rx', ms=10)
test_ccd = CCDData(data=test, unit='adu')
test_ccd.write("test.fits", overwrite=True)
The position by DAOStarFinder
is correct: (31.0, 31.0)
But ginga found (32.0, 32.0)
Maybe I guess this is not expected…?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
ginga Documentation
Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in NumPy arrays.
Read more >ginga Documentation - Read the Docs
Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in NumPy arrays.
Read more >Untitled
Ccie data center india, Bebington civic centre library, Equestrian decor ... Doncaster maplin, Today posted jobs in coimbatore, Gaego, Ar58225 atheros ...
Read more >3850 PDFs | Review articles in 3D FLOW - ResearchGate
The position of domains of the numerical simulation and the. ... material points that periodically return to their initial position, play a central...
Read more >Servo Drives & Amplifiers - PicClick CA
Money Back Guarantee ensures YOU receive the item you ordered or get your money back. ... Local pick up can be arranged at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pick
reports location in FITS coordinates (1-based indexing) by default, whereasDAOstarfinder
probably uses 0-based indexing. Ginga’s internal reporting is 0-based, however, and you can change the value shown inPick
by addingto a text file
general.cfg
in your$HOME/.ginga
folder.Might make for some good unit tests, @pllim!