Difference between revisions of "Rasnik Image Analysis"

From Atlas Wiki
Jump to navigation Jump to search
Line 23: Line 23:
  
 
'''Variables written to file'''
 
'''Variables written to file'''
 +
 
"st",seq_no,grab_date,grab_time,rasnik_id,channel_id,icaras_version,analysis_version
 
"st",seq_no,grab_date,grab_time,rasnik_id,channel_id,icaras_version,analysis_version
 +
 
"ud" ierr X  Y  M  AlphaX  AlphaY  AlphaZ  L  Sx  Sy
 
"ud" ierr X  Y  M  AlphaX  AlphaY  AlphaZ  L  Sx  Sy
 +
 
"ue" dum DX DY DM DAlphaX DAlphaY DAlphaZ DL  dum  dum
 
"ue" dum DX DY DM DAlphaX DAlphaY DAlphaZ DL  dum  dum
 +
 
"rx" ixcode xpitch xoffset xangle Dxpitch Dxoffset Dxangle Cor_xp-xo Cor_xo-xa Cor_xa-xp
 
"rx" ixcode xpitch xoffset xangle Dxpitch Dxoffset Dxangle Cor_xp-xo Cor_xo-xa Cor_xa-xp
 +
 
"ry"  idem for y;
 
"ry"  idem for y;
 +
 
"rg" dum dMdx dMdy dSdx dSdy DdMdx DdMdy DdSdx DdSdy dum dum
 
"rg" dum dMdx dMdy dSdx dSdy DdMdx DdMdy DdSdx DdSdy dum dum
"lr" TO_CENTER TO_LENS FIX_BW_WB BANDS nx_fg ny_fg Mask_B3 Mask_Orient Mask_pitch X_Pix Y_Pix X_Fudge Lens_Focus Lens_Diam LED_Wave Dist_Mask_CCD
+
 
 +
"lr" TO_CENTER TO_LENS FIX_BW_WB BANDS nx_fg ny_fg Mask_B3 Mask_Orient Mask_pitch X_Pix Y_Pix X_Fudge  
 +
Lens_Focus Lens_Diam LED_Wave Dist_Mask_CCD
 +
 
 
"qf" This line changes with the version number:
 
"qf" This line changes with the version number:
 +
 
'''version 135-:'''
 
'''version 135-:'''
 +
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 +
 
rms-bw cut_bw "bands:" BANDS BAND_OK band_lft band_rgt band_top band_bot
 
rms-bw cut_bw "bands:" BANDS BAND_OK band_lft band_rgt band_top band_bot
 +
 
'''versions 132-134:'''
 
'''versions 132-134:'''
 +
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 
rms-bw cut_bw "bands:" BANDS BAND_OK dum dum dum dum dum
 
rms-bw cut_bw "bands:" BANDS BAND_OK dum dum dum dum dum
 +
 
'''versions 130-131:'''
 
'''versions 130-131:'''
 +
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
 
rms-bw cut_bw "bands:" BANDS BAND_OK n_band band band0 band_lft band_rgt
 
rms-bw cut_bw "bands:" BANDS BAND_OK n_band band band0 band_lft band_rgt
Line 53: Line 69:
  
 
''Explanation of the variables''
 
''Explanation of the variables''
 +
 
'''st = stamp'''  
 
'''st = stamp'''  
 +
 
seq_no         sequence number
 
seq_no         sequence number
 +
 
grab_date        date the image was taken (yyyy/mm/dd)
 
grab_date        date the image was taken (yyyy/mm/dd)
 +
 
grab_time        time the image was taken (hh:mm:ss)
 
grab_time        time the image was taken (hh:mm:ss)
 +
 
rasnik id        rasnik system name (set by user in channel settings)
 
rasnik id        rasnik system name (set by user in channel settings)
 +
 
channel          RASMUX hardware channel
 
channel          RASMUX hardware channel
 +
 
icaras_version  (decimal integer)
 
icaras_version  (decimal integer)
 +
 
analysis_version (decimal integer)
 
analysis_version (decimal integer)
 +
  
 
'''ud = user data'''
 
'''ud = user data'''
 +
 
ierr    error given by analysisprogram. (0=OK)
 
ierr    error given by analysisprogram. (0=OK)
 +
 
X      x reading of mask or lens in mm (depends on TO_LENS boolean)
 
X      x reading of mask or lens in mm (depends on TO_LENS boolean)
Y      y ,,                  ,,                    ,,
+
 
 +
Y      y reading of mask or lens in mm (depends on TO_LENS boolean)
 +
 
 
