[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Author Index][Subject Index]

Checking pixel masks in tables



Hi,

 I work with SDSS data a lot and an important part of that is checking
whether a certain bit is set in a 32bit integer that's stored in a
table.
There don't seem to be bitwise AND and OR operators in MIDAS, so I use
things
like

comp/tab {p1} :firstcap = mod((:primtarget-mod(:primtarget,8))/8,2)

which results in a 1 or 0 depending on whether or not the 3rd bit (value
8) is
set in table column :primtarget. I then select on combinations of the
new
table columns.

But ideally, I would like to use bitwise operators directly in
select/table,
like
   select/table {p1} (:firstcap & (1|2|4|8)) .gt. 0
to select all objects which have at least one out of the first 4 bits
set in
:primtarget. Does anyone know a more efficient way of doing this? Are
there
any plans to add bitwise operators into MIDAS itself?

Sebastian Jester