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_line|"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_line|"ud"]] ierr X  Y  M  AlphaX  AlphaY  AlphaZ  L  Sx  Sy
  
"ue" dum DX DY DM DAlphaX DAlphaY DAlphaZ DL  dum  dum
+
[[#ue_line|"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_line|"rx"]] ixcode xpitch xoffset xangle Dxpitch Dxoffset Dxangle Cor_xp-xo Cor_xo-xa Cor_xa-xp
  
"ry"  idem for y;
+
[[#ry_line|"ry"]] idem for y;
  
"rg" dum dMdx dMdy dSdx dSdy DdMdx DdMdy DdSdx DdSdy dum dum
+
[[#rg_line|"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  
+
[[#lr_line|"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
Lens_Focus Lens_Diam LED_Wave Dist_Mask_CCD
 
  
"qf" BADFITX BADFITY REALBAD FAILED  ndfx ndfy xchsq ychsq avg-bw
+
[[#qf_line|"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
  
Line 53: Line 52:
 
''Explanation of the variables''
 
''Explanation of the variables''
  
 +
<div id="st_line">
 
'''st = stamp'''  
 
'''st = stamp'''  
  
Line 68: Line 68:
  
 
analysis_version (decimal integer)
 
analysis_version (decimal integer)
 +
</div>
  
  
 +
<div id="ud_line">
 
'''ud = user data'''
 
'''ud = user data'''
  
Line 91: Line 93:
  
 
L      absolute distance mask-CCD (not yet implemented)
 
L      absolute distance mask-CCD (not yet implemented)
 +
</div>
  
  
 +
<div id="ue_line">
 
'''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.
 +
</div>
  
  
 +
<div id="rx_line">
 
'''rx = raw x data from fit'''
 
'''rx = raw x data from fit'''
  
Line 111: Line 117:
  
 
Cor_x.. correlations between the pitch/offset/angle
 
Cor_x.. correlations between the pitch/offset/angle
 +
</div>
  
  
 +
<div id="ry_line">
 
'''ry = raw y data from fit'''
 
'''ry = raw y data from fit'''
  
Line 126: Line 134:
  
 
Cor_y.. correlations between the pitch/offset/angle
 
Cor_y.. correlations between the pitch/offset/angle
 +
</div>
  
  
 +
<div id="rg_line">
 
'''rg = raw gradients data from fit'''
 
'''rg = raw gradients data from fit'''
  
Line 135: Line 145:
  
 
Ddxdy  error on dxdy
 
Ddxdy  error on dxdy
 +
</div>
  
  
 +
<div id="lr_line">
 
'''lr = layout of the RASNIK system'''
 
'''lr = layout of the RASNIK system'''
  
Line 170: Line 182:
  
 
Dist_Mask_CCD distance from mask to CCD (mm)
 
Dist_Mask_CCD distance from mask to CCD (mm)
 +
</div>
  
  
 +
<div id="qf_line">
 
'''qf = quality of the fit'''
 
'''qf = quality of the fit'''
  
Line 193: Line 207:
  
 
The "bands" idea was never really finished and tested. It has therefore never been used to correct the main results (the "ud" line).
 
The "bands" idea was never really finished and tested. It has therefore never been used to correct the main results (the "ud" line).
 +
</div>
  
 
=== The algorithms ===
 
=== The algorithms ===

Revision as of 11:53, 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" BADFITX BADFITY REALBAD FAILED ndfx ndfy xchsq ychsq avg-bw rms-bw cut_bw "bands:" BANDS BAND_OK dum dum dum dum dum

 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

The "bands" idea was never really finished and tested. It has therefore never been used to correct the main results (the "ud" line).

The algorithms

How to compile (linux)

How to compile (windows)

Ask [Robert Hart]

How to run (linux)

Examples of rasnik images can be found in directory:

/project/atlas/projects/rasnik/images

The are two ways to run the rasnik executable:

1) By hand: Execute rasnik.exe (without any arguments), and anwser all the questions.

2) Automatic: Execute the rasnik.run script, with image(s) as arguments. It contains a kind of 'database' to set the correct settings for the images in the example directory.

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.: