Changeset 1011
- Timestamp:
- Jul 13, 2012 2:03:45 PM (11 years ago)
- Location:
- specdomain/trunk/src/specdomain
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
specdomain/trunk/src/specdomain/comparison/auto.mac
r996 r1011 1 1 """ 2 ===================3 General Information4 ===================5 6 2 Summary 7 3 ======= … … 136 132 137 133 No special configuration is needed to run these macros. Simply load the macro 138 file and run ''auto_setup''::134 file and run ``auto_setup``:: 139 135 140 136 > qdo auto.mac … … 323 319 def auto_help '{ 324 320 """ 325 Summary326 -------327 321 Displays the auto help text. 328 322 329 Usage 330 ----- 331 :: 323 Usage:: 332 324 333 325 > auto_help … … 368 360 def auto_setup '{ 369 361 """ 370 Summary 371 ------- 372 Set up the control parameters for the automatic filter and exposure 373 adjustments. 374 375 Description 376 ----------- 362 Set up the control parameters for the automatic filter and exposure 363 adjustments. 364 365 Description: 366 377 367 The following parameters can be adjusted to fit the particular needs of an 378 368 experiment or detector type (global variables holding these parameters and … … 462 452 due to inconsistent choices of control parameters. [AUTO_RETRY_MAX = 20] 463 453 464 Usage 465 ----- 466 :: 454 Usage:: 467 455 468 456 > auto_setup … … 507 495 def auto_off '{ 508 496 """ 509 Summary510 -------511 497 Turn off any automatic filter and exposure adjustments. 512 498 513 Usage 514 ----- 515 :: 499 Usage:: 516 500 517 501 > auto_off … … 519 503 .. note:: This command is equivalent to ``auto_set_level 0`` 520 504 521 See also522 --------523 auto_set_level, auto_on505 .. seealso:: 506 :spec:def:`auto_set_level`, 507 :spec:def:`auto_on` 524 508 525 509 """ … … 531 515 532 516 #------------------------------------------------------------------------------ 533 def auto_on '{auto_set_level $*}' 534 517 def auto_on '{ 518 """ 519 See :spec:def:`auto_set_level` 520 """ 521 auto_set_level $* 522 523 }' 524 525 #------------------------------------------------------------------------------ 535 526 def auto_set_level '{ 536 527 """ 537 Summary538 -------539 528 Set the level of automatic filter and exposure adjustments. 540 529 541 Usage 542 ----- 543 :: 530 Usage:: 544 531 545 532 > auto_set_level [<level>] … … 551 538 if <level> is ommitted, the users is asked for input 552 539 553 Example 554 ------- 555 :: 540 541 ===== ================================================================= 542 Level Description 543 ===== ================================================================= 544 0 No automatic adjustments are made 545 1 Only filters are adjusted, no exposure time adjustments 546 2 Both filters and exposure times are automatically adjusted 547 ===== ================================================================= 548 549 550 Examples:: 556 551 557 552 > auto_set_level … … 564 559 ``auto_set_level`` and ``auto_on`` are equivalent to each other 565 560 566 See also 567 -------- 568 auto_off 561 .. seealso:: 562 :spec:def:`auto_off` 569 563 570 564 """ … … 713 707 def auto_set_mode '{ 714 708 """ 715 Summary716 -------717 709 Set the acquisition mode to be used for the automatic filter and 718 710 exposure time adjustments. 719 711 720 Description 721 ----------- 722 Need some more details here... 723 724 725 Usage 726 ----- 727 :: 712 Description: 713 714 Need some more details here... 715 716 717 Usage:: 728 718 729 719 > auto_set_mode [<mode>] … … 733 723 when called with no arguments, the user is prompted 734 724 735 Example 736 ------- 737 :: 725 Example:: 738 726 739 727 > auto_set_mode 1 740 728 use the pilot exposure mode for automatic adjustments. 741 729 742 See also743 -------- 744 auto, auto_setup730 .. seealso:: 731 732 :spec:def:`auto_setup` 745 733 746 734 """ … … 776 764 def auto_set_exposure '{ 777 765 """ 778 Summary779 -------780 766 Set the maximum and minimum exposure times used for automatic exposure 781 767 adjustments. 782 768 783 Usage 784 ----- 785 :: 769 Usage:: 786 770 787 771 > auto_set_exposure [<min> <max>] … … 789 773 when called with no arguments, the user is prompted 790 774 791 Example 792 ------- 793 :: 794 795 > auto_set_exposure 1 10 796 sets the minimum exposure time to 1 sec and the maximum to 10 sec. 775 Arguments: 776 777 :param float min_exptime: minimum exposure time [s] 778 :param float max_exptime: maximum exposure time [s] 779 780 Example: 781 782 * set the minimum exposure time to 1 sec and the maximum to 10 sec:: 783 784 > auto_set_exposure 1 10 797 785 798 786 """ … … 821 809 def auto_show '{ 822 810 """ 823 Summary824 -------825 811 Display the current auto settings. 826 812 827 Usage 828 ----- 829 :: 813 Usage:: 830 814 831 815 > auto_show … … 871 855 def auto_show_exposure '{ 872 856 """ 873 Summary874 -------875 857 Display the current auto-level exposure settings. 876 858 877 Usage 878 ----- 879 :: 859 Usage:: 880 860 881 861 > auto_show_exposure … … 901 881 902 882 .. note:: 903 The option numbers must be kept in sync between ``_auto_set_option`` and 904 ``_auto_print_setup``. 883 The option numbers must be kept in sync between 884 :spec:def:`_auto_set_option` and 885 :spec:def:`_auto_print_setup`. 905 886 """ 906 887 … … 938 919 def _auto_set_option '{ 939 920 """ 940 Summary941 -------942 921 Sets a new value for a given option 943 922 944 Description 945 ----------- 946 Sets a new value for a given option from the options menu that was created947 with the _auto_print_setupcommand.923 Description: 924 925 Sets a new value for a given option from the options menu that was created 926 with the :spec:def:`_auto_print_setup` command. 948 927 949 928 .. note:: 950 The option numbers must be kept in sync between ``_auto_set_option`` and 951 ``_auto_print_setup``. 929 The option numbers must be kept in sync between 930 :spec:def:`_auto_set_option` and 931 :spec:def:`_auto_print_setup`. 952 932 953 933 """ … … 1181 1161 def _auto_analyze_exposure '{ 1182 1162 """ 1183 Summary1184 -------1185 1163 Analyze the previous exposure 1186 1164 1187 Description 1188 ----------- 1189 This macro retrieves the necessary information to analyze the last exposure 1190 and to initiate adjustments, if necessary. Usually, this step consists only 1191 of retrieving the count value from the monitored SPEC counter, but for more 1192 sophisticated experimental setups, this definition could be overwritten to 1193 include non-standard procedures, such as retrieving counts from EPICS PVs, 1194 etc. 1195 1196 Usage 1197 ----- 1198 :: 1165 Description: 1166 1167 This macro retrieves the necessary information to analyze the last exposure 1168 and to initiate adjustments, if necessary. Usually, this step consists only 1169 of retrieving the count value from the monitored SPEC counter, but for more 1170 sophisticated experimental setups, this definition could be overwritten to 1171 include non-standard procedures, such as retrieving counts from EPICS PVs, 1172 etc. 1173 1174 Usage:: 1199 1175 1200 1176 > _auto_analyze_exposure … … 1210 1186 def _auto_adjust() '{ 1211 1187 """ 1212 Summary1213 -------1214 1188 Calculate and apply necessary exposure time and filter adjustments. 1215 1189 1216 Description 1217 ----------- 1218 The function returns 1 if transmission or exposure time are changed, 01219 otherwise.1190 Description: 1191 1192 The function returns 1 if transmission or exposure time are changed, 0 1193 otherwise. 1220 1194 1221 1195 """ … … 1431 1405 def _auto_check_exposure '{ 1432 1406 """ 1433 Summary1434 -------1435 1407 Make sure the user-entered exposure times are consistent 1436 1408 1437 Usage 1438 ----- 1439 :: 1409 Usage:: 1440 1410 1441 1411 > _auto_check_exposure … … 1457 1427 def _auto_check_levels '{ 1458 1428 """ 1459 Summary1460 -------1461 1429 Make sure the user-entered count levels are consistent 1462 1430 1463 Usage 1464 ----- 1465 :: 1431 Usage:: 1466 1432 1467 1433 > _auto_check_levels … … 1490 1456 def _auto_calc_exposure(t) '{ 1491 1457 """ 1492 Summary1493 -------1494 1458 Make sure the requested exposure time is between the min and max values and 1495 1459 round it to the given count time precision. 1496 1460 1497 Usage 1498 ----- 1499 :: 1461 Usage:: 1500 1462 1501 1463 > adjusted_time = _auto_calc_exposure(requested_time) … … 1522 1484 def _auto_adjust_redo() '{ 1523 1485 """ 1524 Summary1525 -------1526 1486 Determines whether the auto-adjusting has been successful. 1527 1487 1528 Description 1529 ----------- 1530 If the current exposure does not meet the required criteria, counting 1531 is repeated until the best possible filter and exposure settings have been 1532 obtained, or a maximum number of retry counts has been reached. 1533 The function returns 1 in case of success, 0 otherwise. 1534 1535 Usage 1536 ----- 1537 :: 1488 Description: 1489 1490 If the current exposure does not meet the required criteria, counting 1491 is repeated until the best possible filter and exposure settings have been 1492 obtained, or a maximum number of retry counts has been reached. 1493 The function returns 1 in case of success, 0 otherwise. 1494 1495 Usage:: 1538 1496 1539 1497 > success = _auto_adjust_redo() 1540 1498 1541 1499 .. note:: 1542 This macro makes use of the ``recount`` macro, which has to be added to SPEC1543 during the startup procedure.1500 This macro makes use of the :spec:def:`recount` macro, which has to be 1501 added to SPEC during the startup procedure. 1544 1502 1545 1503 """ … … 1586 1544 def _clear_screen '{ 1587 1545 """ 1588 Summary1589 -------1590 1546 Clears the terminal screen 1591 1547 1592 Description 1593 ----------- 1594 Clears the screen without losing the screen history or messing up the 1595 scrolling capabilities (this has been a problem for certain terminals) 1596 by blanking out the entire height of the screen and returning the cursor to 1597 the top left corner. 1548 Description: 1549 1550 Clears the screen without losing the screen history or messing up the 1551 scrolling capabilities (this has been a problem for certain terminals) 1552 by blanking out the entire height of the screen with newlines and 1553 returning the cursor to the top left corner. 1554 1555 Usage:: 1556 1557 > _clear_screen 1558 1598 1559 """ 1599 1560 -
specdomain/trunk/src/specdomain/comparison/conf.py
r1010 r1011 95 95 # a list of builtin themes. 96 96 html_theme = 'default' 97 html_theme = 'agogo' 98 html_theme = 'sphinxdoc' 97 99 98 100 # Theme options are theme-specific and customize the look and feel of a theme -
specdomain/trunk/src/specdomain/comparison/index.rst
r1008 r1011 9 9 10 10 This is an example of documenting SPEC macro source code with Sphinx. 11 12 .. seealso:: http://www.aps.anl.gov/Sectors/33_34/controls/spec/robodoc/auto_mac.html 11 13 12 14 .. autospecdir:: ./ -
specdomain/trunk/src/specdomain/comparison/starter.py
r996 r1011 7 7 (and provides a way to use the source-code debugger for the process) 8 8 ''' 9 10 import os11 import sphinx12 import sys13 9 14 10 import os -
specdomain/trunk/src/specdomain/doc/bpm.mac
r1007 r1011 23 23 24 24 25 Usage 26 ``qdo /epics/clients/spec/macros/bpm.mac`` 25 Usage:: 26 27 qdo /epics/clients/spec/macros/bpm.mac 27 28 """ 28 29
Note: See TracChangeset
for help on using the changeset viewer.