M      average magnification factor of the image on the CCD
 
M      average magnification factor of the image on the CCD
 +
 
alphaX  rotation mask/CCD around X axis
 
alphaX  rotation mask/CCD around X axis
alphaY   ,,                ,,  Y ,,
+
 
alphaZ   ,,                ,,  Z  ,, (= angle seen directly on TV)
+
alphaY  rotation mask/CCD around X axis
 +
 
 +
alphaZ  rotation mask/CCD around X axis (= angle seen directly on TV)
 +
 
 
Sx      average sharpness in x direction
 
Sx      average sharpness in x direction
 +
 
Sy      average sharpness in y direction
 
Sy      average sharpness in y direction
 +
 
L      absolute distance mask-CCD (not yet implemented)
 
L      absolute distance mask-CCD (not yet implemented)
 +
  
 
'''ue = user error'''
 
'''ue = user error'''
 +
 
As ud line, but giving the errors on the variables.
 
As ud line, but giving the errors on the variables.
  
 
'''rx = raw x data from fit'''
 
'''rx = raw x data from fit'''
 +
 
ixcode  result of decoding in 'X' direction (in units chessboard squares)
 
ixcode  result of decoding in 'X' direction (in units chessboard squares)
 +
 
xpitch  size of chessboard square in unit pixels in X-direction
 
xpitch  size of chessboard square in unit pixels in X-direction
 +
 
xoffset fractional part of chessboard squares in X-direction in unit pixels.
 
xoffset fractional part of chessboard squares in X-direction in unit pixels.
xangle  angle between columns (!) on CCD and vertical (!) lines of the mask on
+
 
        the CCD
+
xangle  angle between columns (!) on CCD and vertical (!) lines of the mask on the CCD
 +
 
 
Dxxxxx  error on xxxxx
 
Dxxxxx  error on xxxxx
 +
 
Cor_x.. correlations between the pitch/offset/angle
 
Cor_x.. correlations between the pitch/offset/angle
  
 
'''ry = raw y data from fit'''
 
'''ry = raw y data from fit'''
 +
 
iycode  result of decoding in 'Y' direction (in units chessboard squares)
 
iycode  result of decoding in 'Y' direction (in units chessboard squares)
 +
 
ypitch  size of chessboard square in unit pixels in Y-direction
 
ypitch  size of chessboard square in unit pixels in Y-direction
 +
 
yoffset fractional part of chessboard squares in Y-direction in unit pixels.
 
yoffset fractional part of chessboard squares in Y-direction in unit pixels.
yangle  angle between lines (!) on CCD and horizontal (!) lines of the mask on
+
 
        the CCD
+
yangle  angle between lines (!) on CCD and horizontal (!) lines of the mask on the CCD
 +
 
 
Dyyyyy  error on yyyyy
 
Dyyyyy  error on yyyyy
 +
 
Cor_y.. correlations between the pitch/offset/angle
 
Cor_y.. correlations between the pitch/offset/angle
  
 
'''rg = raw gradients data from fit'''
 
'''rg = raw gradients data from fit'''
 +
 
dMdx/y  gradient of A in X/Y direction (gives alpha Y/X)
 
dMdx/y  gradient of A in X/Y direction (gives alpha Y/X)
 
  given in the form: dMdx/M (unit: 1/Xpixel,  1/Ypixel)
 
  given in the form: dMdx/M (unit: 1/Xpixel,  1/Ypixel)
 +
 
dSdx/y  gradient of sharpness in x/y direction  (not yet implemented)
 
dSdx/y  gradient of sharpness in x/y direction  (not yet implemented)
 +
 
Ddxdy  error on dxdy
 
Ddxdy  error on dxdy
  
 
'''lr = layout of the RASNIK system'''
 
'''lr = layout of the RASNIK system'''
 +
 
TO_CENTER  reference point on CCD. T=center, F=top left corner
 
TO_CENTER  reference point on CCD. T=center, F=top left corner
 +
 
TO_LENS    give x and y of mask or lens. T=lens, F=mask
 
TO_LENS    give x and y of mask or lens. T=lens, F=mask
 +
 
FIX_BW_WB  correct for difference in black->white and white->black transitions?
 
FIX_BW_WB  correct for difference in black->white and white->black transitions?
 +
 
BANDS      determine black (left+right) side bands of image? (result stored, but not used)
 
BANDS      determine black (left+right) side bands of image? (result stored, but not used)
 +
 
nx_fg      number of IMAGE pixels in x-direction (determined by framegrabber, NOT by CCD!)
 
