NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Software > BalanceExamples
   Changes | Index | Contents | Search | Statistics | Go

GBT Balance Usage

  Main     Usage     Examples     Enhancement Requests     Troubleshooting     Updates  


1. Balancing from the python command line

From the command line, the Balance class serves as the interface to the API. Its use can most easily be described by an example.

To balance the prime focus receiver and the IFRack

An optional parameter to the balance method can be provided. This parameter must be a dictionary that contains 1 or more of the following balancing options. Items which are not in the dictionary are assigned their default values. Non applicable options are ignored.

The default values are:

             target_level =  -11   Applicable when balancing the SpectralProcessor (sp)    :
             port = (1..41)        Applicable when balancing the Spectrometer (acs)   
             sample_time = 2       Applicable when balancing thePrimeFocusReceivers(pf)  
             cal = 'off'           Applicable when balancing the PrimeFocusReceivers(pf)  
              

Supported dictionary keys/value type are:

        target_level / float
        sample_time  / int
        cal / string containing "on" or "off" -- other values will be treated as if "on" was specified
        port/ tuple containing integers from 1 to 41

An example of a dictionary containing valid options and its use in a balance method call is:


         b = Balance(("pf", "ifrack, acs"))   

         opt = { "target_level": 4, 
                 "sample_time" : 5,
                 "cal"         : "on",
                 "port"        : (9,13)
                }
         b.balance(opt)

The prime focus receiver, the IFRack and the spectrometer are balanced with the following options:

2. Balancing from the astrid "Command Console"

Directions are the same as for "Balancing from the Python Command Line" (step 1 above), but the

import
step is not needed.

3. Balancing from the Config Tool

The config tool provides its own interface to the Balance API. The interface is through one method called bal().

The bal() method accepts the following optional parameters:

All the parameters are optional. The default values for these parameters are:

To perform a balance from the config tool interface type :

   g = gbtsetup()

   g.bal()
This results in the IFRack to be balanced.

The command:

   g.bal(mgrs=("pf", "ifrack", "acs"))
Results in balancing the Prime Focus Receiver, followed by the IFRack, followed by the Spectrometer. The default parameters are used in balancing all the devices.

Alternately to specify balancing options

         opt = { "sample_time" : 5,
                 "cal"         : "on",
                 "port"        : (9,13)
                }
   
      b.bal(mgrs=("pf", "ifrack", "acs"), options = opt)

The Prime Focus receiver will be balanced with the sample_time of 5 and the cal diodes "on" (if they are currently "on")

The IFRack will be balanced. Note that there are no balancing options for the IFRack

The Spectrometer will be balanced with the resulting duty cycles displayed for ports 9 and13


4. Core Team

Scientific Sponsor: KarenONeil FrankGhigo
Technical Leads: MelindaMello

-- MelindaMello - 07 Dec 2004

Topic BalanceExamples . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.2 - 10 Feb 2005 - 16:14 GMT - NicoleRadziwill Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.