Documentation for pp_lib

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

pp_setcubeheadervalue.pro


Routines

top source pp_setcubeheadervalue

pp_setcubeheadervalue, header [, key] [, value] [, append=append]

Sets the value of the given key from the given header in ISIS cube format. If value is not provided, the key is erased from the header. If append is given, its contents are just inserted into the header, without affecting the rest of its contents (and value and key are ignored).

Parameters

header in required

A string array where each element is one line of an ISIS cube.

key in optional

A string scalar with the key to be set. Regular expression metacharacters must be escaped.

value in optional

A scalar of vector of any type (it gets converted to string) with the value(s) to set the key to. If absent and a key is given, that key is erased (if found) from the header.

Keywords

append in optional

A string scalar or array of lines to be inserted into the header. If provided, key and value are ignored. No processing is done on the given lines, it is the user's responsability to ensure they are valid.

Examples

Make a simple example header:

head=strarr(5) head[0]='CCSD3ZF0000100000001NJPL3IF0PDS200000001 = SFDU_LABEL' head[1]='BAND_SUFFIX_NAME = (LATITUDE,LONGITUDE,SAMPLE_RESOLUTION,LINE_RESOLUTION,' head[2]='PHASE_ANGLE,INCIDENCE_ANGLE,EMISSION_ANGLE,NORTH_AZIMUTH)' head[3]='START_TIME = "2007-084T10:00:57.286Z"' head[4]='END'
Change the START_TIME:
pp_setcubeheadervalue,head,'START_TIME','UNKNOWN' print,head,format='(A0)' ;CCSD3ZF0000100000001NJPL3IF0PDS200000001 = SFDU_LABEL ;BAND_SUFFIX_NAME = (LATITUDE,LONGITUDE,SAMPLE_RESOLUTION,LINE_RESOLUTION, ;PHASE_ANGLE,INCIDENCE_ANGLE,EMISSION_ANGLE,NORTH_AZIMUTH) ;START_TIME = UNKNOWN ;END

Author information

Author:

Paulo Penteado (pp.penteado@gmail.com), Oct/2009

Other attributes

Uses:

pp_getcubeheadervalue, pp_extractfields

Statistics

Lines:
49 lines
Cyclomatic complexity:
15
Modified cyclomatic complexity:
12

File attributes

Modification date: Fri Apr 25 01:37:03 2014
Lines: 49
Docformat: rst rst