fdhwlib  2.0.25
FE4image Class Reference

#include <fe4image.h>

Inheritance diagram for FE4image:
FEbaseImage

List of all members.

Public Member Functions

Private Attributes


Detailed Description

The class allows the access to the image data of a single mirror.

The size of the image depends on the coding of the values. In compression mode the size equals the physical number of pixel (20x22 pixel). Using virtual channel there are two additional rows (20x24 pixel). The rows are numbered from 1 to 22(24) and columns are numbered from 1 to 20. For each pixel there are 64 pages numbered from 1 to 64 of 1k (1000 words/2000 shorts) words of data. They contain the history of the last 100us before the next page signal.

Due to bright stars and other light sources that affect only some of the pixel it is necessary to manage the state of each pixel separately. The state of a pixel can be enabled, fixed to low, fixed to high or disabled For each column two long words are used mark the pixel as disabled or fixed. Another parameter defines whether the pixel in case of being fixed is fixed to lower or higher border. In the parameters the bits 0-21 correspond with the pixel 0-21 of the column.

In close conjunction with the image data are two other features of the analog electronic:

  • the gain of the analog electronic.

Changes:

  • Changed the V3 doxygen comments to apply to the V4 hardware -tb-
  • Removed the V4 change log (see feimage.h for V3 comments -tb-) 2010-03-13
Todo:
Make the statistical functions multitasking safe!
See also:
FE FEimageData

Definition at line 66 of file fe4image.h.


Constructor & Destructor Documentation

FE4image::FE4image ( hw4::SubrackAuger s)

Member Function Documentation

void FE4image::disableGainErr ( int  col) [virtual]

Reimplemented from FEbaseImage.

void FE4image::disablePixel ( int  col,
unsigned long  mask 
) [virtual]

Disable all pixel in the mask.

Reimplemented from FEbaseImage.

void FE4image::enableGainErr ( int  col) [virtual]

Reimplemented from FEbaseImage.

void FE4image::enablePixel ( int  col,
unsigned long  mask 
) [virtual]

Enable all pixel in the mask.

Clears fixed and disabled pixel.

Reimplemented from FEbaseImage.

void FE4image::fixPixel ( int  col,
unsigned long  mask 
) [virtual]

Set all pixel in the mask to fixed.

Reimplemented from FEbaseImage.

unsigned long FE4image::getDisabledPixel ( int  col) [virtual]

Get a list of the disabled pixel (0 not disabeled, 1 disabled).

Reimplemented from FEbaseImage.

unsigned long FE4image::getFixedPixel ( int  col) [virtual]

Get a list of the fixed pixel (0 not fixed, 1 fixed).

Reimplemented from FEbaseImage.

unsigned long FE4image::getFixedType ( int  col) [virtual]

Get list of the pixel fixed to low and high (0 low, 1 high).

This information is only relevant if the pixel are fixed (and not disabled). To check use getFixedPixel and getDisabledPixel

Reimplemented from FEbaseImage.

int FE4image::getGain ( int  col,
int  row 
) [virtual]

Read the gain of the specified pixel.

Implements FEbaseImage.

bool FE4image::getStatisticParameters ( int  col,
int  row,
int *  offset,
unsigned long *  n 
) [virtual]

Get parameters for the calculation of the statistical parameters.

Return value is the value of the RunStat bit.

Implements FEbaseImage.

void FE4image::getStatistics ( int  col,
int  row,
double *  mean,
double *  var 
) [virtual]

Get statistical parameters for the ADC values.

Changes:

  • 30.8.01 ak: Offset considered in calculation of mean value

Implements FEbaseImage.

void FE4image::getStatistics ( int  col,
int  row,
signed long *  sum,
unsigned long *  sumSq 
) [virtual]

Get statistical parameters for the ADC values.

Normally all parameters should be equal, so use only one existing pixel to read the parameters.

Returns:
The function will return true, if the evaluation of the statistic parameters is activ.

Implements FEbaseImage.

void FE4image::getStatistics ( signed long *  sum,
unsigned long *  sumSq 
) [virtual]

Shall get statistical parameters for all pixel.

Actually it gets data from first pixel of first flt.

TODO: is this necessary? (Was it used for v3?) -tb-

Implements FEbaseImage.

int FE4image::isBusyLoadingGains ( int  col) [virtual]

Returns the load gain action busy flag.

After calling loadGains(col) this will return 1 during loading the gains. Data taking or reading/writing gains should be avoided until it is 0 again.

Reimplemented from FEbaseImage.

bool FE4image::isEnabledGainErr ( int  col) [virtual]

Reimplemented from FEbaseImage.

void FE4image::loadGains ( int  col) [virtual]

Load (activate) the gains of the specified col (flt).

After setting the gains with setGain(int col, int row, int gain) they need to be activated/loaded by this command (all gains of this flt/col). The loading takes about 150 useconds and is finished when the action busy flag of the status register is down.

Reimplemented from FEbaseImage.

int FE4image::read ( int  col,
int  row,
int  page,
unsigned short *  data 
) [virtual]

Read one page of data for one pixel.

The function requires an array of Flt::FLTv4_PAGE_SIZE short words. Each value contains the measurements for a single pixel.

Parameters:
colcolumn 1-20
rowrow 1-22, 23-24 for the virtual channel
pagepage 1-Flt::FLTv4_PAGES or -1 (NEW 2009-05: see comment below)
datadata[Flt::FLTv4_PAGE_SIZE]
Returns:
Status of the transmisson. (OBSOLETE -tb- see below) If an overflow in one of the bins occured the overflow flag is set. Compare with the values
  • PBUS_OVFL_UNKNOWN Overflow flag not considered
  • PBUS_OVFL_NONE No overflow detected
  • PBUS_OVFL_ACTIVE Overflow occured, read data in the virtual channel
