![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaDocument | |||
1.1.1 Convert the image to an ASCII file
Description
This function converts the image into an ascii file. The format is one image
row per line (see fromascii).
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.
Arguments
| Inputs |
| ||
| outfile |
| ASCII file name. Default is input name + ’.ascii’.
| |
| allowed: | string |
|
| Default: |
|
|
| region |
| The region of interest. Default is whole image.
| |
| allowed: | any |
|
| Default: | record |
|
| mask |
| OTF mask, Boolean LEL expression or mask region.
Default is none.
| |
| allowed: | any |
|
| Default: | variant |
|
| sep |
| Separator of data in ascii file. Default is space character.
| |
| allowed: | string |
|
| Default: |
|
|
| format |
| Format of data in ascii file
| |
| allowed: | string |
|
| Default: | %e |
|
| maskvalue |
| Value to replace masked pixels by, -999 is no change.
| |
| allowed: | double |
|
| Default: | -999 |
|
| overwrite |
| Overwrite (unprompted) pre-existing output file?
| |
| allowed: | bool |
|
| Default: | false |
|
Example
"""
# print "\t----\t toASCII Ex 1 \t----" ia.maketestimage() ok = ia.toASCII(’myfile.ascii’, overwrite=true) ia.close() ia.fromascii(’image.im’,’myfile.ascii’, shape=[113,76], overwrite=true) ia.toASCII(’myfile2.ascii’,overwrite=true) #!diff myfile.ascii myfile2.ascii # """ |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2007 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.