Hello, folks!
I’m wondering is anybody has some sort of a program that converts
IRAF’s images (or FITS images) into GIF, TIFF or whatever XV can
read. It seems a little bit unusual but I really need it. The point
is that I’m extracting images from Digital Sky Survey, and this
STScI’s thing gives me only FITS files. I need to make fancy things
(like captions, a little editing, etc.) with them and print. That’s
why I need it.
I’m sure this problem is not unique, so, please, share your experience
if you have one.
Thanks in advance,
Sergei
–
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Sergei O. Naoumov se…@envy.astro.unc.edu tel: (919)962-3998 +
+Department of Physics & Astronomy, UNC-CH, Chapel Hill, NC 27599, USA+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In article f…@pecos.msfc.nasa.gov, b…@eggneb.astro.ucla.edu (Bruce Alan Macintosh) writes:
>naou…@physics.unc.edu (Sergei Naoumov) writes:
>>I’m wondering is anybody has some sort of a program that converts
>>IRAF’s images (or FITS images) into GIF, TIFF or whatever XV can
>>read.
>A disadvantage is that you only get as many levels as your saoimage
>supports – usually it seems to reserve about 200 colors, so this isn’t
>very bad. Using something fancy like pbmplus would give you better
>dynamic range and more control, but would be a lot more work.
>Bruce Macintosh b…@astro.ucla.edu
No work at all – use fitstopgm & ppmtogif if you HAVE the pbmplus
package.
But for most applications, as others have pointed out, XV’s screen grab
(which is in versions 3.0 AND 2.0) facility – from an SAOimage display
– will suffice.
—
Karl Glazebrook, email: k…@mail.ast.cam.ac.uk
Institute of Astronomy, finger: k…@jhereg.ast.cam.ac.uk
Cambridge, U.K. WWW: http://cast0.ast.cam.ac.uk/~kgb/
naou…@physics.unc.edu (Sergei Naoumov) writes:
>I’m wondering is anybody has some sort of a program that converts
>IRAF’s images (or FITS images) into GIF, TIFF or whatever XV can
>read.
One of the simplest techniques – for producing display images, not
preserving the science data in an image – is just to use xv itself to
grab an image displayed using iraf and saoimage. xv3.00 has a "grab"
button which will grab either an entire window or a portion of it.
Simply use iraf to display the image – which lets you adjust the levels,
scaling etc. to your liking – in color or greyscale, and then use xv
to grab it, and save it as a gif.
A disadvantage is that you only get as many levels as your saoimage
supports – usually it seems to reserve about 200 colors, so this isn’t
very bad. Using something fancy like pbmplus would give you better
dynamic range and more control, but would be a lot more work.
Bruce Macintosh b…@astro.ucla.edu
In article <2s4uq8$…@pecos.msfc.nasa.gov>,
- Hide quoted text — Show quoted text -
Sergei Naoumov <naou…@physics.unc.edu> wrote:
>Hello, folks!
>I’m wondering is anybody has some sort of a program that converts
>IRAF’s images (or FITS images) into GIF, TIFF or whatever XV can
>read. It seems a little bit unusual but I really need it. The point
>is that I’m extracting images from Digital Sky Survey, and this
>STScI’s thing gives me only FITS files. I need to make fancy things
>(like captions, a little editing, etc.) with them and print. That’s
>why I need it.
>I’m sure this problem is not unique, so, please, share your experience
>if you have one.
>Thanks in advance,
> Sergei
I usually display the image, then do:
xwd > image.xwd (make an x window dump)
xwdtopnm image.xwd | pnmtotiff > image.tiff (converts to a pnm file,
then to a tiff file)
It’s klunky, but it works. I am open to better suggestions…
"xwdtopnm" and "pnmtotiff" are part of the "pbmplus" package,
by Jeff Poskanzer.
Chris
In article <2s4uq8$…@pecos.msfc.nasa.gov> naou…@physics.unc.edu writes:
>Hello, folks!
>I’m wondering is anybody has some sort of a program that converts
>IRAF’s images (or FITS images) into GIF, TIFF or whatever XV can
>read. It seems a little bit unusual but I really need it. The point
>is that I’m extracting images from Digital Sky Survey, and this
>STScI’s thing gives me only FITS files. I need to make fancy things
>(like captions, a little editing, etc.) with them and print. That’s
>why I need it.
For presentation-type work, where you only need a qualitative capture
of the image, you can use xv to grab and save any window that is
displayed on the screen, such as in saoimage. It then gives you a few
options for the file format to save it in.
The other option i’m aware of is with Spyglass Transform, which is a
commercial data display program. It can read FITS and save in a
variety of common formats. The drawback, besides the cost (maybe
$300), is that Transform needs a lot of memory to read an image. We
couldn’t get it to read 2k by 2k images with a 24Mbyte sun, but
smaller images work fine.
Hope it helps
Hans-Joerg Deeg
<Request to convert IRAF imh files to something readable by XV>
We use the IRAF package developed by Frank Valdes at Kitt Peak IRAF Group
called "color" which enables one to make false-color images of .imh
files which are Sun Raster files.
Then you can use XV or other tools to convert from 24-bit color to 8-bit
color, or save as PostScript and print them.
Below are the details directly from the IRAF package…………
David E. Wall w…@donald.phast.umass.edu
University of Massachusetts, Amherst – Astronomy
http://donald.phast.umass.edu/
———————————————————————–
PACKAGE (Oct92) color PACKAGE (Oct92)
Guide to Making Color Composites from IRAF images
INTRODUCTION
This guide describes techniques for taking three monochrome IRAF
images, a "red" image, a "green" image, and a "blue" image and making
color composites. There are many techniques which depend on different
hardware and software. This guide currently discusses three methods
for display on an 8-bit color workstation, using Sun 24-bit RGB
rasterfiles, creating a special color map and image which samples the
RGB color space, and pixel dithering. The rasterfiles may be displayed
or printed using a variety or non-IRAF tools which are readily
available and which can be used with 8-bit workstations. The special
color map and pixel dithering methods use only IRAF images and the
standard SAOimage/IMTOOL display servers to display on 8-bit color
workstation. These techniques are intended to provide a rudimentary
color composite capability in absence of better hardware such as
IIS/IVAS devices or 24-bit workstations.
For further information on the tasks described here see the approriate
help pages.
SUN 24-BIT RGB RASTERFILES
The task rgbsun takes three input IRAF images and produces a 24-bit Sun
rasterfile. Though this file type was developed by Sun Microsystems it
is a relatively simple format which may useful on other machines having
software designed to use it. The color image may be display with a
variety of tools such as xv (a very powerful and generic viewer for
X-window systems), xloadimage (another X-window display tool),
screenload (a simple displayer on Sun computers), and snapshot (an
Open-Look tool). Also some color printers can be used with this format
such as a Shinko color printer.
The recommended display tool is xv which provides a great deal of
capability in adjusting the color map and size. This program
compresses the 24-bit colors to 8-bits on an 8-bit workstation using
color dithering techniques (there is a choice of a slow and fast
method). This program also provides the capability to write the
picture out to other formats and one may also use screen capture tools
such as xwd or snapshot to extract and possibly print the picture.
For hardcopy there is always the option of photographing the workstation
screen. Different sites may also have color printers which accept the
rasterfile directly or some other form of capture from the screen. At
NOAO there is a Shinko color printer which may be used directly with
the rasterfile to make moderate quality color prints and slides.
24-BIT to 8-BIT COLOR MAP COMPRESSION
The task rgbto8 produces an 8-bit color map which samples the full
range of RGB color values and an associated image with values indexing
the color map. The compression algorithm is called the Median Cut
Algorithm and the image is dithered with this color map using the
Floyd-Steinberg algorithm. The resulting image is a short image with
199 values. The color map is output in either a format suitable for
use with SAOimage or with IMTOOL. This method is recommended over the
pixel dithering method.
The RGB values are input as three IRAF images. The images must each be
scaled to an 8 bit range. This is done by specifying a range of input
values to be mapped to the 8 bit range. In addition the range can be
mapped logarithmically to allow a greater dynamic range.
The output image is displayed with rgbdisplay with either SAOimage or
IMTOOL. Note that this requires V1.07 of SAOimage. The color map
produced by the rgbto8 for a particular image must also be loaded into
the display server manually. With IMTOOL use the setup panel and set
the file name in the user1 or user2 field and then select the
appropriate map. With SAOimage you select the "color" main menu
function, and then the "cmap" submenu function, and then the "read"
button. Note that usually a full pathname is required since the server
is usually started from the login directory.
The display server must be setup in it’s default contrast mapping (with
IMTOOL you can use the RESET option but with SAOimage you must restart)
and the contrast mapping must not be changed. There are no adjustments
that can be made in IMTOOL but with SAOimage you can adjust the colors
using the "gamma" selections and the mouse.