imhistory

imhistory(imagename, mode='list', verbose=True, origin='imhistory', message='')[source]

Retrieve and modify image history

[Description] [Examples] [Development] [Details]

Parameters
  • imagename (path) - Name of the input spectral line image

  • mode (string=’list’) - Mode to run in, “list” to retrieve history, “append” to append a record to history.

    mode = list
    • verbose (bool=True) - Write history to logger if mode=”list”?

    mode = append
    • origin (string=’imhistory’) - Origin of appended message. Only used for mode=”append”.

    • message (string=’’) - Message to append. Only used of mode=”append”.

Description

This task prints out the history information contained in the image file.

The task provides access to the logtable of an image, where generally history information is stored, and prints out the history information (for each of the supported formats). Two operation modes are supported. When mode=”list”, the history messages are returned as an array of strings. If verbose=True, this information is also written to the logger. When mode=”append”, a specified message, along with its specified origin, are appended to the logtable and True is returned if successful.

Examples
# get image history, print to log window, and store as an array of
# strings in variable x
x = imhistory("my.im", mode="list", verbose=True)

# append a message
imhistory("my.im", origin="myorigin", message="ETI signal found in this image!", mode="append")
Development

No additional development details

Parameter Details

Detailed descriptions of each function parameter

imagename (path) - Name of the input (CASA or FITS) image
Default: none
Example: imagename=’ngc5921.im’
mode (string='list') - Operating mode.
Default: ‘list’ (retrieve history)
Options: ‘list|append’ (‘append’ to append a
record to history)
verbose (bool=True) - Write history to logger if mode=”list”?
Subparameter of mode=’list’
Default: True
Options: True|False
origin (string='imhistory') - Origin of appended message.
Subparameter of mode=’append’
Default: ‘imhistory’
The user can specify any string. This string will
appear as a tag at the start of the appended line
in the image history. Only used for mode=”append”.
message (string='') - Message to append.
Subparameter of mode=’append’
Default: none
Only used of mode=”append”.