Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Time info in report
Reply to topic
Author Message
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 2, 2015 2:23 PM    Post subject: Time info in report

Jarek,

I am working on a report design for a friend. I had it all set up and working well sending out both the report info and an excel data sheet. He has asked for a threshold line in the chart. This would require creating an average of the first three minutes of the session then setting the threshold to that value. That would get the % over/under into the chart. I was hoping to get the averaged data into the report graph as well. I am using a F_time transform and F_buffer to send out the datat at the right time. But i appears that the report can not perform actions at specific times. I can do this in an excel sheet generated during the session but it would be nice if there were a way to do this in the report.

Hope I am making sense.


Thanks for any help you can provide

George
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Jun 2, 2015 2:28 PM    Post subject:

It is hard for me to tell anything without seeing a snippet.

But ReportGenerator should be able to show averaged signal created by the TimeTransform element (I don't see why to use the Buffer though).
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 2, 2015 2:54 PM    Post subject:

Jarek,

I will send the snippet

I am looking the set the threshold to the average value over the first three minutes of data. Hence the buffer to send that info to the report.

Snippet to follow.


George
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Jun 2, 2015 3:53 PM    Post subject:

I modified the design you sent to do only the signal + averaged_value on the ReportGraph, I hope that will help:

http://proatech.com/design/ReportGraphWithAveragedSignal.bpd

Please note the advanced options in ExpressionEvaluator I used to measure the time.

I think the reason it didn't work before was because you used SessionTime to measure time in a design which was processing in batch mode (XDF reading data without "Keep original rate" selected). See more details about using batch mode vs real time:

http://www.bioera.net/manual.html#_Toc419206129

GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 2, 2015 5:27 PM    Post subject:

Jarek,

This is exactly what I was looking for. I reviewed the info in the manual that you suggested. Is there a resource where I can learn more about the advanced settings such as the info you placed in the snippet you sent me?


Thanks
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Jun 2, 2015 6:45 PM    Post subject:

The 2 advanced options in ExpressionEvaluator are described in manual (you may need to refresh your browser):

http://www.bioera.net/manual.html#_Toc419206184

They are relatively straightforward to use, although some basic java knowledge may be helpful to use them fully. But if you have any more detailed questions let me know.
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Jun 2, 2015 10:23 PM    Post subject:

Looks like I may need to explore Java a bit.

Thanks for all the help


George
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Jun 3, 2015 5:51 PM    Post subject:

In case of the snippet, there is very little java involved.

This is to calculate how many samples there are in 3 minutes:

SIGNAL_RATE * 3 * 60

The "SAMPLE_RATE" is predefined for each ExpressionEvaluator

The "counter" is an integer java variable (can be any name) used to count down (decrement) until it is 0 or less.

This operation is to decrement the value by 1:

--counter

It is equivalent to:

counter = counter - 1;

So the counter is being decremented once for each input value. During the first 3 minutes, the In1 values is passed (current averaged value) and after 3 minutes the last value is sent out (remembered in Out1 output variable).
Reply to topic