linebias: starting pixel no longer Image but Physical
dvbowen wrote on Jun 23, 2006
So I've been slogging over a hot laptop all night reducing spectra, when I
make a nasty mistake and delete all the final reductions (duh!). Not to
worry... I can retrace my steps and re-extract the spectra. However, suddenly,
I find that the behaviour of "linebias" has changed!
Up to now, I've used linebias to specify a trim section that cuts off unwanted
data at the ends of the rows (x, or wavelength, direction). For example, I
define a trim section of [600:1200, 10:20], and end up with a 2D frame of 600
pixels in length. When I splot some row, the starting pixel is '1'. However,
all of a sudden, splot thinks the starting pixel is 600. For some reason, the
LTV1 keyword has appeared in the header of the linebiased file (equal to
-599), when it wasn't there before after running linebias (and hasn't been
since I installed IRAF).
Why has the LTV1 keyword appeared, and how do I make it go away? For one
thing, I like my spectra to start at pixel 1 ;) But I've already defined my
wavelength scale and 2D extractions in Image co-ordinates, not Physical ones.
More info: I'm actually using pyraf 1.1.2 wrapped around IRAF 2.12.2, but the
problem exists even if I use the old cl. I'm working on a laptop running
SUSE 9.3. At the time the problem appeared, I was running two pyrafs. I've tried
mkiraf and resetting everything.
Many thanks,
Dave Bowen
make a nasty mistake and delete all the final reductions (duh!). Not to
worry... I can retrace my steps and re-extract the spectra. However, suddenly,
I find that the behaviour of "linebias" has changed!
Up to now, I've used linebias to specify a trim section that cuts off unwanted
data at the ends of the rows (x, or wavelength, direction). For example, I
define a trim section of [600:1200, 10:20], and end up with a 2D frame of 600
pixels in length. When I splot some row, the starting pixel is '1'. However,
all of a sudden, splot thinks the starting pixel is 600. For some reason, the
LTV1 keyword has appeared in the header of the linebiased file (equal to
-599), when it wasn't there before after running linebias (and hasn't been
since I installed IRAF).
Why has the LTV1 keyword appeared, and how do I make it go away? For one
thing, I like my spectra to start at pixel 1 ;) But I've already defined my
wavelength scale and 2D extractions in Image co-ordinates, not Physical ones.
More info: I'm actually using pyraf 1.1.2 wrapped around IRAF 2.12.2, but the
problem exists even if I use the old cl. I'm working on a laptop running
SUSE 9.3. At the time the problem appeared, I was running two pyrafs. I've tried
mkiraf and resetting everything.
Many thanks,
Dave Bowen
Mike Fitzpatrick wrote on Jun 23, 2006
To make the LTV keywords go away, simply
The LTV/LTM keywords define the physical coordinate system and are created whenever e.g. you extract a subraster, magnify, block average, etc. Physical coordinates are used by some tasks that need to relate two images or an image and function fit to the original image. For spectra it may be used to relate the dispersion function derived from an arc spectrum to an object spectrum that may have been extracted or trimmed somewhat differently. Where you might encounter it if you are dealing with spectra is that in SPLOT it will plot pixel coordinates in this physical coordinate system.
I don't understand why they wouldn't have been there before or what exactly went wrong, hope this helps.
Cheers,
-Mike
cl> wcsreset <images> wcs=physical
The LTV/LTM keywords define the physical coordinate system and are created whenever e.g. you extract a subraster, magnify, block average, etc. Physical coordinates are used by some tasks that need to relate two images or an image and function fit to the original image. For spectra it may be used to relate the dispersion function derived from an arc spectrum to an object spectrum that may have been extracted or trimmed somewhat differently. Where you might encounter it if you are dealing with spectra is that in SPLOT it will plot pixel coordinates in this physical coordinate system.
I don't understand why they wouldn't have been there before or what exactly went wrong, hope this helps.
Cheers,
-Mike
dvbowen wrote on Jun 23, 2006
Dear Mike:
Many thanks for the solution - the wcsreset certainly works on the debiased images, which is great for the work I've already done.
But do you know what the _default_ coord system is in, e.g. the NOAO package, for example? Should I expect to work in Image or Physical co-ordinates in the future? (I don't want to keep running wcsreset every time I work on an image!) From your reply, it sounds like "Physical" is actually the norm. Is there some 'iraf system variable' that could have gotten reset to "Physical" instead of the "Image" I was using?
Thanks again!
Dave
Many thanks for the solution - the wcsreset certainly works on the debiased images, which is great for the work I've already done.
But do you know what the _default_ coord system is in, e.g. the NOAO package, for example? Should I expect to work in Image or Physical co-ordinates in the future? (I don't want to keep running wcsreset every time I work on an image!) From your reply, it sounds like "Physical" is actually the norm. Is there some 'iraf system variable' that could have gotten reset to "Physical" instead of the "Image" I was using?
Thanks again!
Dave
Mike Fitzpatrick wrote on Jun 23, 2006
The "default" depends on the task, and in many cases is the World system, e.g.
wavelength for spectra or ra/dec for imaging data where appropriate. For an explanation of the IRAF coordinate systems see
but basically you have 'physical', 'logical' and 'world' (and no sort of environment variable to set a default). The above documents what these mean, but physical and logical are usually the same except when an image has been geometricall transformed such as by extracting a subraster (or trimming a bias). For example, try
Does this answer it?
-Mike
wavelength for spectra or ra/dec for imaging data where appropriate. For an explanation of the IRAF coordinate systems see
cl> phelp mwcs$MWCS.hlp fi+
but basically you have 'physical', 'logical' and 'world' (and no sort of environment variable to set a default). The above documents what these mean, but physical and logical are usually the same except when an image has been geometricall transformed such as by extracting a subraster (or trimming a bias). For example, try
cl> imcopy dev$wpix[100:102,100:102] foo.fits
cl> listpix foo.fits wcs=physical
cl> listpix foo.fits wcs=logical
cl> wcsreset foo.fits wcs=physical
cl> listpix foo.fits wcs=physical
Does this answer it?
-Mike
Last post on Jun 23, 2006