Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image.type - Function Up: image - Tool Previous: image.tofits - Function


image.toascii - Function



Package general
Module images
Tool image


Convert the image to an ascii file


Synopsis
toascii(outfile, region, mask, sep, format, maskvalue, overwrite)


Arguments

outfile in Ascii file name
    Allowed: String
    Default: Input name + `.ascii'
region in The region of interest
    Allowed: Region tool
    Default: Whole image
mask in OTF mask
    Allowed: Boolean LEL expression or mask region
    Default: None
sep in Separator of data in ascii file
    Allowed: String
    Default: ' '
format in Format of data in ascii file
    Allowed: String
    Default: %e
maskvalue in Value to replace masked pixels by
    Allowed: Float or unset
    Default: No change
overwrite in Overwrite (unprompted) pre-existing output file ?
    Allowed: T or F
    Default: F


Returns
T or fail


Description

This function converts the image into an ascii file. The format is one image row per line (see imagefromascii).

The output mask is the combination (logical OR) of the default input pixel mask (if any) and the OTF mask. Because the mask is not transferred to the ascii file, you must specify what data value to use if a pixel is masked. By default, the underlying data value in the image is used. But this could be anything (and often it's a NaN), so you could set, say, maskvalue=-10000 as a magic value.



Example
- im := imagemaketestimage()
- ok := im.toascii('myfile.ascii')





next up previous contents index
Next: image.type - Function Up: image - Tool Previous: image.tofits - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01