acs as the framework for integrating offline data reduction in alma
DESCRIPTION
ACS as the Framework for Integrating Offline Data Reduction in ALMA. Steve Harrington, NRAO. What is a Task?. For our purposes, a task is: A concise process which starts up, performs some processing, and then shuts down - PowerPoint PPT PresentationTRANSCRIPT
ADASS XV
ACS as the Framework for ACS as the Framework for Integrating Offline Data Integrating Offline Data
Reduction in ALMAReduction in ALMA
Steve Harrington, NRAOSteve Harrington, NRAO
ADASS XV2
What is a Task?What is a Task?
• For our purposes, a task is:For our purposes, a task is:– A concise process which starts up, performs some A concise process which starts up, performs some
processing, and then shuts downprocessing, and then shuts down– It may or may not require additional services from the It may or may not require additional services from the
ALMA Common Software (ACS) frameworkALMA Common Software (ACS) framework– It should be able to run, at least in a locally hosted It should be able to run, at least in a locally hosted
manner, whether or not ACS services are presentmanner, whether or not ACS services are present– It requires input data in the form of (a set of) It requires input data in the form of (a set of)
parametersparameters
ADASS XV3
What is a Parameter Set?What is a Parameter Set?
• For our purposes, a Parameter Set is:For our purposes, a Parameter Set is:– A grouping of individual parameters which A grouping of individual parameters which
collectively are used as input to a particular taskcollectively are used as input to a particular task– Individual parameters may be of various types, e.g. Individual parameters may be of various types, e.g.
string, int, double, boolean, arrays of these simple string, int, double, boolean, arrays of these simple types, etc.types, etc.
– Parameters may have default values, constraints Parameters may have default values, constraints (e.g. max/min), list of (enumerated) valid values, (e.g. max/min), list of (enumerated) valid values, associated help text, etc.associated help text, etc.
ADASS XV4
The big pictureThe big picture
ADASS XV5
Task Use CasesTask Use Cases
Writes ACS Component, wrapping AIPS++ functionality
Describes task meta- data
Implements Task Logic
Runs task, providing input data
AIPS++ Developer (or code generation
framework)
Task Author
Task User
E.g. task's parameters, help information, required and optional inputs, default values, etc. Via XML
Defining value of (required, non- defaulted) inputs via XML or on command- line
Calls through to
ADASS XV6
Task meta-data (XML) written by Task authorTask meta-data (XML) written by Task author
<psd:pset> <!– XML header info omitted for brevity --> <name>Simple Sample Task</name> <comment>simple example of a task</comment> <param xsi:type="psd:string">
<name>msname</name><required>true</required><prompt>e.g. myvladata.ms</prompt><help>name of output ms</help>
</param> <param xsi:type="psd:double">
<name>centerfreq</name><required>true</required><prompt>e.g. 1.489 GHz</prompt><help>frequency of data to extract</help>
</param> <param xsi:type="psd:int">
<name>iterations</name><required>false</required><prompt>short help goes here</prompt><help>verbose help goes here</help><default>10</default><max>12</max><validValues>
<value>10</value><value>11</value><value>12</value>
</validValues> </param>
</psd:pset>
ADASS XV7
Task Implementation – who does whatTask Implementation – who does what
ADASS XV8
In-memory model of In-memory model of Parameter SetParameter Set
ADASS XV9
In-memory model of In-memory model of Parameter SetParameter Set DefinitionDefinition (Meta-data) (Meta-data)
ADASS XV10
Example of a Task’s go() implementationExample of a Task’s go() implementation
void cleanImpl::go(ParameterSet& pset, TaskServices& taskServices){ // instantiate an AIPS++ imager component ImagerComp comp;
// instantiate an AIPS++ record for the imager component’s parameters Record aipsParamSet(comp.getParams());
// convert the ParameterSet passed to go() by ACS Task logic into an AIPS++ Record // conversion involves querying ParameterSet and setting items in AIPS++ Record convertPset(pset, aipsParamSet);
// set the AIPS++ imager component’s parameters with the AIPS++ record from above comp.setParams(aipsParamSet);
// call the clean method on the AIPS++ imager component comp.clean();}
ADASS XV11
Running a TaskRunning a Task
• For the Task User, running a task involves:For the Task User, running a task involves:– simply executing a command at the command promptsimply executing a command at the command prompt
• Input Parameters:Input Parameters:– passed as name=value pairs on the command line, e.g.passed as name=value pairs on the command line, e.g.
simpleTask iterations=10 msname=test intArray=1,2,3simpleTask iterations=10 msname=test intArray=1,2,3
– Can also be passed in via an XML file; command-line parameters are Can also be passed in via an XML file; command-line parameters are transformed into XML so XML is used in all casestransformed into XML so XML is used in all cases
ADASS XV12
Running a Task – what happens?Running a Task – what happens?
• Parameters from the command-line are parsed and Parameters from the command-line are parsed and converted into XML (unless XML is provided)converted into XML (unless XML is provided)
• Two XML docs, one written in advance by Task Two XML docs, one written in advance by Task Author (i.e. task meta-data), one created (or provided) Author (i.e. task meta-data), one created (or provided) at run-time (i.e. run-time values), are then validated at run-time (i.e. run-time values), are then validated against two corresponding XML schemasagainst two corresponding XML schemas
• If validation succeeds, go() method is invoked which If validation succeeds, go() method is invoked which does the Task’s work. Otherwise, an error describing does the Task’s work. Otherwise, an error describing the problem(s) is generated.the problem(s) is generated.
ADASS XV13
Offline team: future directionOffline team: future direction
ADASS XV 14
Questions?Questions?