// Cocoa Example #1 // // A Simple Calibration Bench // // This example models a simple calibration bench. We have two // COPS sensors which are completely calibrated (ie the relationship // between the 0th pixel in each CCD array and the reference dowel pin) // and wish to use them in the calibration of a third COPS sensor. // // The two calibrated sensors are placed 1m apart and the uncalibrated // sensor is placed between them. A crosshair laser (XLaser), whose position // and orientation are unknown, is placed at one end of the system. Since // this is a calibration bench, it is assumed that we know the location // and orientation of all reference dowel pins within some uncertainty. GLOBAL_OPTIONS report_verbose 2 save_matrices 0 debug_verbose 5 // 0 calculates cal+unk values // 1 calculates only unk values // Only Calc type 1 is still supported calcul_type 1 //Set Script Units length_value_dimension 1 // mm length_error_dimension 2 // um angle_value_dimension 3 // deg angle_error_dimension 2 // urad //VRML, histogram Options (extra) writeVRML 1 onlyVRML 0 optoNamesVRML 1 PARAMETERS //We will define some general constants for use in the script // x hair laser properties prec_pos_las 200 // Uncertainty in crosshair laser placement prec_ang_las 100 // Uncertainty in crosshair laser orientation //COPS Calibration and CCD Resolution (error values) cal_error_XCCD 65 // Uncertainty of X axis calibration cal_error_YCCD 65 // Uncertainty of Y axis calibration prec_CCD 14 // precision of CCD measurements //Uncertainty in COPS Orientation prec_dowel_ang 2 prec_dowel_pos 100 //---------- EXTRA ENTRIES shift_det 0 devi_det 0 //---------- Precision of Calculation prec_to_calc 100 SYSTEM_TREE_DESCRIPTION object system Xlaser 3 COPS SYSTEM_TREE_DATA system Calibration_Bench Xlaser Xlaser_Bench ENTRY { angle angleBetweenAxis 90. prec_ang_las unk } center X -22.5 prec_pos_las unk Y 43.3 prec_pos_las unk Z -500 prec_pos_las cal angles X 0 prec_ang_las unk Y 180 prec_ang_las unk Z 0 prec_ang_las unk COPS COPS_Near_Bench ENTRY { length rightCCDYtoDowel2 57.579 cal_error_YCCD cal length rightCCDXtoDowel2 -8.171 cal_error_XCCD cal length leftCCDYtoDowel2 57.579 cal_error_YCCD cal length leftCCDXtoDowel2 -45 cal_error_XCCD cal length upCCDXtoDowel2 -36.829 cal_error_XCCD cal length upCCDYtoDowel2 65.75 cal_error_YCCD cal length downCCDXtoDowel2 -36.829 cal_error_XCCD cal length downCCDYtoDowel2 20.75 cal_error_YCCD cal } center X 0 prec_dowel_pos cal Y 0 prec_dowel_pos cal Z 0 prec_dowel_pos cal angles X 0 prec_dowel_ang cal Y 0 prec_dowel_ang cal Z 0 prec_dowel_ang cal COPS COPS_Far_Bench ENTRY { length rightCCDYtoDowel2 57.579 cal_error_YCCD cal length rightCCDXtoDowel2 -8.171 cal_error_XCCD cal length leftCCDYtoDowel2 57.579 cal_error_YCCD cal length leftCCDXtoDowel2 -45 cal_error_XCCD cal length upCCDXtoDowel2 -36.829 cal_error_XCCD cal length upCCDYtoDowel2 65.75 cal_error_YCCD cal length downCCDXtoDowel2 -36.829 cal_error_XCCD cal length downCCDYtoDowel2 20.75 cal_error_YCCD cal } center X 0 prec_dowel_pos cal Y 0 prec_dowel_pos cal Z 1000 prec_dowel_pos cal angles X 0 prec_dowel_ang cal Y 0 prec_dowel_ang cal Z 0 prec_dowel_ang cal COPS COPS_Uncalibrated // We wish to calibrate pixel arrays perpendicular to the legs of the crosshair laser // lines which intercept them. The entries we wish to obtain from the fit are set to 'unk' ENTRY { length rightCCDYtoDowel2 0 cal_error_YCCD unk length rightCCDXtoDowel2 -8.171 cal_error_XCCD cal length leftCCDYtoDowel2 0 cal_error_YCCD unk length leftCCDXtoDowel2 -45 cal_error_XCCD cal length upCCDXtoDowel2 0 cal_error_XCCD unk length upCCDYtoDowel2 65.75 cal_error_YCCD cal length downCCDXtoDowel2 0 cal_error_XCCD unk length downCCDYtoDowel2 20.75 cal_error_YCCD cal length upCCDZoffset 5 cal_error_YCCD cal } center X 0 prec_dowel_pos cal Y 0 prec_dowel_pos cal Z 500 prec_dowel_pos cal angles X 0 prec_dowel_ang cal Y 0 prec_dowel_ang cal Z 0 prec_dowel_ang cal MEASUREMENTS // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // COPS_Near_Bench // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // COPS Calibration_Bench/Xlaser_Bench & Calibration_Bench/COPS_Near_Bench U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // COPS_Far_Bench // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // COPS Calibration_Bench/Xlaser_Bench & Calibration_Bench/COPS_Far_Bench U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // COPS_Uncalibrated // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // COPS Calibration_Bench/Xlaser_Bench & Calibration_Bench/COPS_Uncalibrated U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD // -== End of Example #1 Script ==- // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^ Expected Results ^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // // Running this script (unchanged) in cocoa_v2.0.0 should // yield the following results in the report.out file for // the 'unk' entries : // // // // DIMENSIONS: lengths = mm +- mum angles = deg +- murad // Fit iteration 1 ... // 1 Fit quality is = 1.5785943e-16 // 1 Fit quality cut is = 3.9464858e-17 // GOOD QUALITY OF THE FIT FOR ITERATION 1 = 3.9464858e-17 < 0.1 // // FITTED ENTRY VALUES // NoEnt_unk Optical Object Parameter value (+-error) orig.val (+-error) quality // 0 Calibration_Bench/Xlaser_Bench angleBetweenAxis 90 +- 491.21575 90 +- 100 Q2 DIFF= 2.4980018e-16 // 1 Calibration_Bench/Xlaser_Bench centre_X -22.5 +- 15.652476 -22.5 +- 200 Q2 DIFF= 1.1952245e-15 // 2 Calibration_Bench/Xlaser_Bench centre_Y 43.25 +- 15.729334 43.3 +- 200 Q2 DIFF= -0.05 // 3 Calibration_Bench/Xlaser_Bench angles_X 4.7743103e-17 +- 14 0 +- 100 Q2 DIFF= 4.7743103e-17 // 5 Calibration_Bench/Xlaser_Bench angles_Z 1.3548548e-15 +- 311.11111 0 +- 100 Q2 DIFF= 1.3548548e-15 // 4 Calibration_Bench/Xlaser_Bench angles_Y 180 +- 14 180 +- 100 Q2 DIFF= 7.0360384e-15 // 5 Calibration_Bench/Xlaser_Bench angles_Z 1.3548548e-15 +- 311.11111 0 +- 100 Q2 DIFF= 1.3548548e-15 // 6 Calibration_Bench/COPS_Uncalibrated rightCCDYtoDowel2 57.579 +- 17.146428 0 +- 65 Q2 DIFF= 57.579 // 7 Calibration_Bench/COPS_Uncalibrated leftCCDYtoDowel2 57.579 +- 17.146428 0 +- 65 Q2 DIFF= 57.579 // 8 Calibration_Bench/COPS_Uncalibrated upCCDXtoDowel2 -36.829 +- 17.146428 0 +- 65 Q2 DIFF= -36.829 // 9 Calibration_Bench/COPS_Uncalibrated downCCDXtoDowel2 -36.829 +- 17.146428 0 +- 65 Q2 DIFF= -36.829