Spatial contrast sensitivity testing with attenuator

Hi,

We are doing a project on age related changes in central and
peripheral contrast sensitivity functions.
We plan to conduct monitor based contrast sensitivity experiments.
Consequently we are trying to create a programme for measuring the
contrast sensitivity using MATLAB. In order to increase the contrasts
we are using Pelli-Zhang video attenuator. We had built a Pelli-Zhang
attenuator for this purpose and the experiment monitor was calibrated
with and without the attenuators.
Our problem now is in creating a colormap using the LUT files we
have obtained after the calibrations. We have a problem in executing
the algorithm mentioned in the article "Accurate control of contrast
on microcomputer displays", Pelli and Zhang, Vision Research (1991),
Vol 31 (7/8), 1337-1350.
We would be very grateful to you if any of can give us any
guidelines or share any programme codes you might have designed which
would be useful for us to overcome this problem.