Thursday, February 18, 2010

Major changes to daily RDAHMM service

We spent a lot of time re-writing a major part of the daily RDAHMM service, and here are some important changes:

1. A large amount of dirty codes are cleared up. The DailyRDAHMMService class is replaced with a new DailyRDAHMMStation class, which performs all functions DailyRDAHMMService used to complete, but with better flexibility and extendability. Some old functions of the DailyRDAHMMThread class are also moved to the DailyRDAHMMStation class.

2. The process of modeling and evaluation for each station are changed to the following sequences:
(1) Check if a model already exists. If so, count the non-duplicated data in the model input -- if more than 200, skip the whole modeling process and go to step (5); otherwise delete the model files and continue with step (2).

(2) Choose intial start and end date for modeling input. First read the startDate saved in jplDates.txt or sopacDates.txt.
if startDate < 2006-09-30 and startDate + 1year <= 2006-09-30 then
endDate = 2006-09-30
else
if startDate + 1year <= "today" then
endDate = startDate + 1year
else
set endDate to null
give up the modeling process and return failure
endif
endif

(3) Adjust endDate.
while number of non-duplicated data in the model input of [startDate, endDate] is less than 200 do
If endDate > "today" then
set endDate to null
give up the modeling process and return failure
endif
endDate += 1year
endwhile

(4) Build the model.
Fill the model input with duplicated data, and build the model.

(5) Do evaluation.
Read the lastDate of model input from the model input file;
Query for input for [lastDate+1, "today"];
Append the queried input to the model input, and fill the combined input with duplicated data;
Do evaluation on the filled input.

3. Two sub-elements are added to each "station" element in the XML file of the station list: one "modelStartDate" sub-element and one "modelEndDate" sub-element. Since these dates are different for different context groups, we now have two different station list files for the two context groups (sopacGlobk and jplGipsy) analyzed.

4. The service is now scheduled to run every seven days, since we got informed that the GPS data are updated in a weekly manner. Maybe we should change the service name to "weekly RDAHMM service"?

Interactive plots added to daily RDAHMM portlet

We added interactive plots to the daily RDAHMM portlet at http://gw11.quarry.iu.teragrid.org/gridsphere/gridsphere?cid=DailyRDAHMM-Portlet. Now if you click on a station marker on the Google Map in the portlet, the pop-up window will show an interactive plot component, where you can view the station's GPS data plot in different time scales, from the most recent one week to all time.

The implementation of this interactive plot is an embedded flash object which does the plotting job given two links as arguments: one for the .raw file of the station's GPS data input, and one for the .Q file of the station's all-time state change sequence. This flash object is made by Sidd and Josh in PTI -- many thanks to their help with QuakeSim.

Some times the flash object could load slowly due to the network activity of the machine hosting it.