Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | regionmanager |
tablename | in | The table | |
Allowed: | Image tool, table tool or String | ||
verbose | in | Report successful restores | |
Allowed: | T or F | ||
Default: | T | ||
regionname | in | Name of the region to restore | |
Allowed: | String |
This function restores a region from an AIPS++ Table to the global name space of Glish.
For the tablename argument, you can specify an image tool, a table tool, or a string. If you give a string, it should be the name of an existing AIPS++ table on disk (any kind of table).
You can use the function namesintable to find out the names of the regions in the Table.
- im := image('hcn') - names := drm.namesintable(im) for (i in 1:length(names)) { + cmd := spaste(names[i], ' := drm.fromtabletoglobal(im, regionname=\'', names[i], '\')') + print 'cmd=', cmd + eval(cmd) + } cmd= x1 := drm.fromtabletoglobal(im, regionname='x1') Successful restore of region x1 cmd= x2 := drm.fromtabletoglobal(im, regionname='x2') Successful restore of region x2
We find out the names of the regions in the Table, and then restore them in a loop with the Glish command eval; it creates the region with the name given in the array names. Because the output region name is not known to the function fromtabletoglobal, it cannot prompt for confirmation if the symbol already exists in Glish. That's your job.