Calculating the internal extinction with data from leda
Created: 2012-05-23 19:12:49
Last updated: 2015-03-25 11:15:25
This workflow queries to Sesame service to extract the RA and DEC coordinates. Then, with these coordinates, it queries the ConeSearch services of SLOAN to get the Morphological Type and the logr25. The last step of the workflow is a python tool which calculates the internal extinction using the data obtained before.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (1)
Name |
Description |
list_cig_name |
|
Processors (18)
Name |
Type |
Description |
Extracting_RA |
localworker |
Scriptimport org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader(false);
reader.setIncludeInternalDTDDeclarations(false);
reader.setIncludeExternalDTDDeclarations(false);
Document document = reader.read(new StringReader(xmltext));
List nodelist = document.selectNodes(xpath);
// Process the elements in the nodelist
ArrayList outputList = new ArrayList();
ArrayList outputXmlList = new ArrayList();
String val = null;
String xmlVal = null;
for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
Node element = (Node) iter.next();
xmlVal = element.asXML();
val = element.getStringValue();
if (val != null && !val.equals("")) {
outputList.add(val);
outputXmlList.add(xmlVal);
}
}
List nodelist=outputList;
List nodelistAsXML=outputXmlList; |
SesameXML |
wsdl |
Wsdlhttp://cdsws.u-strasbg.fr/axis/services/Sesame?wsdlWsdl OperationSesameXML |
xpath_for_RA |
stringconstant |
Value//jradeg |
Extracting_DEC |
localworker |
Scriptimport org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader(false);
reader.setIncludeInternalDTDDeclarations(false);
reader.setIncludeExternalDTDDeclarations(false);
Document document = reader.read(new StringReader(xmltext));
List nodelist = document.selectNodes(xpath);
// Process the elements in the nodelist
ArrayList outputList = new ArrayList();
ArrayList outputXmlList = new ArrayList();
String val = null;
String xmlVal = null;
for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
Node element = (Node) iter.next();
xmlVal = element.asXML();
val = element.getStringValue();
if (val != null && !val.equals("")) {
outputList.add(val);
outputXmlList.add(xmlVal);
}
}
List nodelist=outputList;
List nodelistAsXML=outputXmlList; |
xpath_for_DEC |
stringconstant |
Value//jdedeg |
Flatten_List |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Flatten_List_2 |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
VII_237 |
rest |
|
SR_0.001 |
stringconstant |
Value0.001 |
filter_logr25_Mtype |
stringconstant |
ValuelogR25 Mtype |
calculate_internal_extinction |
externaltool |
|
Write_Text_File |
localworker |
Script
BufferedWriter out;
if (encoding == void) {
out = new BufferedWriter(new FileWriter(outputFile));
}
else {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding));
}
out.write(filecontents);
out.flush();
out.close();
outputFile = filecontents;
|
encoding_value |
stringconstant |
Valueutf-8 |
outputFile_value |
stringconstant |
Valueleda_file.txt |
Select_logr25_Mtype |
tpipe |
|
Format_conversion |
tpipe |
|
format_votable |
stringconstant |
Valuevotable |
format_ascii |
stringconstant |
Valueascii |
Outputs (6)
Name |
Description |
sesame |
|
ra |
|
dec |
|
leda_output |
|
logr25 |
|
data_internal_extinction |
|
Datalinks (27)
Source |
Sink |
SesameXML:return |
Extracting_RA:xml-text |
xpath_for_RA:value |
Extracting_RA:xpath |
list_cig_name |
SesameXML:name |
xpath_for_DEC:value |
Extracting_DEC:xpath |
SesameXML:return |
Extracting_DEC:xml-text |
Extracting_RA:nodelist |
Flatten_List:inputlist |
Extracting_DEC:nodelist |
Flatten_List_2:inputlist |
Flatten_List:outputlist |
VII_237:RA |
Flatten_List_2:outputlist |
VII_237:DEC |
SR_0.001:value |
VII_237:SR |
Flatten_List_2:outputlist |
calculate_internal_extinction:dec |
Flatten_List:outputlist |
calculate_internal_extinction:ra |
Write_Text_File:outputFile |
calculate_internal_extinction:leda_file |
encoding_value:value |
Write_Text_File:encoding |
outputFile_value:value |
Write_Text_File:outputFile |
Format_conversion:outputTable |
Write_Text_File:filecontents |
filter_logr25_Mtype:value |
Select_logr25_Mtype:filter |
VII_237:responseBody |
Select_logr25_Mtype:voTable |
format_votable:value |
Format_conversion:formatTableIn |
format_ascii:value |
Format_conversion:formatTableOut |
Select_logr25_Mtype:outputTable |
Format_conversion:voTable |
SesameXML:return |
sesame |
Flatten_List:outputlist |
ra |
Flatten_List_2:outputlist |
dec |
VII_237:responseBody |
leda_output |
Format_conversion:outputTable |
logr25 |
calculate_internal_extinction:STDOUT |
data_internal_extinction |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2
(of 3)
Credits (0)
(People/Groups)
None
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment