Image_BDP — Image data base.¶
This module defines the Image_BDP class.
-
class
admit.bdp.Image_BDP.
Image_BDP
(xmlFile=None, **keyval)[source]¶ MultiImage Basic Data Product
Image base class for use in BDP’s. BDP’s that contain images should inherit from this class. In the instance where more than one image is needed then the class should instantiate instances of the Image class directly.
Parameters: xmlFile : string
Output XML file name.
keyval : dictionary
Dictionary of keyword value pairs.
Attributes
image (Image) An Image class to hold the data. Methods
addimage
(image[, name])Method to add an image to the class baseDir
([path])Get/set project base directory. delete
([delfiles])Method to delete the BDP. get
(key)Access an attribute. getdir
()Method to get the subdirectory(s) of the current BDP relative to the ADMIT working directory. getfiles
()Return the filename(s) associated with the basic data in a BDP. getimage
([imtype, name])Method to get a specific image type from the class getimagefile
([imtype, name])Method to get the requested image file name from the named instance haskey
(key)Query if a key exists for an BDP. isequal
(bdp)Tests for equality with another BDP. report
()Report BDP properties in human readable format. setkey
([name, key])Sets keyword value(s). show
()Show the xmlFile name. update
(new_state)Updates BDP state. write
([xmlFile])Writes the BDP to an XML file. -
addimage
(image, name='')[source]¶ Method to add an image to the class
Parameters: image : Image
The image instance to add
name : str
The name of the image, must be unique within the BDP instance Default: “”
Returns: None
-
getimage
(imtype=None, name='')[source]¶ Method to get a specific image type from the class
Parameters: image : string
The name of the image to get
Returns: The requested Image or None if it does not exist
-
getimagefile
(imtype='CASA', name='')[source]¶ Method to get the requested image file name from the named instance
Parameters: imtyp : string
Can be any of the following: bdp_types.AUX to retrieve the auxiliary file, bdp_types.THUMB to retrieve the thumbnail, or a file format (e.g. bdp_types.FITS) to retrieve the requested format of the main image. If the requested image does not exist then None is returned.
name : str
The name if the image instance to get. Default : “”
Returns: String containing the image name, or None if it does not exist
-