Hi Pat,
if you just want to extract some few and special pixel values you kann do it
with something like:
g.ImportFITSFile('myfits', 'blabla.fits', 0, linked=True)
pos=GetClick()
x=pos[0]
x=x[1]
y=pos[1]
y=y[1]
which extracts x and y position in quick'n'dirty mode. pos[] gives you a tupel
of tupel. You sure can write that much shorter and more direct, but to
demonstrate what you can you, I broke it down to realize the structure.
if you already have x and y than you can just browse the data section of the
fits to get its value, it's a numpyarray.
cheers, Christian
--
"A little learning never caused anyone's head to explode!"
"Ein wenig Lernen hat noch niemandens Kopf zum Explodieren gebracht!"
--- Patrick Durrell <[email protected]> schrieb am Mi, 17.4.2013:
Von: Patrick Durrell <[email protected]>
Betreff: Re: [Veusz-discuss] again: change axis defaults on fits
An: [email protected]
Datum: Mittwoch, 17. April, 2013 12:25 Uhr
Jeremy Sanders <jeremy@...> writes:
> This is tricky as Veusz tries to preserve the 2D grid spacing (WCS)
> information when possible. I should add a WCS option to the fits import
> dialog.
>
> So you can either
> 1. Remove the WCS from the fits file by deleting the various header keywords
>
> 2. Do something kludgy to create a new 2D dataset based on the imported
> fits data. Unfortunately Veusz tries to preserve this information. You
> can import your data, then go to Data->Create 2D. Choose from X,Y,Z
> values based on 1D datasets. For the expressions use something like
>
> X: indices(img.shape)[0].ravel()
> Y: indices(img.shape)[1].ravel()
> Z: img.ravel()
>
> Where img is your dataset name. You might have to swap the X and Y
> expressions here.
>
Perhaps a related question, but I am using VEUSZ to read in a FITS file, and
the WCS information is not correctly incorporated -- I get pixel values and
intensity, and not RA/DEC. How can I go about extracting the X and Y pixel
locations (and intensity values) from the 2D file (and placing them into 1D
vectors) so that I can (manually) create new RA and DEC arrays to use for
plotting purposes?
Pat Durrell
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss