Changeset 1011


Ignore:
Timestamp:
Jul 13, 2012 2:03:45 PM (11 years ago)
Author:
jemian
Message:

various things while discussing with Christian

Location:
specdomain/trunk/src/specdomain
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • specdomain/trunk/src/specdomain/comparison/auto.mac

    r996 r1011  
    11"""
    2 ===================
    3 General Information
    4 ===================
    5 
    62Summary
    73=======
     
    136132
    137133No special configuration is needed to run these macros. Simply load the macro
    138 file and run ''auto_setup''::
     134file and run ``auto_setup``::
    139135
    140136> qdo auto.mac
     
    323319def auto_help '{
    324320  """
    325   Summary
    326   -------
    327321  Displays the auto help text.
    328322
    329   Usage
    330   -----
    331   ::
     323  Usage::
    332324
    333325     > auto_help
     
    368360def auto_setup '{
    369361  """
    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
    377367    The following parameters can be adjusted to fit the particular needs of an
    378368    experiment or detector type (global variables holding these parameters and
     
    462452      due to inconsistent choices of control parameters. [AUTO_RETRY_MAX = 20]
    463453
    464   Usage
    465   -----
    466   ::
     454  Usage::
    467455
    468456    > auto_setup
     
    507495def auto_off '{
    508496  """
    509   Summary
    510   -------
    511497  Turn off any automatic filter and exposure adjustments.
    512498
    513   Usage
    514   -----
    515   ::
     499  Usage::
    516500
    517501    > auto_off
     
    519503  .. note:: This command is equivalent to ``auto_set_level 0``
    520504
    521   See also
    522   --------
    523   auto_set_level, auto_on
     505  .. seealso::
     506     :spec:def:`auto_set_level`,
     507     :spec:def:`auto_on`
    524508
    525509  """
     
    531515
    532516#------------------------------------------------------------------------------
    533 def auto_on '{auto_set_level $*}'
    534 
     517def auto_on '{
     518  """
     519  See :spec:def:`auto_set_level`
     520  """
     521auto_set_level $*
     522
     523}'
     524
     525#------------------------------------------------------------------------------
    535526def auto_set_level '{
    536527  """
    537   Summary
    538   -------
    539528  Set the level of automatic filter and exposure adjustments.
    540529
    541   Usage
    542   -----
    543   ::
     530  Usage::
    544531
    545532    > auto_set_level [<level>]
     
    551538        if <level> is ommitted, the users is asked for input
    552539
    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::
    556551
    557552    > auto_set_level
     
    564559     ``auto_set_level`` and ``auto_on`` are equivalent to each other
    565560
    566   See also
    567   --------
    568   auto_off
     561  .. seealso::
     562     :spec:def:`auto_off`
    569563
    570564  """
     
    713707def auto_set_mode '{
    714708  """
    715   Summary
    716   -------
    717709  Set the acquisition mode to be used for the automatic filter and
    718710  exposure time adjustments.
    719711
    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::
    728718
    729719    > auto_set_mode [<mode>]
     
    733723        when called with no arguments, the user is prompted
    734724
    735   Example
    736   -------
    737   ::
     725  Example::
    738726
    739727    > auto_set_mode 1
    740728        use the pilot exposure mode for automatic adjustments.
    741729
    742   See also
    743   --------
    744   auto, auto_setup
     730  .. seealso::
     731
     732    :spec:def:`auto_setup`
    745733
    746734  """
     
    776764def auto_set_exposure '{
    777765  """
    778   Summary
    779   -------
    780766  Set the maximum and minimum exposure times used for automatic exposure
    781767  adjustments.
    782768
    783   Usage
    784   -----
    785   ::
     769  Usage::
    786770
    787771    > auto_set_exposure [<min> <max>]
     
    789773        when called with no arguments, the user is prompted
    790774
    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
    797785
    798786  """
     
    821809def auto_show '{
    822810  """
    823   Summary
    824   -------
    825811  Display the current auto settings.
    826812
    827   Usage
    828   -----
    829   ::
     813  Usage::
    830814
    831815    > auto_show
     
    871855def auto_show_exposure '{
    872856  """
    873   Summary
    874   -------
    875857  Display the current auto-level exposure settings.
    876858
    877   Usage
    878   -----
    879   ::
     859  Usage::
    880860
    881861    > auto_show_exposure
     
    901881
    902882  .. 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`.
    905886  """
    906887
     
    938919def _auto_set_option '{
    939920  """
    940   Summary
    941   -------
    942921  Sets a new value for a given option
    943922
    944   Description
    945   -----------
    946   Sets a new value for a given option from the options menu that was created
    947   with the _auto_print_setup command.
     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.
    948927
    949928  .. 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`.
    952932
    953933  """
     
    11811161def _auto_analyze_exposure '{
    11821162  """
    1183   Summary
    1184   -------
    11851163  Analyze the previous exposure
    11861164
    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::
    11991175
    12001176    > _auto_analyze_exposure
     
    12101186def _auto_adjust() '{
    12111187  """
    1212   Summary
    1213   -------
    12141188  Calculate and apply necessary exposure time and filter adjustments.
    12151189
    1216   Description
    1217   -----------
    1218   The function returns 1 if transmission or exposure time are changed, 0
    1219   otherwise.
     1190  Description:
     1191
     1192    The function returns 1 if transmission or exposure time are changed, 0
     1193    otherwise.
    12201194
    12211195  """
     
    14311405def _auto_check_exposure '{
    14321406  """
    1433   Summary
    1434   -------
    14351407  Make sure the user-entered exposure times are consistent
    14361408
    1437   Usage
    1438   -----
    1439   ::
     1409  Usage::
    14401410
    14411411    > _auto_check_exposure
     
    14571427def _auto_check_levels '{
    14581428  """
    1459   Summary
    1460   -------
    14611429  Make sure the user-entered count levels are consistent
    14621430
    1463   Usage
    1464   -----
    1465   ::
     1431  Usage::
    14661432
    14671433    > _auto_check_levels
     
    14901456def _auto_calc_exposure(t) '{
    14911457  """
    1492   Summary
    1493   -------
    14941458  Make sure the requested exposure time is between the min and max values and
    14951459  round it to the given count time precision.
    14961460
    1497   Usage
    1498   -----
    1499   ::
     1461  Usage::
    15001462
    15011463    > adjusted_time = _auto_calc_exposure(requested_time)
     
    15221484def _auto_adjust_redo() '{
    15231485  """
    1524   Summary
    1525   -------
    15261486  Determines whether the auto-adjusting has been successful.
    15271487
    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::
    15381496
    15391497    > success = _auto_adjust_redo()
    15401498
    15411499  .. note::
    1542      This macro makes use of the ``recount`` macro, which has to be added to SPEC
    1543      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.
    15441502
    15451503  """
     
    15861544  def _clear_screen '{
    15871545    """
    1588     Summary
    1589     -------
    15901546    Clears the terminal screen
    15911547
    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
    15981559    """
    15991560
  • specdomain/trunk/src/specdomain/comparison/conf.py

    r1010 r1011  
    9595# a list of builtin themes.
    9696html_theme = 'default'
     97html_theme = 'agogo'
     98html_theme = 'sphinxdoc'
    9799
    98100# Theme options are theme-specific and customize the look and feel of a theme
  • specdomain/trunk/src/specdomain/comparison/index.rst

    r1008 r1011  
    99
    1010This 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
    1113
    1214.. autospecdir:: ./
  • specdomain/trunk/src/specdomain/comparison/starter.py

    r996 r1011  
    77(and provides a way to use the source-code debugger for the process)
    88'''
    9 
    10 import os
    11 import sphinx
    12 import sys
    139
    1410import os
  • specdomain/trunk/src/specdomain/doc/bpm.mac

    r1007 r1011  
    2323
    2424
    25 Usage
    26         ``qdo /epics/clients/spec/macros/bpm.mac``
     25Usage::
     26
     27        qdo /epics/clients/spec/macros/bpm.mac
    2728"""
    2829
Note: See TracChangeset for help on using the changeset viewer.