Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Public Release
8.3.0
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
USGS

ISIS Application Documentation


editlab

Standard View | TOC | Home

Modifies cube labels

Description
Categories
Groups
Examples
History


Description

This program is designed to make modifications to various objects and groups found in ISIS cube labels, but a .pvl file can also be used. When a PVL is used, an interim processing file will be created, which you can later remove. Using either file type, you can add/delete or modify keywords in a group (e.g.: 2, 3, 5), or add or remove entire groups (e.g.: 1, 6) within the labels. For simplicity's sake, use a template (e.g.: 4) to modify labels, as this makes it unnecessary to run the program multiple times when adding new groups. Examples can be found at the end of this document.

Categories


Related Applications to Previous Versions of ISIS

This program replaces the following application existing in previous versions of ISIS:

Related Objects and Documents

Applications


Parameter Groups

Files

Name Description
FROM Pvl file containing the label to be modified

Modification Options

Name Description
OPTIONSOptions for modifying label

Input Values

Name Description
GRPNAMEGroup to modify
KEYWORDKeyword to modify
VALUEValue of Keyword being modified
UNITSUnits of Keyword being modified
TEMPFILETemplate file being added to label
COMMENTComment to be added to the change

Files: FROM

Description

The pvl or cube file containing the label to be modified.

Type filename
File Mode input
Filter *.cub *.pvl

Modification Options: OPTIONS

Description

A list of the different types of modifications allowed on the label.

Type string
Default SETKEY
Option List:
Option Brief Description
ADDGAdd Group Adds a group to the file label.

Exclusions

  • KEYWORD
  • VALUE
  • UNITS
  • TEMPFILE

Inclusions

  • GRPNAME
DELGDelete Group Deletes specified group from the file label.

Exclusions

  • KEYWORD
  • VALUE
  • UNITS
  • TEMPFILE
  • COMMENT

Inclusions

  • GRPNAME
ADDKEYAdd Keyword Adds a keyword to the specified group in the file label.

Exclusions

  • TEMPFILE

Inclusions

  • GRPNAME
  • KEYWORD
  • VALUE
DELKEYDelete Keyword Deletes specified keyword from the specified group on the file label.

Exclusions

  • VALUE
  • UNITS
  • TEMPFILE
  • COMMENT

Inclusions

  • GRPNAME
  • KEYWORD
MODKEYModify Keyword Modifies existing keyword in specified group on the file label.

Exclusions

  • TEMPFILE

Inclusions

  • GRPNAME
  • KEYWORD
  • VALUE
SETKEYSet Keyword: deletes duplicates Adds or modifies an existing keyword to the specified group in the file label. If there are duplicates of the provided keyword, all duplicates are removed from the group, leaving only the new, provided value.

Exclusions

  • TEMPFILE

Inclusions

  • GRPNAME
  • KEYWORD
  • VALUE
ADDTEMPAdd Template File Adds a template file to the file label.

Exclusions

  • GRPNAME
  • KEYWORD
  • VALUE
  • UNITS
  • COMMENT

Inclusions

  • TEMPFILE

Input Values: GRPNAME

Description

Group that is being added, deleted, or modified.

Type string

Input Values: KEYWORD

Description

Keyword that is being added, deleted, or modified.

Type string

Input Values: VALUE

Description

The value of the Keyword being added or modified.

Type string

Input Values: UNITS

Description

The units associated with the Keyword being added or modified.

Type string
Internal Default none

Input Values: TEMPFILE

Description

Adds the PvlGroups defined within the template file to the cube's labels.

Type filename
File Mode input

Input Values: COMMENT

Description

When adding or modifying a PvlGroup or PvlKeyword, then this comment is added to that altered PvlGroup or PvlKeyword.

Type string
Internal Default none

Examples


Example 1

Adding a group

Description

This example uses the editlab application to add a new group to a previously blank label. The new group created will be empty.

Command Line

editlab from=new.cub option=addg grpname=NewGroup
Run the editlab application to add a group to a label

Data Files


        Starting Label
        
Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object
End_Object
End
        
Label after the command line is ran
Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
  End_Group
End_Object
End
      

Example 2

Adding a keyword

Description

This example uses the editlab application to add a keyword to the empty group created in the last example.

Command Line

editlab from=new.cub option=addkey grpname=NewGroup keyword=Keyword value=new
Run the editlab application to add a keyword to an existing group

Data File

Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
    Keyword = new
  End_Group
End_Object
End
        

Example 3

Modifying a keyword

Description

This example uses the editlab application to modify the keyword created in the previous example to change its value.

Command Line

editlab from=new.cub option=modkey grpname=NewGroup keyword=Keyword value=old
Run the editlab application to modify a preexisting keyword

Data File

Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
    Keyword = old
  End_Group
End_Object
End
        

Example 4

Adding a template file

Description

This example uses the editlab application to add more than one group (containing keywords) at a time by using a template file containing only groups and keywords to the label.

Command Line

editlab from=new.cub option=addtemp tempfile=template1.txt
Run the editlab application to add a template file to the label

Data File

Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
    Keyword = old
  End_Group

  Group = test
    Key = insertme
  End_Group

  Group = TwoKeys
    Key1 = (1, 2, 3)
    Key2 = "a b c"
  End_Group
End_Object
End
        

Example 5

Deleting a keyword

Description

This example uses the editlab application to erase a keyword added by the template file in example 4.

Command Line

editlab from=new.cub option=delkey grpname=TwoKeys keyword=Key1
Run the editlab application to delete a keyword

Data File

Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
    Keyword = old
  End_Group

  Group = test
    Key = insertme
  End_Group

  Group = TwoKeys
    Key2 = "a b c"
  End_Group
End_Object
End
        

Example 6

Deleting a group

Description

This example uses the editlab application to delete a group from a label. Deleting a group will also delete any keywords inside of the group.

Command Line

editlab from=new.cub option=delg grpname=TwoKeys
Run the editlab application to delete a group

Data Files

template1.txt
Group = test
  Key = insertme
End_Group

Group = TwoKeys
  Key1 = ( 1, 2, 3)
  Key2 = "a b c"
End_Group
        
Label
Object = Label
  Bytes = 65536
End_Object

Object = IsisCube
  Object = Core
    /* Location of the core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 128
    TileLines   = 128

    Group = Dimensions
      Samples = 1024
      Lines   = 1024
      Bands   = 7
    End_Group

    Group = Pixels
      Type       = Real
      ByteOrder  = LSB
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = NewGroup
    Keyword = old
  End_Group

  Group = test
    Key = insertme
  End_Group
End_Object
End
        

History

Elizabeth Ribelin2005-01-13 Original version
Elizabeth Miller2005-10-27 Fixed appTest
Elizabeth Miller2006-05-08 Fixed xml issues
Brendan George2006-09-26 Documentation fixes
Christopher Austin2008-04-18 Added Comment allocation and fixed documentation.
Christopher Austin2011-03-08 Added the SETKEY parameter to prevent non-explicit duplicate keywords, greatly cleaned and reduced code, and added support for non-cube Pvls.
Jeannie Backer2012-12-20 Modified to update history in the labels and show appropriate files in the dialog box for choosing FROM parameter filenames. Fixes #655. Fixes #1084
Andrew Stebenne2015-04-03 Modified the description to indicate that editlab always adds a blank cube to a pvl if one isn't present.
Andrew Stebenne2015-04-24 Reworked documentation for clarity.