Discussion:
tv and tvscl problems
(too old to reply)
J***@gmail.com
2006-02-14 21:00:43 UTC
Permalink
Hello,

I am trying to display an image using tv and atv and I have some
problems.
First, I read my .fits file using readfits:

device,decomposed=0 (because I have a 24-bit display mode)
IDL>img1=readfits('example.fits',h)

and then I try to use tv:
IDL>tv,img1
What I get from the tv command is:
% Program caused arithmetic error: Floating illegal operand
and a small part of my image appears zoomed in, in the idl window but
not the whole image.
When I type:
IDL>tvscl,img1
the result is that my idl window turns completely white and nothing
shows up on it.

Any suggestions on what might be the problem?

Thank you in advance,
Jay
David Fanning
2006-02-14 21:17:00 UTC
Permalink
Post by J***@gmail.com
I am trying to display an image using tv and atv and I have some
problems.
device,decomposed=0 (because I have a 24-bit display mode)
IDL>img1=readfits('example.fits',h)
IDL>tv,img1
% Program caused arithmetic error: Floating illegal operand
and a small part of my image appears zoomed in, in the idl window but
not the whole image.
IDL>tvscl,img1
the result is that my idl window turns completely white and nothing
shows up on it.
Any suggestions on what might be the problem?
Sounds to me like your image has values in it you
weren't expecting. What are the minimum and maximum
values in the data? Do you, perhaps, need to byte swap
your data? (This is the usual case when the data is
SO not what you expect!)

From your description, it sounds like there is a VERY
low value in this data set, so that when the data is
scaled, most of the data you are interested in a
scrunched into the lightest possible colors. Learn
to scale the data yourself with BYTSCL, and become
familiar with the MAX and MIN keyword. They are your
friends. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Loading...