This project has moved and is read-only. For the latest updates, please go here.

Raw data empty cells

Jul 10, 2013 at 1:54 PM
Hi!
I want to read the raw data file with a matlab Skript. I got some weird results and found out there are some empty cells.
Unfortunately I was not able to reproduce the error. Therefore I want to ask if there are circumstances where OGAMA writes empty cells.
More ore less: is it a bug or a Feature?

greetings,
Ewald
Jul 13, 2013 at 7:30 PM
Hi Ewald,

If the raw data is (0,0) ogama interprets this such that at this time stamp there is no gaze data available, but tracking is successfully running (e.g. blinks). If the raw data is empty (null, null) from a coders point of view, ogama ignores the whole sample.
If there are samples with (null, 4) they also got SampleValidity.Null means ignoring.
It depends on the tracking device at which point ogama writes (0,0) or (null, null) into the database.
The default behavior is to check the Validity of the samples coming from the tracking device and if it is bad (means No eye found. Gaze data for both eyes are invalid.) use (0,0) , if there is no validity at all, use (null,null).

During import I use the method IOHelpers.IsNumeric(items[numPupilDiaYImportColumn]) which checks, if the imported value is a number:
/// <summary>
/// Returns a Boolean value indicating whether an expression can be evaluated as a number. 
/// </summary>
/// <param name="expression">object to test</param>
/// <returns><strong>True</strong> if given expression is a number,
/// otherwise <strong>false</strong>.</returns>
public static bool IsNumeric(object expression)
{
  // Variable to collect the Return value of the TryParse method.
  bool isNum;

  // Define variable to collect out parameter of the TryParse method. If the conversion fails, the out parameter is zero.
  double retNum;

  // The TryParse method converts a string in a specified style 
  // and culture-specific format to its double-precision floating point number equivalent.
  // The TryParse method does not generate an exception if the 
  // conversion fails. If the conversion passes, True is returned. 
  // If it does not, False is returned.
  isNum = double.TryParse(
    Convert.ToString(expression),
    System.Globalization.NumberStyles.Any,
    System.Globalization.NumberFormatInfo.InvariantInfo, 
    out retNum);

  return isNum;
}
So if this method returns false, then the raw data will have empty cells (null,null)
Kind regards,
Adrian
Jul 18, 2013 at 12:36 PM
Hi!
Thank's for the Information.

As I understood from this section
"If the raw data is empty (null, null) from a coders point of view, ogama ignores the whole sample.
If there are samples with (null, 4) they also got SampleValidity.Null means ignoring. "
The whole sample should be skipped --> the complete raw is 'null'
From my data it seems that if one value is not valid it becomes 'null'
Is the first true or the secound or both?
Everything would be ok but I have to consider this behaviour.


btw: is anyone at the ECEM this year? Thought it would be nice to meet some People from the "OGAMA community". Also nice Workshops this year. Especially I look Forward to the popillometry Workshop from Laeng. http://ecem2013.eye-movements.org/workshops/schedule

Greetings,
Ewald
Jul 25, 2013 at 3:20 PM
Hi Ewald,
both is true. If one or both of the x/y values are 'null' you should skip this whole sample.

Wish you good success at the ECEM, would like to be there, too.
Kind regards,
Adrian