ITOOL_TEMPLATE__DEFINE
Class Name
itool_template
Purpose (one Line)
Plots profiles of an extracted array of data.
Description
This object class implements itool templates, which are used by itool
itself and by The Template Manager.
The Template Manager is a stand-alone GUI, which may be launched from a
button in itool. Communication of data between itool and The
Template Manager is important and is achieved through the use of IDL
pointer variables. Specifically, itool and The Template Manager have
access to each other's object references.
The purpose of the "itool_template" object class is to store itool
template data and to provide method routines for operating on those data.
The primary data that are maintained in an instance of an itool
template are the image (device) coordinates of key locations in that
image. These locations are identified by the user of itool and are
referred to as template "objects," meaning stars or planetary objects
that appear on an image taken with a CCD camera mounted on a telescope.
An itool photometry template keeps track of the locations of objects
in an image, as their positiions shift from one exposure to another. As
exposures are collected, preliminary photometry for the objects identified
in a template may be computed and saved during the course of an observation
run.
Category
Widgets
Superclasses
Subclasses
Creation
See itool_template::init
Methods
itool_template::cleanup
itool_template::print
itool_template::fmt
itool_template::addobject
itool_template::updateobjects
itool_template::deleteobject
itool_template::purgeobjects
itool_template::getproperty
itool_template::changeobjectname
itool_template::setproperty
itool_template::init
Modification History
2004, Mar. Written by Doug Loucks, consultant for Lowell Observatory.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::cleanup
Purpose
Self-explanatory
Calling Sequence
obj_destroy, oref
Inputs
oref : An itool_template object reference.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::print
Purpose
To print a template to standard output, or to a file.
Calling Sequence
oref->print
Inputs
Optional Inputs
Keyword Parameters
LUN : Set this keyword to the logical unit number of the file to
be written. If absent, output will go to IDL's standard output.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::fmt
Purpose
To format a list of objects for printing.
Calling Sequence
result = oref->fmt()
Inputs
Optional Inputs
Keyword Parameters
Outputs
result : A string array containing the formatted list of objects. If
the object list is empty, a null string is returned.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::addobject
Purpose
To add a new object to the list of objects.
Calling Sequence
oref->addobject, x, y
Inputs
x, y : the image (device) coordinates of the new object.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::updateobjects
Purpose
To add a new set of objects, replacing the existing set of objects.
Calling Sequence
oref->updateobjects, new, objnam, x, y
Inputs
new : a flag array, indicating "new" status for each object.
objnam : a string array of object names.
x, y : arrays of x and y coordinates of the objects.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::deleteobject
Purpose
To delete a selected object from the object list.
Calling Sequence
oref->deleteobject
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::purgeobjects
Purpose
To purge the objects in the object list.
Calling Sequence
oref->purgeobjects
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::getproperty
Purpose
To retrieve "properties" defined for the itool_template object
class. Properties are specified as keyword arguments.
Calling Sequence
oref->getproperty
Inputs
Optional Inputs
Keyword Parameters
MODE : Set this keyword to a named variable in which the mode of
the template will be returned. The mode of a selected template
controls the behavior of a "left click" in itool's main draw
widget. Two settings are possible: "Add Objects" or
"Active Template Photometry," which are stored as 0 and 1,
respectively and are selected via a combobox widget.
If the mode is "Add Objects," new "objects" are added to a
selected template, as the user "left-clicks" in the main draw
widget. If the mode is "Active Template Photometry," left-clicking
in the main draw widget launches photometric calculations for the
"objects" in a template. The default mode for a new instance of a
template is "Add Objects."
MODIFIED : Set this keyword to a named variable in which the modified
flag for the template will be returned.
NUMOBJ : Set this keyword to a named variable in which the number
of objects in the template will be returned.
OBJ_SELECTED : Set this keyword to a named variable in which the index
of the currently-selected object will be returned.
NEW : Set this keyword to a named variable in which the array
of "new" flags will be returned.
OBJNAM : Set this keyword to a named variable in which the array
of object names will be returned.
X, Y : Set these keywords to named variables in which the
x and y coordinates of the objects will be returned.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::changeobjectname
Purpose
To change the name of an object that is highlighted (selected).
Calling Sequence
oref->changeobjectname, objnam
Inputs
objnam : the new name to be given to the selected object.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::setproperty
Purpose
To set "properties" defined for the itool_template object class.
Properties are specified as keyword arguments.
Calling Sequence
oref->setproperty
Inputs
Optional Inputs
Keyword Parameters
MODE : the mode of the template (see getproperty for details).
NAME : the name of the template.
OBJ_SELECTED : the index of the selected object. A value of -1 indicates
that no object is selected.
OBJNAM : the name of the selected object.
-----------------------------------------------------------------------------
METHOD NAME:
itool_template::init
Purpose
To initialize a new instance of the itool_template object class.
Calling Sequence
oref = obj_new('itool_template', templatename, new, objnam, x, y)
Inputs
templatename ; The name of the new template.
new ; An array of flags for the objects.
objnam ; An array of names for the objects.
x ; An array of x-coordinates for the objects.
y ; An array of y-coordinates for the objects.
Optional Inputs
Keyword Parameters
Outputs
oref = The object reference of the new instance of the itool_template
object class.
Optional Outputs
Common Blocks
Side Effects
Restrictions
Procedure
After creating a new instance of this object-oriented widget application,
it must be realized.
Example
oref = obj_new('itool_template', oitool, GROUP_LEADER=group_leader)
oref->realize
-----------------------------------------------------------------------------