Associate hessi flares with active regions
Created: 2011-06-22 12:02:12
Last updated: 2012-07-10 09:56:14
This workflow is querying the HFC ActiveRegions list and HEC hessi_flare list.
It requires a time periode and a search radius arround the centre of an Active Region as inputs
It produces two outputs: AnnotatedFeatureTable is a modified VOTable where a field is added with the number of associated hessi flares. CombinedTable is a 2 dimensional list with an VOTable for each Active region and one with an VOTable for all associated flares for that Active Region.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Anja Le Blanc, tidied up by Donal Fellows |
Titles (1)
Associate hessi flares with active regions |
Descriptions (1)
This workflow is querying the HFC ActiveRegions list and HEC hessi_flare list.
It requires a time periode and a search radius arround the centre of an Active Region as inputs
It produces two outputs: AnnotatedFeatureTable is a modified VOTable where a field is added with the number of associated hessi flares. CombinedTable is a 2 dimensional list with an VOTable for each Active region and one with an VOTable for all associated flares for that Active Region. |
Dependencies (0)
Inputs (3)
Name |
Description |
StartTime |
search interval start dateTime
|
EndTime |
search interval end dateTime
|
SearchRadius |
Radius around the centre of the Active Region in arcsec
|
Processors (11)
Name |
Type |
Description |
arcX |
stringconstant |
ValueFEAT_X_ARCSEC |
arcY |
stringconstant |
ValueFEAT_Y_ARCSEC |
date |
stringconstant |
ValueDATE_OBS |
HelioEventCatalog |
wsdl |
Wsdlhttp://festung1.oats.inaf.it:8080/helio-hec/HelioTavernaService?wsdlWsdl OperationQuery |
HelioFeatureCatalog |
wsdl |
Wsdlhttp://voparis-helio.obspm.fr/hfc-hqi/HelioTavernaService?wsdlWsdl OperationQuery |
FilterEmptyResults |
beanshell |
ScriptString[] parts = HECVOTable.split("");
if(parts.length <=1) {
HECEvent=-1;
//HECEvent=null;
} else {
HECEvent = HECVOTable;
}
MergeHESSIField |
beanshell |
Scriptint lastIndexOf(String text, String name){
int pos = text.lastIndexOf("<"+name);
int pos2 = text.indexOf(">",pos);
if(pos2!= -1 && text.charAt(pos2-1)=='/'){
return pos2+2;
}
return text.lastIndexOf(""+name+">")+ name.length()+3;
}
String addField = "\n"+
"Number of flares in the rhessi flare list of HEC hessi_flare\n"+
"\n";
String infoField ="\n";
int pos = lastIndexOf(HFCVOTable, "FIELD");
HFCout=HFCVOTable.substring(0,pos)+
addField+HFCVOTable.substring(pos);
pos = lastIndexOf(HFCout, "INFO");
HFCout=HFCout.substring(0,pos)+
infoField+HFCout.substring(pos);
int pos=0;
int pos2=-1;
String hfc=new String("");
int count =0;
while((pos2=HFCout.indexOf(" | ",pos+1))!=-1) {
String[] part= HECVOTable.get(count).split("");
hfc=hfc+HFCout.substring(pos,pos2)+" "+(part.length-1)+" | \n";
pos=pos2;
count++;
}
hfc=hfc+HFCout.substring(HFCout.lastIndexOf(" "));
HFCout=hfc;
|
MergeVOTables |
beanshell |
ScriptString reduceHFC(int number){
String infoField ="\n\n";
String reduced= new String("");
hfc=hfc.substring(0,hfc.lastIndexOf("")+7)+
infoField+hfc.substring(hfc.lastIndexOf("")+7);
reduced=reduced+hfc.substring(0,hfc.indexOf("")+12);
String[] tr = hfc.split("");
reduced=reduced+" ";
reduced=reduced+tr[number+1].substring(0,tr[number+1].indexOf(" ")+6);
reduced=reduced+hfc.substring(hfc.indexOf(""));
return reduced;
}
combined = new ArrayList();
for(int i=0;i |
BuildHFCQuery |
workflow |
|
BuildHECQuery |
workflow |
|
parseVOTable_2 |
beanshell |
Scriptimport java.io.StringReader;
import java.util.Hashtable;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.apache.xerces.parsers.DOMParser;
private void getPositions(){
NodeList nodesVO = docVO.getElementsByTagName("FIELD");
for(int i=0; i< nodesVO.getLength(); i++){
Element voFieldNode = nodesVO.item(i);
String name = voFieldNode.getAttribute("name");
for(int j = 0; j< collumn.size(); j++){
if(name.trim().equals(collumn.get(j).trim())){
positions.put(collumn.get(j), i);
debug = debug.concat("\npos " + i+ "\n");
}
}
}
}
private void findValues(){
String[] tr = voTable.split("");
debug= debug.concat("length tr " + tr.length + "\n");
for(int i = 1; i< tr.length; i++)
{
String[] td = tr[i].split("");
debug= debug.concat("length td " + td.length + "\n");
for(int j =0; j< collumn.size();j++){
String value = td[positions.get(collumn.get(j))+1];
debug= debug.concat(" value " + value.trim().length() + "\n");
if(value!=null && value.trim().length()>0){
valueLists.get(j).add(value.substring(0,value.lastIndexOf("<")));
} else
{
valueLists.get(j).add("");
}
}
}
}
Hashtable positions= new Hashtable();
List valueLists = new ArrayList();
for(int i=0;i
|
Beanshells (9)
Name |
Description |
Inputs |
Outputs |
FilterEmptyResults |
|
HECVOTable
|
HECEvent
|
MergeHESSIField |
|
HECVOTable
HFCVOTable
|
HFCout
|
MergeVOTables |
|
hec
hfc
|
combined
|
parseVOTable_2 |
|
voTable
collumn
|
valueLists
debug
collumn
|
ConstructWhere |
|
coord_x1
coord_x2
coord_y1
coord_y2
x_name
y_name
date_start
date_end
date_start_name
date_end_name
table
|
whereclause
|
InputDataHEC |
|
arc
hfc
hfc_header
|
date_start
date_stop
coord_x1
coord_y1
coord_x2
coord_y2
|
makeLists3 |
|
list
|
listlist
|
makeLists1 |
|
list
|
listlist
|
makeLists2 |
|
list
|
listlist
|
Outputs (3)
Name |
Description |
AnnotatedFeatureTable |
VOTable - hfc results with an added collumn for the number of associated hessi flares
|
CombinedTable |
List of Lists of VOTables; first VOTable contains the HFC record for each Active Region for which flares could be associated. second VOTable contains the HEC records for all associated hessi flares
|
parseVOTable_debug |
|
Datalinks (19)
Source |
Sink |
BuildHECQuery:Query |
HelioEventCatalog:query |
BuildHFCQuery:Query |
HelioFeatureCatalog:query |
HelioEventCatalog:response |
FilterEmptyResults:HECVOTable |
HelioEventCatalog:response |
MergeHESSIField:HECVOTable |
HelioFeatureCatalog:response |
MergeHESSIField:HFCVOTable |
FilterEmptyResults:HECEvent |
MergeVOTables:hec |
HelioFeatureCatalog:response |
MergeVOTables:hfc |
StartTime |
BuildHFCQuery:StartTime |
EndTime |
BuildHFCQuery:EndTime |
SearchRadius |
BuildHECQuery:ArcSearchRadius |
parseVOTable_2:collumn |
BuildHECQuery:ColumnNames |
parseVOTable_2:valueLists |
BuildHECQuery:ColumnContents |
HelioFeatureCatalog:response |
parseVOTable_2:voTable |
arcX:value |
parseVOTable_2:collumn |
arcY:value |
parseVOTable_2:collumn |
date:value |
parseVOTable_2:collumn |
MergeHESSIField:HFCout |
AnnotatedFeatureTable |
MergeVOTables:combined |
CombinedTable |
parseVOTable_2:debug |
parseVOTable_debug |
Uploader
License
All versions of this Workflow are
licensed under:
Version 3 (latest)
(of 3)
Credits (1)
(People/Groups)
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
(21)
Only the first 2 workflows that use similar services are shown. View all workflows that use these services.
Comments (0)
No comments yet
Log in to make a comment