![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaDocument | |||
1.1.1 Get value of image and mask at specified pixel coordinate
Description
This function gets the value of the image and the mask at the specified pixel
coordinate. The values are returned in a record with fields ’value’, ’mask’ and
’pixel’. The value is returned as a quantity, the mask as a Bool (T is good).
The ’pixel’ field holds the actual pixel coordinate used.
If the specified pixel coordinate is off the image, ”{}” is returned.
Excessive elements in pixel are silently discarded. Missing elements are given the (nearest integer) value of the reference pixel. This is reflected in the output record ’pixel’ field.
Arguments
| Inputs |
| ||
| pixel |
| Pixel coordinate
| |
| allowed: | intArray |
|
| Default: | -1 |
|
Example
"""
# print "\t----\t pixelvalue Ex 1 \t----" ia.maketestimage(); ia.pixelvalue() #{’mask’: True, # ’pixel’: array([55, 37]), # ’value’: {’unit’: ’Jy/beam’, ’value’: 2.5064315795898438}} print ia.pixelvalue([-1,-1]) # {} print ia.pixelvalue([9]) #{’mask’: True, # ’pixel’: array([ 9, 37]), # ’value’: {’unit’: ’Jy/beam’, ’value’: 0.14012207090854645}} print ia.pixelvalue([9,9,9]) #{’mask’: True, # ’pixel’: array([9, 9]), # ’value’: {’unit’: ’Jy/beam’, ’value’: -0.45252728462219238}} ia.close() # """ |
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.