Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions

Public Release
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0

ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


getkey

Standard View | TOC | Home

Outputs the value of a requested keyword

Description
Categories
Groups
History


Description

This program will output the value of a requested keyword. Its general use is within batch jobs, perl programs, or other scripting languages. It allows the script writer to easily obtain values from cube labels or other label-like files such as those output by programs like stats, percent, etc.

Categories


Parameter Groups

Files

Name Description
FROM Filename of a label file

Selection

Name Description
OBJNAME Object name containing the group or keyword
GRPNAME Group name containing the keyword
KEYWORD Keyword name
KEYINDEX Index in keyword to return

Options

Name Description
UPPER Convert results to uppercase
RECURSIVE Recursively searches for keyword

Files: FROM

Description

The file specification containing the input label.

Type cube
File Mode input
Filter *.cub

Selection: OBJNAME

Description

Enter the name of the Object which contains the group or keyword. If the keyword is not in an Object then ignore this parameter. The name is case insensitive.

Type string
Internal Default Root

Selection: GRPNAME

Description

Enter the name of the Group which contains the keyword.

Type string
Internal Default Root

Selection: KEYWORD

Description

Enter the name of the keyword.

Type string

Selection: KEYINDEX

Description

If the keyword is a list, you may enter an integer value for the index of the keyword value you would like to retrieve. The default is 'All' and will return the entire list of keyword values.

Type integer
Internal Default All
Minimum 1 (inclusive)

Options: UPPER

Description

If set this parameter causes all character output to be in uppercase.

Type boolean
Default False

Options: RECURSIVE

Description

If set it will search recursively, however if an object name is specified it will recursively search for that object and then recursively search inside only that object.

Type boolean
Default False

History

Jeff Anderson2002-10-25 Original version
Kim Sides2003-05-13 Added application test
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Jeff Anderson2004-03-29 Change parameter from GROUP to GRPNAME because of conflicts in the print and history files (keyword named GROUP in a GROUP). Added OBJNAME and UPPER parameters.
Brendan George2005-11-03 Fixed application test
Elizabeth Miller2006-05-09 Added KEYINDEX param and fixed bug with list keywords. Also modified to output to the UI session log rather than the terminal window if the UI is open.
Elizabeth Miller2006-06-14 Fixed bug that did not allow you to get a keyword that was not in a group or object and reworked code to avoid the repetition of code
Elizabeth Miller2006-07-24 Added helper button to the FROM parameter to output the file.
Steven Koechle2007-08-14 Added recursive search option
Steven Koechle2008-03-05 Changed preferences to not output to terminal, and added results group to session log.
Christopher Austin2010-03-03 Made UPPER equal to FALSE by default
Steven Lambright2012-12-27 Fixed bug caused by #1312. The array output gained parenthesis on accident, these have been removed. A new test was added to ensure that this doesn't happen again. Fixes #1360.
Ra'ad Saleh2013-02-04 Fixed error in printing PVL values caused by line continuations. Fixes #1017.
Jacob2022-11-23 Changed FROM input type from filename to cube.