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

Synopsis

stk_count is used to count the number of items in a stack. The output is to the stk_count parameter file.

Syntax

stk_count infile [count] [echo] [verbose]

Description

The stk_count program takes an infile string as input. The infile string can be defined in any variation that is accepted by the ASCDS stack API. These variations include the use of @ and added directory paths (ie. @/tmp/foo).

The output parameter is count. Count will hold the number of elements found in the stack defined by infile.

The level of verbosity is defined by the verbose parameter. The user can optionally set verbose from 0 (for not output) up to 3 (for the most output.)

Example 1

stk_count infile="one two three"

stk_count will build a stack from the string infile string "one two three" and output the number of items in the stack. In this case the number of stack items is 3.

Example 2

stk_count infile="@file.lis foo"

stk_count will build a stack from the string infile string "@file.lis foo" and output the number of items in the stack. If file.lis contains 5 lines, the number of stack items will be 6.

Example 3

stk_count infile="foo @/tmp/file.lis goo"

stk_count will build a stack from the string infile string "foo @file.lis goo" and output the number of items in the stack. If /tmp/file.lis contains 10 lines, the number of stack items will be 12.

Parameters

name type ftype def min max reqd stacks
infile file input       yes yes
count string         no  
echo boolean   no     no  
verbose integer   0 0 5 no  

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input stacks=yes)

The string used to build a stack.

The infile string can be defined in any variation that is accepted by the ASCDS stack API. These variations include the use of @ and added directory paths (ie. @/tmp/foo). Zero or more stacks may be used as input.

Parameter=count (string not required)

This is the tool output. Count holds the total number of elements derived from the infile parameter.

Parameter=echo (boolean not required default=no)

Echo value to screen?

Determines if the retrieved value is printed to the screen in addition to being stored in the parameter file.

Parameter=verbose (integer not required default=0 min=0 max=5)

Determines the level of output the user will see when the program is run.

Each level adds additional output. 0 - no output. 1 - shows non-hidden parameters. 2 - shows hidden parameters. 3 - gives the user information about which stage of the program is executing.

Bugs

See the bugs page for this tool 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.