aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/timestamped_data
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user_guide/timestamped_data')
-rw-r--r--docs/user_guide/timestamped_data/data_synchronisation.md106
-rw-r--r--docs/user_guide/timestamped_data/introduction.md6
-rw-r--r--docs/user_guide/timestamped_data/ordered_dictionary.md19
-rw-r--r--docs/user_guide/timestamped_data/pandas_dataframe_conversion.md41
-rw-r--r--docs/user_guide/timestamped_data/saving_and_loading.md14
5 files changed, 0 insertions, 186 deletions
diff --git a/docs/user_guide/timestamped_data/data_synchronisation.md b/docs/user_guide/timestamped_data/data_synchronisation.md
deleted file mode 100644
index 5190eab..0000000
--- a/docs/user_guide/timestamped_data/data_synchronisation.md
+++ /dev/null
@@ -1,106 +0,0 @@
-Data synchronisation
-====================
-
-Recorded data needs to be synchronized to link them before further processings.
-
-The [TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) class provides various methods to help in such task.
-
-## Pop last before
-
-![Pop last before](../../img/pop_last_before.png)
-
-The code below shows how to use [pop_last_before](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer.pop_last_before) method in order to synchronise two timestamped data buffers with different timestamps:
-
-``` python
-from argaze import DataStructures
-
-# Assuming A_data_record and B_data_record are TimeStampedBuffer instances with different timestamps
-
-for A_ts, A_data in A_data_record.items():
-
- try:
-
- # Get nearest B data before current A data and remove all B data before (including the returned one)
- B_ts, B_data = B_data_record.pop_last_before(A_ts)
-
- # No data stored before A_ts timestamp
- except KeyError:
-
- pass
-
-```
-
-## Pop last until
-
-![Pop last until](../../img/pop_last_until.png)
-
-The code below shows how to use [pop_last_until](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer.pop_last_until) method in order to synchronise two timestamped data buffers with different timestamps:
-
-``` python
-from argaze import DataStructures
-
-# Assuming A_data_record and B_data_record are TimeStampedBuffer instances with different timestamps
-
-for A_ts, A_data in A_data_record.items():
-
- try:
-
- # Get nearest B data after current A data and remove all B data before
- B_ts, B_data = B_data_record.pop_last_until(A_ts)
-
- # No data stored until A_ts timestamp
- except KeyError:
-
- pass
-
-```
-
-## Get last before
-
-![Get last before](../../img/get_last_before.png)
-
-The code below shows how to use [get_last_before](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer.get_last_before) method in order to synchronise two timestamped data buffers with different timestamps:
-
-``` python
-from argaze import DataStructures
-
-# Assuming A_data_record and B_data_record are TimeStampedBuffer instances with different timestamps
-
-for A_ts, A_data in A_data_record.items():
-
- try:
-
- # Get nearest B data before current A data
- B_ts, B_data = B_data_record.get_last_before(A_ts)
-
- # No data stored before A_ts timestamp
- except KeyError:
-
- pass
-
-```
-
-## Get last until
-
-![Get last until](../../img/get_last_until.png)
-
-The code below shows how to use [get_last_until](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer.get_last_until) method in order to synchronise two timestamped data buffers with different timestamps:
-
-``` python
-from argaze import DataStructures
-
-# Assuming A_data_record and B_data_record are TimeStampedBuffer instances with different timestamps
-
-for A_ts, A_data in A_data_record.items():
-
- try:
-
- # Get nearest B data after current A data
- B_ts, B_data = B_data_record.get_last_until(A_ts)
-
- # No data stored until A_ts timestamp
- except KeyError:
-
- pass
-
-```
diff --git a/docs/user_guide/timestamped_data/introduction.md b/docs/user_guide/timestamped_data/introduction.md
deleted file mode 100644
index 974e2be..0000000
--- a/docs/user_guide/timestamped_data/introduction.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Timestamped data
-================
-
-Working with wearable eye tracker devices implies to handle various timestamped data like gaze positions, pupills diameter, fixations, saccades, ...
-
-This section mainly refers to [DataStructures.TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) class.
diff --git a/docs/user_guide/timestamped_data/ordered_dictionary.md b/docs/user_guide/timestamped_data/ordered_dictionary.md
deleted file mode 100644
index 64dd899..0000000
--- a/docs/user_guide/timestamped_data/ordered_dictionary.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Ordered dictionary
-==================
-
-[TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) class inherits from [OrderedDict](https://docs.python.org/3/library/collections.html#collections.OrderedDict) as data are de facto ordered by time.
-
-Any data type can be stored using int or float keys as timestamp.
-
-```python
-from argaze import DataStructures
-
-# Create a timestamped data buffer
-ts_data = DataStructures.TimeStampedBuffer()
-
-# Store any data type using numeric keys
-ts_data[0] = 123
-ts_data[0.1] = "message"
-ts_data[0.23] = {"key": value}
-...
-```
diff --git a/docs/user_guide/timestamped_data/pandas_dataframe_conversion.md b/docs/user_guide/timestamped_data/pandas_dataframe_conversion.md
deleted file mode 100644
index 7614e73..0000000
--- a/docs/user_guide/timestamped_data/pandas_dataframe_conversion.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-title: Pandas DataFrame conversion
----
-
-Pandas DataFrame conversion
-===========================
-
-A [Pandas DataFrame](https://pandas.pydata.org/docs/getting_started/intro_tutorials/01_table_oriented.html#min-tut-01-tableoriented) is a python data structure allowing powerful table processings.
-
-## Export as dataframe
-
-[TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) instance can be converted into dataframe provided that data values are stored as dictionaries.
-
-```python
-from argaze import DataStructures
-
-# Create a timestamped data buffer
-ts_data = DataStructures.TimeStampedBuffer()
-
-# Store various data as dictionary
-ts_data[10] = {"A_key": 0, "B_key": 0.123}}
-ts_data[20] = {"A_key": 4, "B_key": 0.567}}
-ts_data[30] = {"A_key": 8, "B_key": 0.901}}
-...
-
-# Convert timestamped data buffer into dataframe
-ts_buffer_dataframe = ts_buffer.as_dataframe()
-```
-
-ts_buffer_dataframe would look like:
-
-|timestamp|A_key|B_key|
-|:--------|:----|:----|
-|10 |0 |0.123|
-|20 |4 |0.567|
-|30 |8 |0.901|
-|... |... |... |
-
-## Import from dataframe
-
-Reversely, [TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) instance can be created from dataframe, as a result of which each dataframe columns label will become a key of data value dictionary. Notice that the column containing timestamp values have to be called 'timestamp'.
diff --git a/docs/user_guide/timestamped_data/saving_and_loading.md b/docs/user_guide/timestamped_data/saving_and_loading.md
deleted file mode 100644
index 4e6a094..0000000
--- a/docs/user_guide/timestamped_data/saving_and_loading.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Saving and loading
-==================
-
-[TimeStampedBuffer](../../argaze.md/#argaze.DataStructures.TimeStampedBuffer) instance can be saved as and loaded from JSON file format.
-
-```python
-
-# Save
-ts_data.to_json('./data.json')
-
-# Load
-ts_data = DataStructures.TimeStampedBuffer.from_json('./data.json')
-
-```