| <<O>> Difference Topic BalanceExamples (r1.2 - 10 Feb 2005 - NicoleRadziwill) |
| Changed: | |||
| < < | * From python import the Balance module: | ||
| > > |
| ||
| Added: | |||
| > > |
| ||
| Added: | |||
| > > | is this correct? didn't work during integ tests 2/9; had to use gbt.something.config.Balance | ||
| Added: | |||
| > > |
| ||
| Changed: | |||
| < < | * Create a Balance object with a list of the devices to be balanced. Supported devices are "acs", "ifrack", "pf" and "sp". | ||
| > > |
| ||
| Added: | |||
| > > | Are inside parens supposed to be brackets?? | ||
| Added: | |||
| > > |
| ||
| Added: | |||
| > > | |||
| Changed: | |||
| < < | |||
| > > | |||
| Added: | |||
| > > |
2. Balancing from the astrid "Command Console"Directions are the same as for "Balancing from the Python Command Line" (step 1 above), but theimportstep is not needed. | ||
| Added: | |||
| > > |
3. Balancing from the Config Tool | ||
| Deleted: | |||
| < < |
2. Balancing from the Config Tool | ||
| Changed: | |||
| < < | This results in the IFRack to be balanced. | ||
| > > | This results in the IFRack to be balanced. | ||
| Changed: | |||
| < < | Results in balancing the Prime Focus Receiver, followed by the IFRack, followed by the Spectrometer. | ||
| > > | Results in balancing the Prime Focus Receiver, followed by the IFRack, followed by the Spectrometer. | ||
| Changed: | |||
| < < | The IFRack will be balanced. Note that there are no balancing options for the IFRack | ||
| > > | The IFRack will be balanced. Note that there are no balancing options for the IFRack | ||
| Deleted: | |||
| < < |
| ||
| <<O>> Difference Topic BalanceExamples (r1.1 - 07 Dec 2004 - MelindaMello) |
| Added: | |||||||||||||
| > > |
%META:TOPICINFO{author="MelindaMello" date="1102447860" format="1.0" version="1.1"}%
GBT Balance Usage
1. Balancing from the python command lineFrom 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 * From python import the Balance module: from Balance import * * Create a Balance object with a list of the devices to be balanced. Supported devices are "acs", "ifrack", "pf" and "sp". b = Balance(("pf", "ifrack")) *To perform the balance, the balance method is called. b.balance() 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 Config ToolThe 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:
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
| ||||||||||||
| Topic BalanceExamples . { View | Diffs | r1.2 | > | r1.1 | More } |
|
Revision r1.1 - 07 Dec 2004 - 19:31 GMT - MelindaMello 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. |