nx_fg      number of IMAGE pixels in x-direction (determined by framegrabber, NOT by CCD!)
 +
 
ny_fg      number of IMAGE pixels in y-direction (determined by framegrabber, NOT by CCD!)
 
ny_fg      number of IMAGE pixels in y-direction (determined by framegrabber, NOT by CCD!)
 +
 
Mask_B3    size of Basic Building Block (number of squares horizontally (=vertically)).
 
Mask_B3    size of Basic Building Block (number of squares horizontally (=vertically)).
 
             One BBB contains one horizontal code and one vertical code.
 
             One BBB contains one horizontal code and one vertical code.
 +
 
Mask_Orient orientation of the mask: 00,01,10 or 11.
 
Mask_Orient orientation of the mask: 00,01,10 or 11.
 
             First digit = x, second digit = y. 0 = normal, 1 = reversed.
 
             First digit = x, second digit = y. 0 = normal, 1 = reversed.
 +
 
Mask_pitch  size of the side of one square in mm
 
Mask_pitch  size of the side of one square in mm
 +
 
X_Pix      image pixel size in x-direction in mm (taken from channel settings)
 
X_Pix      image pixel size in x-direction in mm (taken from channel settings)
 
             This is the net pixel size, which is the result of the digitisation
 
             This is the net pixel size, which is the result of the digitisation
 
    done by the framegrabber. It is NOT the CCD x pixel size!
 
    done by the framegrabber. It is NOT the CCD x pixel size!
 +
 
Y_Pix      image pixel size in y-direction in mm (taken from channel settings)
 
Y_Pix      image pixel size in y-direction in mm (taken from channel settings)
 
             This is the CCD y pixel size.
 
             This is the CCD y pixel size.
 +
 
X_Fudge    Correction factor for X_Pix (x pixel size can be determined from y pixel
 
X_Fudge    Correction factor for X_Pix (x pixel size can be determined from y pixel
 
             size assuming squares on the mask).
 
             size assuming squares on the mask).
 +
 
Lens_Focus  focal length of the lens (mm)
 
Lens_Focus  focal length of the lens (mm)
 +
 
Lens_Diam  diameter of the lens (mm)
 
Lens_Diam  diameter of the lens (mm)
 +
 
LED_Wave    wavelength of the light used (nm)
 
LED_Wave    wavelength of the light used (nm)
 +
 
Dist_Mask_CCD distance from mask to CCD (mm)
 
Dist_Mask_CCD distance from mask to CCD (mm)
  
 
'''qf = quality of the fit'''
 
'''qf = quality of the fit'''
 +
 
BADFITX,BADFITY,REALBAD,FAILED booleans to indicate quality of the fit.
 
BADFITX,BADFITY,REALBAD,FAILED booleans to indicate quality of the fit.
 
         Should be FFFF. Data cannot be trusted if FAILED = T.
 
         Should be FFFF. Data cannot be trusted if FAILED = T.
 
         The other three are much less serious if T (data still acceptable).
 
         The other three are much less serious if T (data still acceptable).
 +
 
ndfx, ndfy      number of points used in the x/y fit
 
ndfx, ndfy      number of points used in the x/y fit
 +
 
xchsq, ychsq    chi-squares of x/y fit
 
xchsq, ychsq    chi-squares of x/y fit
 +
 
avg-bw          average value of CCD image
 
avg-bw          average value of CCD image
 +
 
rms-bw          rms of CCD image
 
rms-bw          rms of CCD image
 +
 
cut-bw          value used as cut on the derivative
 
cut-bw          value used as cut on the derivative
 +
 
"bands:" the data following this keyword concerns the location of the
 
"bands:" the data following this keyword concerns the location of the
 
       black side bands (left and right) on the image.
 
       black side bands (left and right) on the image.
 +
 
BANDS    T if sidebands should be determined
 
BANDS    T if sidebands should be determined
 +
 
BANDS_OK  T if sideband determination has succeeded
 
BANDS_OK  T if sideband determination has succeeded
 +
 
'''version 135:'''
 
'''version 135:'''
 +
 
band_lft  Size of left  black band on image (number of pixels, written as float)
 
band_lft  Size of left  black band on image (number of pixels, written as float)
 +
 
band_rgt  Size of right  black band on image (number of pixels, written as float)
 
band_rgt  Size of right  black band on image (number of pixels, written as float)
 +
 
band_top  Size of top    black band on image (number of pixels, written as float)
 