COMMENTS to V4 (2009-05-05 -tb-):
  • number of pages is Flt::FLTv4_PAGES (currently: 64)
  • size of page is Flt::FLTv4_PAGE_SIZE (currently: 2000)
  • block reading is used
  • the page offset needs to be considered by the user (more comfortable is ) The meaning of parameter page has changed: if page is between 1..Flt::FLTv4_PAGES the according page is forced to read. Note that for v4 the page manager is handling the pages: the oldest page will always be read out. If page==-1 the default page will be read out (the oldest page).

The return value indicates the number of the readout page (first page =1,...). In case of error the return value is negative (e.g. if page is out of range).

Implements FEbaseImage.

int FE4image::read ( int  col,
int  row,
int  page,
int  start,
unsigned short *  data,
int  len = hw4::kFLT_PAGE_SIZE 
) [virtual]

NOT IMPLEMENTED for v4! Use int read(int col, int row, int page, unsigned short *data) instead! (-tb-)

Reading len values beginning from the position start.

Parameters:
colcolumn 1-20
rowrow 1-22, 23-24 for the virtual channel
pagepage 1-32
start0..999
datadata[1000]
len1...1000
Returns:
Status of the transmisson. If an overflow in one of the bins occured the overflow flag is set. Compare with the values
  • PBUS_OVFL_UNKNOW Overflow flag not considered
  • PBUS_OVFL_NONE No overflow detected
  • PBUS_OVFL_ACTIVE Overflow occured, read data in the virtual channel

Implements FEbaseImage.

int FE4image::read ( int  col,
int  row,
int  page,
int  start,
unsigned short *  data 
) [virtual]

NOT IMPLEMENTED for v4! Use int read(int col, int row, int page, unsigned short *data) instead! (-tb-)

Read the complete image but start at the given address

Parameters:
colcolumn 1-20
rowrow 1-22, 23-24 for the virtual channel
pagepage 1-32
start0..999
datadata[2000]
Returns:
Status of the transmisson. If an overflow in one of the bins occured the overflow flag is set. Compare with the values
  • PBUS_OVFL_UNKNOW Overflow flag not considered
  • PBUS_OVFL_NONE No overflow detected
  • PBUS_OVFL_ACTIVE Overflow occured, read data in the virtual channel

Implements FEbaseImage.

int FE4image::readPage ( int  col,
int  row,
int  imgAddr,
unsigned short *  data 
) [virtual]

Read one page of data for one pixel.

Use the 'imgAddr' computed by FEbaseEvent->getTimeStamp(...).

It is recommended to use int FE4image::readPage(...).

Parameters:
colcolumn 1-20
rowrow 1-22, 23-24 for the virtual channel
imgAddrimage offset
datadata[2000]

Reimplemented from FEbaseImage.

int FE4image::readPage ( int  col,
int  row,
int  imgAddr,
unsigned short *  data,
int  start = 0,
int  len = hw4::kFLT_PAGE_SIZE 
) [virtual]

Read a part of the page of data for one pixel.

Use the 'imgAddr' computed by FEbaseEvent->getTimeStamp(...) to get the aligned image. (This is intended to be the slt > eventStatus > pageStart register +1 [why + 1 ??? -tb-]. It is the offset of the 32 bit word.)

The last two parameters provide you to read only a part/block of the image.

Parameters:
colcolumn 1-20
rowrow 1-22, 23-24 for the virtual channel
imgAddrimage offset
datadata[2000]
startthe offset of the block inside the image you want to read out
lenthe lenght of the block you want to read out

Reimplemented from FEbaseImage.

void FE4image::setDisabledPixel ( int  col,
unsigned long  status 
) [virtual]

Mark pixel as disabled (0 not disabled, 1 disabled).

Reimplemented from FEbaseImage.

void FE4image::setFixedPixel ( int  col,
unsigned long  status 
) [virtual]

Mark pixel as fixed (0 not fixed, 1 fixed).

The pixel can be fixed to low or high as chosen by setFixedType.

Reimplemented from FEbaseImage.

void FE4image::setFixedType ( int  col,
unsigned long  status 
) [virtual]

Defines whether the fixed pixel are set to low or high (0 low, 1 high).

Reimplemented from FEbaseImage.

void FE4image::setFixedTypeToHigh ( int  col,
unsigned long  mask 
) [virtual]

Change the fixed type of all pixel in the mask to high.

Reimplemented from FEbaseImage.

void FE4image::setFixedTypeToLow ( int  col,
unsigned long  mask 
) [virtual]

Change the fixed type of all pixel in the mask to low.

Reimplemented from FEbaseImage.

void FE4image::setGain ( int  col,
int  row,
int  gain 
) [virtual]

Write the gain of the specified pixel.

Implements FEbaseImage.

void FE4image::setStatisticParameters ( bool  enable,
int  offset,
unsigned long  n 
) [virtual]

Set parameters for the calculation of the statistical parameters.

The function loads the same parameters for all pixel.

Implements FEbaseImage.

int FE4image::waitForGainErr ( ) [virtual]

Blocks execution until a gain error occurs.

Returns:
The column where the error has occurred (1-20).

Reimplemented from FEbaseImage.


Member Data Documentation

Definition at line 298 of file fe4image.h.


The documentation for this class was generated from the following file: