imhistory
- imhistory(imagename, mode='list', verbose=True, origin='imhistory', message='')[source]
Retrieve and modify image history
[Description] [Examples] [Development] [Details]
- Parameters
- Returns
history (list) - list history entries from the image
- 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) imageDefault: noneExample: imagename=’ngc5921.im’mode (string='list')
- Operating mode.Default: ‘list’ (retrieve history)Options: ‘list|append’ (‘append’ to append arecord to history)verbose (bool=True)
- Write history to logger if mode=”list”?Subparameter of mode=’list’Default: TrueOptions: True|Falseorigin (string='imhistory')
- Origin of appended message.Subparameter of mode=’append’Default: ‘imhistory’The user can specify any string. This string willappear as a tag at the start of the appended linein the image history. Only used for mode=”append”.message (string='')
- Message to append.Subparameter of mode=’append’Default: noneOnly used of mode=”append”.