Source
1641
1641
ia.shape()
1642
1642
ia.done()
1643
1643
1644
1644
"""
1645
1645
1646
1646
</example>
1647
1647
</method>
1648
1648
1649
1649
1650
1650
<method type="function" name="fromascii">
1651
-
<shortdescription>This function converts a pre-existing ascii file into a \casa\ image. </shortdescription>
1651
+
<shortdescription>THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN THE NEAR FUTURE. This function converts a pre-existing ascii file into a \casa\ image. </shortdescription>
1652
1652
1653
1653
<input>
1654
1654
1655
1655
<param type="string" name="outfile">
1656
1656
<description>Output image file name. Default is unset.</description>
1657
1657
<value></value>
1658
1658
</param>
1659
1659
1660
1660
<param type="string" name="infile">
1661
1661
<description>Input ascii disk file name. Must be specified..</description>
1683
1683
<value>false</value>
1684
1684
</param>
1685
1685
1686
1686
<param type="bool" name="overwrite">
1687
1687
<description>Overwrite (unprompted) pre-existing output file?</description>
1688
1688
<value>false</value>
1689
1689
</param>
1690
1690
</input>
1691
1691
<returns type="bool"/>
1692
1692
<description>
1693
+
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN THE NEAR FUTURE. YOU SHOULD USE
1694
+
ANOTHER SET OF METHODS, SUCH AS tofits()/fromfits() TO EXPORT AND IMPORT CASA
1695
+
IMAGES. IF YOU SIMPLY WANT TO MODIFY IMAGE PIXEL VALUES, USE
1696
+
getchunk()/putchunk() OR getregion()/putregion() to do that.
1693
1697
1694
1698
This function is used to create a \casa\
1695
1699
image from a pre-existing ASCII file. You might want to use this if you
1696
1700
just want to create a quick image to use to see what various image analysis methods
1697
1701
do. The image analysis tool on
1698
1702
which the method is called will always reference the created image if
1699
1703
this method is successful. Thus, calling open() on that tool is not necessary, but
1700
1704
if the tool is already open, referencing another image, that reference will be
1701
1705
silently destroyed and replaced with a reference to the image created by
1702
1706
fromascii().
10389
10393
# Write as scaled 16 bit integers
10390
10394
ia.close()
10391
10395
#
10392
10396
"""
10393
10397
10394
10398
</example>
10395
10399
</method>
10396
10400
10397
10401
10398
10402
<method type="function" name="toASCII">
10399
-
<shortdescription>Convert the image to an ASCII file</shortdescription>
10403
+
<shortdescription>THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN THE NEAR FUTURE. Convert the image to an ASCII file</shortdescription>
10400
10404
10401
10405
<input>
10402
10406
10403
10407
<param type="string" name="outfile">
10404
10408
<description>ASCII file name.
10405
10409
Default is input name + '.ascii'.</description>
10406
10410
</param>
10407
10411
<param type="any" name="region">
10408
10412
<any type="variant" limittypes="record string"/>
10409
10413
<description>Region selection. Default is to use the full image.</description>
10435
10439
<description>Overwrite (unprompted) pre-existing output file?</description>
10436
10440
<value>false</value>
10437
10441
</param>
10438
10442
<param type="bool" name="stretch">
10439
10443
<description>Stretch the mask if necessary and possible? Default False</description>
10440
10444
<value>false</value>
10441
10445
</param>
10442
10446
</input>
10443
10447
<returns type="bool">T or fail</returns>
10444
10448
<description>
10449
+
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN THE NEAR FUTURE. YOU SHOULD USE
10450
+
ANOTHER SET OF METHODS, SUCH AS tofits()/fromfits() TO EXPORT AND IMPORT CASA
10451
+
IMAGES. IF YOU SIMPLY WANT TO MODIFY IMAGE PIXEL VALUES, USE
10452
+
getchunk()/putchunk() OR getregion()/putregion() to do that.
10445
10453
10446
10454
This function converts the image into an ascii file. The format is one
10447
10455
image row per line (see
10448
10456
<link anchor="images:image.fromascii.constructor">fromascii</link>).
10449
10457
10450
10458
The output mask is the combination (logical OR) of the default input
10451
10459
\pixelmask\ (if any) and the OTF mask. Because the mask is not
10452
10460
transferred to the ascii file, you must specify what data value to use
10453
10461
if a pixel is masked. By default, the underlying data value in the
10454
10462
image is used. But this could be anything (and often it's a NaN), so you