Index

request_flux device, type, pol, dt

Request that a specified receiver integrate and send back a flux.

Arguments:
ReceiverName device
The name of the external device that the request should be sent to. If this device isn't currently connected to the control program, then the command will be discarded.
FluxType type
The type of flux to integrate.
PolType type
The type of polarization to integrate.
Double dt
The integration time of the flux (hours). Beware that this is internally converted to seconds and rounded up to an integer number of seconds.

Example:
The following example tells the kuband receiver to integrate 10 seconds of raw fluxes from the antenna beam. It then waits up to 20 seconds for the receiver to finish integrating the flux. When the flux arrives, the example then prints it along with its standard deviation.
 request_flux kuband, ant, total, 0:0:10
 until $acquired(flux) | $elapsed > 0:0:20
 if($acquired(flux)) {
   print "Received flux = ", $requested_flux.flux, " +/- ", $requested_flux.sdev
 } else {
   print "Timed out waiting for a flux from the receiver."
 }
Context:
This command is designed for schedules that need to iteratively peak up the flux of a source, say by adjusting the pointing, or adjusting the focus. By default, receivers are thus expected to return the average flux of whatever channel or combination of channels and polarizations is likely to produce the highest signal to noise ratio. Individual receivers may optionally also provide separate configuration options, via the tell command, to configure how such fluxes are obtained.

In keeping with all other commands in the scheduling language, the request_flux command does not wait for the flux to be obtained before returning control to the scheduling script. Rather it just sends the request to the receiver, and leaves it to the schedule writer to decide when and for how long to wait for the flux reply. As shown in the above example, waiting for this reply can be done by using an until statement to wait for the $acquired(flux) function to become true. Once it becomes true, then the $requested_flux() function can be used to access the returned flux and its uncertainty.


Martin Shepherd (21-May-2010)