From dd712be29ed9023a38a0786d2db7380e5baf6790 Mon Sep 17 00:00:00 2001
From: rivers
- For monochrome images (NDColorMode=NDColorModeMono) the simulation driver initially
- sets the image[i, j] = i*SimGainX + j*SimGainY * ADGain * ADAcquireTime * 1000.
- Thus the image is a linear ramp in the X and Y directions, with the gains in each
- direction being detector-specific parameters. Each subsquent acquisition increments
- each pixel value by ADgain*ADAcquireTime*1000. Thus if ADGain=1 and ADAcquireTime=.001
- second then the pixels are incremented by 1. If the array is an unsigned 8 or 16
- bit integer then the pixels will overflow and wrap around to 0 after some period
- of time. This gives the appearance of bands that appear to move with time. The slope
- of the bands and their periodicity can be adjusted by changing the gains and acquire
- times.
-
- For color images (NDColorMode=NDColorModeRGB1, RGB2 or RGB3) there are 3 images
- computed, one each for the red, green and blue channels. Each image is computed
- with the same algorithm as for the monochrome case, except each is multiplied by
- its appropriate gain factor (SimGainRed, SimGainGreen, SimGainBlue). Thus if each
- of these color gains is 1.0 the color image will be identical to the monochrome
- image, but if the color gains are different from each other then image will have
- color bands.
- For monochrome images, an array of gaussian peaks is produced. The user specifies the
- start location for the first peak in PeakStartX & PeakStartY. The size of the peak is
- controlled by PeakWidthX and PeakWidthY. The array is specified by giving the number of
- peaks in each direction with PeakNumX and PeakNumY and the step size between peak centroids
- with PeakStepX and PeakStepY. Note that data for each peak is only added to the image over a
- range of four times the PeakWidth in any direction (in the interest of speed).
-
- Dynamic behavior can be introduced into the system by changing PeakVariation and Noise
- records. PeakVariation introduces variation on each pixel in the array and Noise introduces
- variation in each pixel.
-
- The description for RGB images is the same as for the Linear Ramp. Pixels are computed the same way
- as for monochrome and there is a separate gain for each color.
-
- An array of Rings will be added later.
-
+ For monochrome images (NDColorMode=NDColorModeMono) the simulation driver initially
+ sets the image[i, j] = i*SimGainX + j*SimGainY * ADGain * ADAcquireTime * 1000.
+ Thus the image is a linear ramp in the X and Y directions, with the gains in each
+ direction being detector-specific parameters. Each subsquent acquisition increments
+ each pixel value by ADgain*ADAcquireTime*1000. Thus if ADGain=1 and ADAcquireTime=.001
+ second then the pixels are incremented by 1. If the array is an unsigned 8 or 16
+ bit integer then the pixels will overflow and wrap around to 0 after some period
+ of time. This gives the appearance of bands that appear to move with time. The slope
+ of the bands and their periodicity can be adjusted by changing the gains and acquire
+ times.
+
+ For color images (NDColorMode=NDColorModeRGB1, RGB2 or RGB3) there are 3 images
+ computed, one each for the red, green and blue channels. Each image is computed
+ with the same algorithm as for the monochrome case, except each is multiplied by
+ its appropriate gain factor (SimGainRed, SimGainGreen, SimGainBlue). Thus if each
+ of these color gains is 1.0 the color image will be identical to the monochrome
+ image, but if the color gains are different from each other then image will have
+ color bands.
+ For monochrome images, an array of gaussian peaks is produced. The user specifies
+ the start location for the first peak in PeakStartX & PeakStartY. The size of the
+ peak is controlled by PeakWidthX and PeakWidthY. The array is specified by giving
+ the number of peaks in each direction with PeakNumX and PeakNumY and the step size
+ between peak centroids with PeakStepX and PeakStepY. The amplitude of each peak
+ is controlled by SimGainX, SimGainY, and ADGain. If SimGainX=1, SimGainY=1, SimNoise=0,
+ and SimPeakHeightVariation=0 then the peak height is equal to ADGain, ADGain=255
+ would be appropriate for an 8-bit image. Note that data for each peak is only added
+ to the image over a range of four times the PeakWidth in any direction (in the interest
+ of speed).
+
+ Dynamic behavior can be introduced into the system by changing PeakVariation and
+ Noise records. PeakVariation introduces variation in the height of each peak in
+ the array and Noise introduces variation in each pixel.
+
+ The description for RGB images is the same as for the Linear Ramp. Pixels are computed
+ the same way as for monochrome and there is a separate gain for each color.
+
areaDetector Simulation driver
- May 19, 2010
+ August 8, 2011
Mark Rivers and John Hammonds
@@ -24,13 +24,12 @@
-
-
+
+
-
- SimImageType
+ SimMode
asynInt32
r/w
- Set the image type to be displayed. Options are:
-
-
-
-
- SIM_IMAGE_TYPE
-
- $(P)$(R)ImageType
-
- $(P)$(R)ImageType_RBV
- longout
-
- longin
-
- SimNoise
-
- asynInt32
-
- r/w
-
- Used to introduce randomness. Each affected pixel is assigned a scaling factor.
- scalingFactor = 1.0 + (rand()%noise +1)/100.0
+ Sets the simulation mode. Options are:
+
+
- SIM_NOISE
+ SIM_MODE
- $(P)$(R)Noise
+ $(P)$(R)SimMode
- $(P)$(R)Noise_RBV
+ $(P)$(R)SimMode_RBV
longout
longin
-
Parameters for Peak Array
+
+ Parameters for Array of Peaks Mode
-
+
@@ -390,7 +369,8 @@
r/w
- Used to introduce randomness. Each gaussian peak in the array is assigned a scaling factor.
+ Used to introduce randomness in the peak height. Each gaussian peak in the array
+ is assigned a scaling factor.
scalingFactor = 1.0 + (rand()%peakVariation +1)/100.0
@@ -402,56 +382,75 @@
longout
longin
+
-
-
+ SimNoise
+
+ asynInt32
+
+ r/w
+
+ Used to introduce randomness. Each affected pixel is assigned a scaling factor.
+
+ scalingFactor = 1.0 + (rand()%noise +1)/100.0
+
+ SIM_NOISE
+
+ $(P)$(R)Noise
+
+ $(P)$(R)Noise_RBV
+ longout
+
+ longinImage Types
- Linear Ramp
- Array of Peaks
- Array of Rings
-
+ Simulation Modes
+
+ Linear Ramp
+
+ Array of Peaks
+
Unsupported standard driver parameters
@@ -516,13 +515,8 @@
-
+ simDetectorSetup.adl
+
-
-