Get data and images for a date +/- 12 hours from MLSO_CHIP
Created: 2012-05-24 09:26:10
Last updated: 2012-05-24 09:29:11
From the date as input date +/- 12 hours of data from the MLSO web page is collated. Images for up to three images (closest to date; -1; +1) are created via autoplot
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Get data and images for a date +/- 12 hours from MLSO_CHIP |
Descriptions (0)
Dependencies (0)
Inputs (2)
Name |
Description |
date |
date (request will be +/- 12 hours)
|
Autoplot_color_bar |
colour bar to be used for generation of graphics.
Supported values:
color_wedge
grayscale
inverse_grayscale
wrapped_color_wedge
blue_black_red
blue_white_red
white_red_black
red_wedge
blue_red
|
Processors (5)
Name |
Type |
Description |
CallAutoplot |
beanshell |
Scriptimport java.net.URI;
URI uri = new URI(source);
url="http://sms.rcs.manchester.ac.uk:8080/AutoplotServlet/SimpleServlet?url=vap%2Bfts%3A"+uri.toASCIIString()+"&process=&font=sans-8&format=image%2Fpng&width=900&height=800&column=5em%2C100%25-10em&row=3em%2C100%25-3em&renderType=&foregroundColor=%23000000&backgroundColor=%23ffffff&plot.title="+source+"&plot.zaxis.range=-1200%20to%2060&colortable="+color_bar; |
selectURL |
beanshell |
Scriptimport java.text.SimpleDateFormat;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
sourceURL=new ArrayList();
long time = sdf.parse(date).getTime();
int closest=-1;
long diff=99999999;
if(dates.size()<1){
return;
}
for(int i =0; i |
create_start_end |
beanshell |
Scriptimport java.text.SimpleDateFormat;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
long dt = 12*60*60*1000;
start_time=sdf.format(new Date(sdf.parse(date).getTime()- dt));
end_time=sdf.format(new Date(sdf.parse(date).getTime()+ dt)); |
Get_Image_From_URL |
localworker |
Scriptif ((url == void) || (url == null)) {
throw new RuntimeException("The url must be specified");
}
URL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
} else {
inputURL = new URL(url);
}
int bytesRead = 0;
int totalBytesRead = 0;
InputStream is = inputURL.openStream();
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[2048];
while (true) {
bytesRead = is.read(buffer);
if (bytesRead == -1) {
break;
}
os.write(buffer, 0, bytesRead);
}
image = os.toByteArray();
is.close();
os.close();
|
getDataFromMLSO |
workflow |
|
Beanshells (7)
Name |
Description |
Inputs |
Outputs |
CallAutoplot |
|
source
color_bar
|
url
|
selectURL |
|
url
dates
date
|
sourceURL
|
create_start_end |
|
date
|
start_time
end_time
|
format_date |
|
date
date2
|
dateOut
|
filter_chip_url |
|
webpage
base_url
format_date
start_time
end_time
|
chip_url
dates
|
MergeLists |
|
lists
|
list
|
MergeLists_2 |
|
lists
|
list
|
Outputs (2)
Name |
Description |
Get_Image_From_URL_image |
|
url |
|
Datalinks (11)
Source |
Sink |
selectURL:sourceURL |
CallAutoplot:source |
Autoplot_color_bar |
CallAutoplot:color_bar |
date |
selectURL:date |
getDataFromMLSO:dates |
selectURL:dates |
getDataFromMLSO:url |
selectURL:url |
date |
create_start_end:date |
CallAutoplot:url |
Get_Image_From_URL:url |
create_start_end:end_time |
getDataFromMLSO:end_time |
create_start_end:start_time |
getDataFromMLSO:start_time |
Get_Image_From_URL:image |
Get_Image_From_URL_image |
getDataFromMLSO:url |
url |
Uploader
License
All versions of this Workflow are
licensed under:
BSD License
Version 1
(of 1)
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
(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