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/stackio_stk_expand_n.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 stk_expand_n Context: stackio

Synopsis

Create a numbered stack of N elements.

Syntax

Stack_Type stk_expand_n( String_Type stackstring, Integer_Type N )

Description

This routine creates a stack of N elements where each element is consecutively numbered from 1 to N. The stackstring argument should contain the "#" character, which will be replaced by the number 1, 2, 3, ..., N. These numbers will be padded by leading "0" characters to ensure that each string in the stack has the same length.

Note that only the first # character in stackstring will be expanded.

Example

chips> stk = stk_expand_n( "spec#.pi", 11 )
chips> stk_disp( stk )
------
Stack position: 0
Stack size: 11
Stack allocated: 11
Stack entries:
1 :spec01.pi:
2 :spec02.pi:
3 :spec03.pi:
4 :spec04.pi:
5 :spec05.pi:
6 :spec06.pi:
7 :spec07.pi:
8 :spec08.pi:
9 :spec09.pi:
10 :spec10.pi:
11 :spec11.pi:
------

Bugs

See the bugs page for the stackio library on the CIAO website for an up-to-date listing of known bugs.

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.