XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


selectlib (selectlib-4.77) [xmmsas_20230412_1735-21.0.0]

Subexpressions in table attributes

Table attributes being referred to in the selection expression via their names preceded by a hash mark ('#') are actually not restricted to contain numeric constants only. In fact the values interpreted as strings can contain anything (including references to other attributes), for instance, to define convenient abbreviations for frequently used constructs. All table attributes will get replaced by their respective values which must yield a valid boolean selection expression. Otherwise a fatal error condition will be raised. Example: If a table contains the attributes:
RAWXSQ  = '(RAWX-1)**2'             / RAWX squared
   RAWYSQ  = '(RAWY-1)**2'             / RAWY squared
   DIST    = 'sqrt(#RAWXSQ + #RAWYSQ)' / distance from center
   DISTSEL = '#DIST <= 128'            / select events in circle r=128
the selection expression
#DISTSEL
can be used as an alternative to the full form
sqrt((RAWX-1)**2 + (RAWY-1)**2) <= 128



XMM-Newton SOC -- 2023-04-16