Comments (7)
I'm pretty sure makeStars
does choose the stamps so that the given position (from x_col
, y_col
) is as close as possible to the center of the stamp. I suspect the confusion is that these positions are assumed to be FITS-style positions, not numpy. That is, the center of the lower left pixel of the full image is considered to be (x,y) = (1,1), not (0,0).
These are the positions that show up if you open the image in, say, ds9 or some other standard astronomical image viewing software. And notably, (1,1) offset from what you get from things like matplotlib's imshow.
from piff.
It definitely could be that.
Should I change my code such that the conversions are RA,DEc-> x_col, y_pos in FITS-style or is there a way to tell PIFF that the values I am giving are numpy ?
I would prefer the latter as I think numpy formating is more standard (and matchs with matplotlib). But I could make the trick inside my code.
Thanks
from piff.
I am now shifting the x_cos, y_col by -1 to follow the fortran/fits format when creating the catalog that enters PIFF.
It solves the issue.
from piff.
Good. I'd much rather keep the convention of matching other astronomy software than some particular plotting package, so I think we should leave it as is. Especially since most input catalogs (e.g. any from SExtractor or the LSST stack) will be using this convention, not the numpy one. (I.e. your convention is very much not more standard.)
However, we could consider adding optional parameters xoffset
and yoffset
, which you can set to 1 as a way to apply an offset to the input positions. This way, you wouldn't need to rewrite new catalogs if you for whatever reason made catalogs with the numpy convention.
from piff.
That could be an idea, and indeed, numpy convention might actually not be the standard in astronomy.
from piff.
The Rubin code sets the centre of the bottom-left-hand pixel to be (0.0, 0.0)
, which is off-by-one from FITS (but consistent with 0-indexing in C and python)
from piff.
Ah, good to know. Thanks.
from piff.
Related Issues (20)
- Add calculate_moments function to util and associated unit tests. HOT 1
- PSF wings HOT 2
- Reading WCS solution of ZTF images HOT 1
- psf.draw | wcs is not a list for single chip fit HOT 5
- Add equality testing HOT 1
- very large PSF (after re-installation) | Bad fit HOT 6
- regularize in a hacky way HOT 3
- Examples in documentation & `examples/` fail for v1.2 HOT 3
- Piff catastrophically fails when PixelGrid size is larger than input star images HOT 3
- Inconsistent piff log message levels HOT 2
- Fix max_snr weight adjustment.
- Make it easy to run just the star selection without fitting a PSF model
- incorrect error message with missing keyword
- coadd_object_id in psf_stars extension is stored as an f8 instead of an i8 HOT 3
- Add optional high order moments to the HSM output file. HOT 4
- Let weight, badpix be different files from image.
- Strange PSF fitting HOT 5
- Request: Release new version
- test suite needs pytest<8 and galsim<2.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piff.