band_top  Size of top    black band on image (number of pixels, written as float)
 +
 
band_bot  Size of bottom black band on image (number of pixels, written as float)
 
band_bot  Size of bottom black band on image (number of pixels, written as float)
 +
 
'''versions 132-134:'''
 
'''versions 132-134:'''
 +
 
No further information present in variables (not determined)
 
No further information present in variables (not determined)
 +
 
'''versions 130-131:'''
 
'''versions 130-131:'''
 +
 
n_band    (Don't remember)
 
n_band    (Don't remember)
 +
 
band      (Probably measured horizontal active CCD width in mm)
 
band      (Probably measured horizontal active CCD width in mm)
 +
 
band0    Nominal horizontal active CCD width in mm. Given as input parameter.
 
band0    Nominal horizontal active CCD width in mm. Given as input parameter.
 +
 
band_lft  Position (in mm) of the left black edge of the image
 
band_lft  Position (in mm) of the left black edge of the image
 +
 
band_rgt  Position (in mm) of the right black edge of the image
 
band_rgt  Position (in mm) of the right black edge of the image
  

Revision as of 09:00, 25 April 2005

[Rasnik homepage] [Current Image Analysis Page]

Contacts

[Frank Linde] (Analysis Software Code)

[Robert Hart] (Windows application / Icaras / DIM)

[Henk Groenstege] (Rasnik Electronics)

[Harry van der Graaf] (Overall)

Documentation

The ASCII output file format

  • Each line starts with 2 characters identifying the contents of the line
  • First line is written by Icaras and starts with 'st'
  • In 'st' line the fields are separated by a comma (historical reason)
  • Fields within the other lines are seperated by (at least one) space
  • For use under normal operation only the lines 'ud' and 'ue' are interesting.
 The rest is for debug, quality check, and user data correction if neccesary,
 and requires insight in the source code of the analysis.

Variables written to file

"st",seq_no,grab_date,grab_time,rasnik_id,channel_id,icaras_version,analysis_version

"ud" ierr X Y M AlphaX AlphaY AlphaZ L Sx Sy

"ue" dum DX DY DM DAlphaX DAlphaY DAlphaZ DL dum dum

"rx" ixcode xpitch xoffset xangle Dxpitch Dxoffset Dxangle Cor_xp-xo Cor_xo-xa Cor_xa-xp

"ry" idem for y;

"rg" dum dMdx dMdy dSdx dSdy DdMdx DdMdy DdSdx DdSdy dum dum

"lr" TO_CENTER TO_LENS FIX_BW_WB BANDS nx_fg ny_fg Mask_B3 Mask_Orient Mask_pitch X_Pix Y_Pix X_Fudge Lens_Focus Lens_Diam LED_Wave Dist_Mask_CCD

"qf" This line changes with the version number:

version 135-:

"qf" BADFITX BADFITY REALBAD FAILED ndfx ndfy xchsq ychsq avg-bw

rms-bw cut_bw "bands:" BANDS BAND_OK band_lft band_rgt band_top band_bot

versions 132-134:

"qf" BADFITX BADFITY REALBAD FAILED ndfx ndfy xchsq ychsq avg-bw rms-bw cut_bw "bands:" BANDS BAND_OK dum dum dum dum dum

versions 130-131:

"qf" BADFITX BADFITY REALBAD FAILED ndfx ndfy xchsq ychsq avg-bw rms-bw cut_bw "bands:" BANDS BAND_OK n_band band band0 band_lft band_rgt


 Notes:
  - dum = dummy variable not yet or no longer used (=0).
  - The first 5 data lines have the same format.
  - The last 2 data lines have (each) a different format.
  - variable in capitals letters means a boolean and are here separeted
    by a space for readability, but in the file they are NOT separated.
    In the file T=true, F=false.
  - Text between quotes appears litterally in the file.
  - variable starting with a 'D' denotes the error margin on the associated variable.

Explanation of the variables

st = stamp

seq_no sequence number

grab_date date the image was taken (yyyy/mm/dd)

grab_time time the image was taken (hh:mm:ss)

rasnik id rasnik system name (set by user in channel settings)

channel RASMUX hardware channel

icaras_version (decimal integer)

analysis_version (decimal integer)


ud = user data

ierr error given by analysisprogram. (0=OK)

X x reading of mask or lens in mm (depends on TO_LENS boolean)

Y y reading of mask or lens in mm (depends on TO_LENS boolean)

M average magnification factor of the image on the CCD

alphaX rotation mask/CCD around X axis

alphaY rotation mask/CCD around X axis

alphaZ rotation mask/CCD around X axis (= angle seen directly on TV)

Sx average sharpness in x direction

Sy average sharpness in y direction

L absolute distance mask-CCD (not yet implemented)


ue = user error

As ud line, but giving the errors on the variables.

rx = raw x data from fit

ixcode result of decoding in 'X' direction (in units chessboard squares)

xpitch size of chessboard square in unit pixels in X-direction

xoffset fractional part of chessboard squares in X-direction in unit pixels.

xangle angle between columns (!) on CCD and vertical (!) lines of the mask on the CCD

Dxxxxx error on xxxxx

Cor_x.. correlations between the pitch/offset/angle

ry = raw y data from fit

iycode result of decoding in 'Y' direction (in units chessboard squares)

ypitch size of chessboard square in unit pixels in Y-direction

yoffset fractional part of chessboard squares in Y-direction in unit pixels.

yangle angle between lines (!) on CCD and horizontal (!) lines of the mask on the CCD

Dyyyyy error on yyyyy

Cor_y.. correlations between the pitch/offset/angle

rg = raw gradients data from fit

dMdx/y gradient of A in X/Y direction (gives alpha Y/X) given in the form: dMdx/M (unit: 1/Xpixel, 1/Ypixel)

dSdx/y gradient of sharpness in x/y direction (not yet implemented)

Ddxdy error on dxdy

lr = layout of the RASNIK system

TO_CENTER reference point on CCD. T=center, F=top left corner

TO_LENS give x and y of mask or lens. T=lens, F=mask

FIX_BW_WB correct for difference in black->white and white->black transitions?

BANDS determine black (left+right) side bands of image? (result stored, but not used)

nx_fg number of IMAGE pixels in x-direction (determined by framegrabber, NOT by CCD!)

ny_fg number of IMAGE pixels in y-direction (determined by framegrabber, NOT by CCD!)

Mask_B3 size of Basic Building Block (number of squares horizontally (=vertically)).

           One BBB contains one horizontal code and one vertical code.

Mask_Orient orientation of the mask: 00,01,10 or 11.

           First digit = x, second digit = y. 0 = normal, 1 = reversed.

Mask_pitch size of the side of one square in mm

X_Pix image pixel size in x-direction in mm (taken from channel settings)

           This is the net pixel size, which is the result of the digitisation

done by the framegrabber. It is NOT the CCD x pixel size!

Y_Pix image pixel size in y-direction in mm (taken from channel settings)

           This is the CCD y pixel size.

X_Fudge Correction factor for X_Pix (x pixel size can be determined from y pixel

           size assuming squares on the mask).

Lens_Focus focal length of the lens (mm)

Lens_Diam diameter of the lens (mm)

LED_Wave wavelength of the light used (nm)

Dist_Mask_CCD distance from mask to CCD (mm)

qf = quality of the fit

BADFITX,BADFITY,REALBAD,FAILED booleans to indicate quality of the fit.

       Should be FFFF. Data cannot be trusted if FAILED = T.
       The other three are much less serious if T (data still acceptable).

ndfx, ndfy number of points used in the x/y fit

xchsq, ychsq chi-squares of x/y fit

avg-bw average value of CCD image

rms-bw rms of CCD image

cut-bw value used as cut on the derivative

"bands:" the data following this keyword concerns the location of the

      black side bands (left and right) on the image.

BANDS T if sidebands should be determined

BANDS_OK T if sideband determination has succeeded

version 135:

band_lft Size of left black band on image (number of pixels, written as float)

band_rgt Size of right black band on image (number of pixels, written as float)

band_top Size of top black band on image (number of pixels, written as float)

band_bot Size of bottom black band on image (number of pixels, written as float)

versions 132-134:

No further information present in variables (not determined)

versions 130-131:

n_band (Don't remember)

band (Probably measured horizontal active CCD width in mm)

band0 Nominal horizontal active CCD width in mm. Given as input parameter.

band_lft Position (in mm) of the left black edge of the image

band_rgt Position (in mm) of the right black edge of the image

The algorithms

How to compile (linux)

How to compile (windows)

Ask [Robert Hart]

How to run (linux)

How to run (windows)

Ask [Robert Hart]

How to make a new windows dll release

Downloads

For Windows

Fortran *.f files: [rasnik140.f] [rasnik138.f] [rasnik137.f] [rasnik135.f] [rasnik134.f] [rasnik133.f]

Shared libraries (dll):

For Linux

Tar-zipped file with latest source (*.car), Makefile etc.: