

procedure myeng2tab(input,output)
file input = "" {prompt="Images containing encoded data"}
file output = "" {prompt="Table of extracted data"}
bool help {no,prompt="Print list of items instead of running eng2tab"}
string items {"*",prompt="Items to extract"}
begin
string in, out
string def, cols
string ext
in = input; out = output; cols = items
if (!defpac ("ctools"))
error (1, "The ctools package must be loaded to run eng2tab")
if (!access(out)) {
fparse (in, verbose=no)
ext = fparse.extension
if (ext == ".x0h")
def="ctools$eng2tab/ghrs_x0h_def.db"
else if (ext == ".ulh")
def="ctools$eng2tab/ghrs_udl_def.db"
else if (ext == ".shh")
def="ctools$eng2tab/ghrs_shp_temps_def.db"
else
error (1, "Only x0h, ulh, and shh files are valid input to this script.")
if (help) {
match ("^begin", def) | tproj ("","STDOUT",col="c2")
return
}
eng2tab(in,out,def,items=cols,defext="",format=yes)
} else
error (1, "Output exists or STDOUT. Please name a new output file")
tchcol (out,"file","","%-20s","",verb+)
end
# input = "z*.ulh" Images containing encoded data
# output = "eng2tabout" Table of extracted data
# definition = "ctools$eng2tab/ghrs_udl_def.db" Bit field definition table
# (items = "*") Items to extract
# (defext = "") Default extension for input files
# (format = yes) Format the output table?
# (Version = "11Jan95") Date of installation
# (mode = "ql")
Source Code · Search Form · STSDAS
Maintained by the Science Software Group at STScI
This file last updated on 10 Mar 2011