About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/xpagetb.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 xpagetb Context: xpa

Synopsis

Retrieve binary data from one or more XPA servers.

Syntax

XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd )
XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd,
String_Type max_rec )
XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd,
String_Type max_rec, String_Type mode )

Return values: (Array_Type results, Array_Type names, Array_Type
messages)

Description

The XPAGetB() function is used to retrieve binary data from one or more XPA servers. It is the same as the XPAGet() function except that the results are returned as an arry of BString_Type variables reather than String_Type.

Example

chips> system ("ds9 &")
chips> xpaset ("ds9", "file new stars.fits")
1
chips> ( res, , ) = XPAGetB (XPAOpen(), "ds9", "array")
chips> image = bstring_to_array (res[0])

Here we start up ds9, tell it to open a file - called stars.fits, and then get the image data useing XPAGetB(). The bstring_to_array() function from the S-Lang Run-Time Library is used to convert the returned value (res[0]) into an array of unsigned characters (image). This array could be manipulated - e.g.

image[ where (image > 20) ] = 20;

and then sent back to ds9 for display using xpaset().

CHANGES IN CIAO 3.2

This function is new to CIAO 3.2.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.