Details
-
Feature
-
Must have
-
Obs Mgt & Controls
-
-
-
Intra Program
-
1
-
1
-
0
-
Team_BUTTONS
-
Sprint 5
-
-
-
-
19.6
-
Stories Completed, Integrated, Outcomes Reviewed, Satisfies Acceptance Criteria, Accepted by FO
-
-
Team_BUTTONS
-
OMC-G1
Description
Allocate and observe are currently independent scripts, which has consequences for being able to link them together further into the system (i.e. for DP to understand what was allocated to what observation). By merging the scripts into a single command, we get closer to 'one observation one EB' (individual scripts currently generate individual EBs, and book-keeping down the line becomes simpler as well.
—
SW: A better title for a long-term fix would be 'Align EB lifecycle with the observation and script execution lifecycle', or 'Make the OET retain state between related script executions'.
For reasons of script maintainability and to give operators the option of a natural breakpoint between resource allocation, observing, and resource release, actions on an SBD are split into multiple scripts. Hence, we have a 'create SBI' script, a 'resource allocation' script, a 'observe all scans' script, and a 'release resources' script. The problem is that each script execution is considered independent and the OET does not retain or pass any state between them. Hence, the SBI ID created when running the 'create SBI' script is not passed to any subsequent 'allocate resources' or 'observe SBI' script. In fact, the OET doesn't return any values from script execution, so there's no way of a user getting the SBI ID from the 'create SBI' script! (You could observe the script execution events, but you'd need to know what you're looking for..). Similarly, there's no easy way to pass EB IDs between scripts, so currently every allocate, observe, or release script would have to generate a new EB ID, create a new EB, and record its operations in that, whereas an operator or astronomer probably expects output from a related sequence of instructions such as resource allocation, observing, and resource release scripts for one observation to go into one EB.
Merging all scripts into one big 'do everything' Python script is a workaround that resolves the issue of state transfer and of creating multiple EBs but puts constraints on the use of SBs as, practically, it only becomes possible to run the big 'do everything' script and not any finer-grained operation such as 'allocate', 'observe', 'run next scan in sequence', etc. A better resolution would be to talk to the telescope operators to find out the granularity of operations they expect to perform on an SB. Then, if state transfer is required between scripts , assess and modify the OET to allow this functionality.
As the example of passing SBI IDs between scripts suggests, this feature could be informed by the 'define SBI lifecycle' feature (SP-3436).