- ←Prev
- AST
A Library for Handling
World Coordinate Systems
in Astronomy - Next→
- TOC ↑
Description:
A
CmpRegion is a
Region which allows two component Regions (of any class) to be
combined to form a more complex Region. This combination may be performed a
boolean AND, OR or XOR (exclusive OR) operator. If the AND operator is used,
then a position is inside the CmpRegion only if it is inside both of its two
component Regions. If the OR operator is used, then a position is inside the
CmpRegion if it is inside either (or both) of its two component Regions. If the XOR
operator is used, then a position is inside the CmpRegion if it is inside one
but not both of its two component Regions. Other operators can be formed by
negating one or both component Regions before using them to construct a new
CmpRegion.
The two component Region need not refer to the same coordinate Frame, but it must be
possible for the astConvert function to determine a Mapping between them (an error will
be reported otherwise when the CmpRegion is created). For instance, a CmpRegion may
combine a Region defined within an ICRS SkyFrame with a Region defined within a
Galactic SkyFrame. This is acceptable because the SkyFrame class knows how to convert
between these two systems, and consequently the astConvert function will also be able
to convert between them. In such cases, the second component Region will be
mapped into the coordinate Frame of the first component Region, and the Frame
represented by the CmpRegion as a whole will be the Frame of the first component
Region.
Since a CmpRegion is itself a Region, it can be used as a component in forming further
CmpRegions. Regions of arbitrary complexity may be built from simple individual Regions
in this way.
Constructor Function
Inheritance
The CmpRegion class
inherits from the Region class.
Attributes
The CmpRegion class does not define any
new attributes beyond those which are applicable to all Regions.
Functions
The
CmpRegion class does not define any new functions beyond those which are applicable to
all Regions.
Copyright (C) 2017 East Asian Observatory
- ←Prev
- AST
A Library for Handling
World
Coordinate Systems
in Astronomy - Next→
- TOC ↑