Previous: calbias: Optimize bias setting of a RAG
Next: makefries: make an undistortion calibration file
makedistor [options] <imagefilename> [polynome grade]Different image file types are recognized from their names. The image specified should be the grid file delivered with the system (if you do not have a file grid####.kcd on your system, it can be created using the imagebin program from the file flm-4-1.spe that comes on the disk with calibration data).
The optional argument "polynome grade" should be an integer number. The default is 6, which normally leads to very good results.
Please note: Whenever you decide to run makedistor (e.g. if you want to take advantage of improved performance in a new version) it is REQUIRED that you also run a new detector alignment (see makedetalign).
The output file is written as "ndef.cal" to make the difference with the official calibration file of the machine, which is "def.cal". Before using "ndef.cal", please note that if you are using the August 1998 version of the HKL software, the location of the sensitivity file needs to be added, and that the Chi-squared values are "guesstimates".
Further diagnostics can be gotten by analyzing the file "scatter.dat" that is produced as well. This file contains 7 values for each peak that was located:
devel[852]9602%% makedistor grid9602.kcd Detector ID: 9602 Assuming Mo radiation Detector type: 65mm, 625x576, binned Assuming Mo radiation Removing slope in background... Median of the four quadrants 121231.58 134819.52 121205.40 134773.89: Background Slope in X=-71.81 and Y=27156.44 grid9602.kcd; Number of peaks so far: 500 Number of peaks so far: 1000 Number of peaks so far: 1500 Number of peaks so far: 2000 Number of peaks so far: 2500 Number of peaks so far: 3000 Number of peaks so far: 3500 Number of peaks so far: 4000 Number of peaks so far: 4500 Number of peaks so far: 5000 Number of peaks so far: 5500 Number of peaks so far: 6000 Number of peaks so far: 6500 6503 peaks found, 6641 trials, 44.73 seconds Correcting peak positions... Assigning grid coordinates... Number of peaks assigned to grid: 6503 -34.54 <= mmx <= 34.54 -1.005 <= rmmx <= 1.005 -31.70 <= mmy <= 31.70 -0.922 <= rmmy <= 0.922 0.8 <= pixx <= 572.7 -0.997 <= rpixx <= 0.989 1.0 <= pixy <= 618.2 -0.997 <= rpixy <= 0.978 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0851 Rejected peak 88 at 25.2, 61.7 I=148k (err=0.34 pixel) Rejected peak 584 at 38.6, 618.1 I=752k (err=0.39 pixel) Rejected peak 1191 at 90.6, 617.9 I=1306k (err=0.42 pixel) Rejected peak 1200 at 98.5, 617.9 I=1300k (err=0.41 pixel) Rejected peak 1201 at 76.4, 617.9 I=1311k (err=0.39 pixel) Rejected peak 1212 at 105.5, 617.9 I=1307k (err=0.37 pixel) Rejected peak 1778 at 134.6, 617.9 I=1307k (err=0.53 pixel) Rejected peak 1779 at 120.4, 617.9 I=1305k (err=0.42 pixel) Rejected peak 1781 at 112.6, 617.9 I=1293k (err=0.54 pixel) Rejected peak 1782 at 142.4, 617.9 I=1304k (err=0.43 pixel) Rejected peak 1794 at 127.5, 617.9 I=1299k (err=0.40 pixel) Rejected peak 1796 at 156.5, 617.9 I=1274k (err=0.47 pixel) Rejected peak 1798 at 149.5, 617.9 I=1293k (err=0.37 pixel) Rejected peak 2380 at 164.4, 617.9 I=1309k (err=0.42 pixel) Rejected peak 2382 at 186.4, 617.9 I=1305k (err=0.46 pixel) Rejected peak 2969 at 215.4, 617.8 I=1005k (err=0.37 pixel) Rejected peak 2983 at 244.4, 618.1 I=762k (err=0.35 pixel) Rejected peak 2989 at 258.5, 618.2 I=763k (err=0.44 pixel) Rejected peak 2992 at 251.5, 618.1 I=764k (err=0.35 pixel) Rejected peak 3592 at 273.4, 618.2 I=739k (err=0.63 pixel) Rejected peak 3597 at 265.6, 618.2 I=751k (err=0.60 pixel) Rejected peak 4706 at 399.3, 438.7 I= 64k (err=0.39 pixel) Rejected peak 4804 at 383.3, 547.4 I=125k (err=0.35 pixel) Number of deleted gridpoints: 23 -34.54 <= mmx <= 34.54 -1.005 <= rmmx <= 1.005 -31.70 <= mmy <= 31.70 -0.922 <= rmmy <= 0.922 0.8 <= pixx <= 572.7 -0.997 <= rpixx <= 0.989 1.0 <= pixy <= 618.1 -0.997 <= rpixy <= 0.978 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0801 Rejected peak 1213 at 83.5, 617.9 I=1308k (err=0.42 pixel) Rejected peak 2075 at 169.0, 283.3 I=245k (err=0.32 pixel) Rejected peak 2390 at 178.6, 617.9 I=1306k (err=0.37 pixel) Rejected peak 2396 at 171.5, 617.9 I=1301k (err=0.42 pixel) Rejected peak 2966 at 236.6, 618.1 I=766k (err=0.35 pixel) Rejected peak 6219 at 535.5, 257.5 I=230k (err=0.33 pixel) Number of deleted gridpoints: 6 Remaining rotation: 0.22 degrees Fitting P2MMX polynomial... Fitting P2MMY polynomial... Results are stored in the file 'distorpol.vic' in the current directory. If you have the 'scatter' program, you can now do scatter nr 7 radmax .5 axdiv 100 to get an impression of the error distribution makedistor grid9602.kcd 145.83s user 1.99s system 90% cpu 2:43.73 totalIn the grid was badly rotated and the background of the image is problematic, calibration can be a bit more tedious:
devel[854]9605%% makedistor grid9605.kcd Detector ID: 9605 WARNING: unrecognized ADC speed 0 Detector type: 65mm, 625x576, binned WARNING: unrecognized ADC speed 0 Removing slope in background... Median of the four quadrants 18959.10 20435.44 18919.19 20399.25: Background Slope in X=-76.11 and Y=2956.40 grid9605.kcd; Number of peaks so far: 500 Number of peaks so far: 1000 Number of peaks so far: 1500 Number of peaks so far: 2000 Number of peaks so far: 2500 Number of peaks so far: 3000 Number of peaks so far: 3500 Number of peaks so far: 4000 Number of peaks so far: 4500 Number of peaks so far: 5000 Number of peaks so far: 5500 Number of peaks so far: 6000 6251 peaks found, 6619 trials, 44.57 seconds Correcting peak positions... Assigning grid coordinates... Number of peaks assigned to grid: 1 No grid found.... Is it rotated? Calculation aborted. makedistor grid9605.kcd 51.79s user 0.58s system 76% cpu 1:08.06 total devel[855]9605%% makedistor grid9605.kcd rotation=10 Detector ID: 9605 WARNING: unrecognized ADC speed 0 Detector type: 65mm, 625x576, binned WARNING: unrecognized ADC speed 0 Removing slope in background... Median of the four quadrants 18959.10 20435.44 18919.19 20399.25: Background Slope in X=-76.11 and Y=2956.40 grid9605.kcd; Number of peaks so far: 500 Number of peaks so far: 1000 Number of peaks so far: 1500 Number of peaks so far: 2000 Number of peaks so far: 2500 Number of peaks so far: 3000 Number of peaks so far: 3500 Number of peaks so far: 4000 Number of peaks so far: 4500 Number of peaks so far: 5000 Number of peaks so far: 5500 Number of peaks so far: 6000 6251 peaks found, 6619 trials, 44.53 seconds Correcting peak positions... Assigning grid coordinates... Number of peaks assigned to grid: 6235 -35.53 <= mmx <= 35.53 -1.034 <= rmmx <= 1.034 -34.42 <= mmy <= 34.42 -1.001 <= rmmy <= 1.001 0.8 <= pixx <= 572.8 -0.997 <= rpixx <= 0.989 1.1 <= pixy <= 613.5 -0.997 <= rpixy <= 0.963 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0739 Rejected peak 613 at 85.6, 1.2 I=181k (err=0.64 pixel) Rejected peak 1775 at 170.5, 1.5 I=227k (err=0.36 pixel) Rejected peak 2360 at 223.6, 1.2 I=185k (err=0.55 pixel) Rejected peak 2953 at 277.4, 1.1 I=187k (err=0.34 pixel) Rejected peak 4110 at 413.7, 1.2 I=186k (err=0.50 pixel) Rejected peak 5959 at 531.3, 256.1 I= 49k (err=0.34 pixel) Number of deleted gridpoints: 6 -35.53 <= mmx <= 35.53 -1.034 <= rmmx <= 1.034 -34.42 <= mmy <= 34.42 -1.001 <= rmmy <= 1.001 0.8 <= pixx <= 572.8 -0.997 <= rpixx <= 0.989 1.1 <= pixy <= 613.5 -0.997 <= rpixy <= 0.963 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0725 Remaining rotation: 5.85 degrees Please re-run this program with the argument 'rotation=15.85' Calculation aborted makedistor grid9605.kcd rotation=10 111.76s user 1.01s system 89% cpu 2:05.52 total devel[856]9605%% makedistor grid9605.kcd rotation=15.85 kill=5 Detector ID: 9605 WARNING: unrecognized ADC speed 0 Detector type: 65mm, 625x576, binned WARNING: unrecognized ADC speed 0 Removing slope in background... Median of the four quadrants 18959.10 20435.44 18919.19 20399.25: Background Slope in X=-76.11 and Y=2956.40 grid9605.kcd; Number of peaks so far: 500 Number of peaks so far: 1000 Number of peaks so far: 1500 Number of peaks so far: 2000 Number of peaks so far: 2500 Number of peaks so far: 3000 Number of peaks so far: 3500 Number of peaks so far: 4000 Number of peaks so far: 4500 Number of peaks so far: 5000 Number of peaks so far: 5500 Number of peaks so far: 6000 6384 peaks found, 6630 trials, 44.64 seconds Correcting peak positions... Assigning grid coordinates... Number of peaks assigned to grid: 6362 -34.42 <= mmx <= 34.42 -1.001 <= rmmx <= 1.001 -31.73 <= mmy <= 31.73 -0.923 <= rmmy <= 0.923 0.8 <= pixx <= 572.7 -0.997 <= rpixx <= 0.989 1.0 <= pixy <= 615.6 -0.997 <= rpixy <= 0.970 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0745 Rejected peak 581 at 55.4, 1.1 I=186k (err=0.30 pixel) Rejected peak 615 at 85.6, 1.2 I=181k (err=0.63 pixel) Rejected peak 1806 at 170.5, 1.5 I=227k (err=0.35 pixel) Rejected peak 2407 at 223.6, 1.2 I=185k (err=0.57 pixel) Rejected peak 3014 at 277.4, 1.1 I=187k (err=0.32 pixel) Rejected peak 4196 at 413.7, 1.2 I=186k (err=0.49 pixel) Rejected peak 6090 at 531.3, 256.1 I= 49k (err=0.35 pixel) Number of deleted gridpoints: 7 -34.37 <= mmx <= 34.37 -1.000 <= rmmx <= 1.000 -31.73 <= mmy <= 31.73 -0.923 <= rmmy <= 0.923 0.8 <= pixx <= 572.7 -0.997 <= rpixx <= 0.989 1.0 <= pixy <= 615.6 -0.997 <= rpixy <= 0.970 Fitting MM2PX polynomial... Fitting MM2PY polynomial... R.M.S. error in pixels : 0.0730 Remaining rotation: -0.04 degrees Fitting P2MMX polynomial... Fitting P2MMY polynomial... Results are stored in the file 'distorpol.vic' in the current directory. If you have the 'scatter' program, you can now do scatter nr 7 radmax .5 axdiv 100 to get an impression of the error distribution makedistor grid9605.kcd rotation=15.85 kill=5 142.77s user 1.45s system 90% cpu 2:40.10 total
Previous: calbias: Optimize bias setting of a RAG
Next: makefries: make an undistortion calibration file