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


ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


editlab

Printer Friendly View | TOC | Home

Modifies cube labels

Overview Parameters Example 1 Example 2 Example 3 Example 4 Example 5 Example 6

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:
  • labels

Related Objects and Documents

Applications


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.

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
X

Files: FROM


Description

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

Type filename
File Mode input
Filter *.cub *.pvl
Close Window
X

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
Close Window
X

Input Values: GRPNAME


Description

Group that is being added, deleted, or modified.

Type string
Close Window
X

Input Values: KEYWORD


Description

Keyword that is being added, deleted, or modified.

Type string
Close Window
X

Input Values: VALUE


Description

The value of the Keyword being added or modified.

Type string
Close Window
X

Input Values: UNITS


Description

The units associated with the Keyword being added or modified.

Type string
Internal Default none
Close Window
X

Input Values: TEMPFILE


Description

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

Type filename
File Mode input
Close Window
X

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
Close Window

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

Links open in a new window.

        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

Links open in a new window.
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

Links open in a new window.
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

Links open in a new window.
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

Links open in a new window.
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

Links open in a new window.
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