acs as the framework for integrating offline data reduction in alma

14
ADASS XV Framework for Framework for Integrating Offline Integrating Offline Data Reduction in Data Reduction in ALMA ALMA Steve Harrington, Steve Harrington, NRAO NRAO

Upload: warren-fitzpatrick

Post on 30-Dec-2015

23 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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

Page 2: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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

Page 3: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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.

Page 4: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV4

The big pictureThe big picture

Page 5: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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

Page 6: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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>

Page 7: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV7

Task Implementation – who does whatTask Implementation – who does what

Page 8: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV8

In-memory model of In-memory model of Parameter SetParameter Set

Page 9: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV9

In-memory model of In-memory model of Parameter SetParameter Set DefinitionDefinition (Meta-data) (Meta-data)

Page 10: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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();}

Page 11: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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

Page 12: ACS as the Framework for Integrating Offline Data Reduction in ALMA

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.

Page 13: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV13

Offline team: future directionOffline team: future direction

Page 14: ACS as the Framework for Integrating Offline Data Reduction in ALMA

ADASS XV 14

Questions?Questions?