From f2334a3094561b41e94bac69fa73c7411a8fbbf5 Mon Sep 17 00:00:00 2001
From: Tristan Walter <twalter@orn.mpg.de>
Date: Fri, 16 Oct 2020 15:09:54 +0200
Subject: [PATCH] sort parameters by name

---
 .../commons/common/misc/default_settings.cpp  |   14 +-
 Application/src/commons/common/misc/detail.h  |    4 +-
 docs/parameters_tgrabs.rst                    |  276 ++--
 docs/parameters_trex.rst                      | 1372 ++++++++---------
 4 files changed, 833 insertions(+), 833 deletions(-)

diff --git a/Application/src/commons/common/misc/default_settings.cpp b/Application/src/commons/common/misc/default_settings.cpp
index 675b5c9..b462fb4 100644
--- a/Application/src/commons/common/misc/default_settings.cpp
+++ b/Application/src/commons/common/misc/default_settings.cpp
@@ -223,24 +223,24 @@ namespace cmn {
             ss << extra_text;
         
         auto array = utils::split(filter, ';');
+        auto keys = extract_keys(docs);
         
-        for (auto &k : docs) {
-            if(contains(array, k.first))
+        for (auto &key : keys) {
+            if(contains(array, key))
                 continue;
             
-            auto value = config[k.first].get().valueString();
+            auto value = config[key].get().valueString();
             std::string doc = "";
-            if(docs.find(k.first) != docs.end()) {
-                doc = docs.at(k.first);
+            if(docs.find(key) != docs.end()) {
+                doc = docs.at(key);
             }
             
             std::string access_level = "PUBLIC";
-            auto key = k.first;
             auto it = fn.find(key);
             if(it != fn.end() && it->second > AccessLevelType::PUBLIC)
                 access_level = it->second.name();
             
-            print_parameter(k.first, config[k.first].get().type_name(), value, doc);
+            print_parameter(key, config[key].get().type_name(), value, doc);
         }
         
         return ss.str();
diff --git a/Application/src/commons/common/misc/detail.h b/Application/src/commons/common/misc/detail.h
index 09490cf..902e0b5 100644
--- a/Application/src/commons/common/misc/detail.h
+++ b/Application/src/commons/common/misc/detail.h
@@ -749,8 +749,8 @@ namespace cmn {
     template< typename tMap >
     first_t< typename tMap::value_type > first( const tMap& ) { return first_t< typename tMap::value_type >(); }
     
-    template<typename KeyType, typename ValueType>
-    inline std::set<KeyType> extract_keys(const std::map<KeyType, ValueType>& m) {
+    template<typename Map, typename KeyType = typename Map::key_type>
+    inline std::set<KeyType> extract_keys(const Map& m) {
         std::set<KeyType> v;
         std::transform( m.begin(), m.end(), std::inserter( v, v.end() ), first(m) );
         return v;
diff --git a/docs/parameters_tgrabs.rst b/docs/parameters_tgrabs.rst
index 278feda..9ad1949 100644
--- a/docs/parameters_tgrabs.rst
+++ b/docs/parameters_tgrabs.rst
@@ -7,54 +7,55 @@ TGrabs parameters
 
 .. NOTE::
 	|grabs| has a live-tracking feature, allowing users to extract positions and postures of individuals while recording/converting. For this process, all parameters relevant for tracking are available in |grabs| as well -- for a reference of those, please refer to :doc:`parameters_trex`.
-.. function:: enable_closed_loop(bool)
+.. function:: adaptive_threshold_scale(float)
 	:noindex:
 
-	**default value:** false
+	**default value:** 2
 
 
-	When enabled, live tracking will be executed for every frame received. Frames will be sent to the 'closed_loop.py' script - see this script for more information. Sets `enable_live_tracking` to true. Allows the tracker to skip frames by default, in order to catch up to the video.
+	Threshold value to be used for adaptive thresholding, if enabled.
 
-	.. seealso:: :func:`enable_live_tracking`, 
 
 
-.. function:: mask_path(path)
+.. function:: approximate_length_minutes(uint)
 	:noindex:
 
-	**default value:** ""
+	**default value:** 0
 
 
-	Path to a video file containing a mask to be applied to the video while recording. Only works for conversions.
+	If available, please provide the approximate length of the video in minutes here, so that the encoding strategy can be chosen intelligently. If set to 0, infinity is assumed. This setting is overwritten by `stop_after_minutes`.
 
+	.. seealso:: :func:`stop_after_minutes`, 
 
 
-.. function:: meta_build(string)
+.. function:: average_samples(int)
 	:noindex:
 
-	**default value:** ""
+	**default value:** 100
 
 
-	The current commit hash. The video is branded with this information for later inspection of errors that might have occured.
+	Number of samples taken to generate an average image. Usually has to be less if `average_method` is set to max.
 
+	.. seealso:: :func:`average_method`, 
 
 
-.. function:: meta_misc(string)
+.. function:: averaging_method(string)
 	:noindex:
 
-	**default value:** ""
+	**default value:** "mean"
 
 
-	Other information.
+	This can be either 'mean', 'mode', 'min' or 'max'. All accumulated background images (to be used for generating an average background) will be combined using the max or mean function.
 
 
 
-.. function:: meta_species(string)
+.. function:: blob_size_range(rangef)
 	:noindex:
 
-	**default value:** ""
+	**default value:** [0.01,500000]
 
 
-	Name of the species used.
+	Minimum or maximum size of the individuals on screen after thresholding. Anything smaller or bigger than these values will be disregarded as noise.
 
 
 
@@ -68,168 +69,160 @@ TGrabs parameters
 
 
 
-.. function:: cam_resolution(size<int>)
-	:noindex:
-
-	**default value:** [2048,2048]
-
-
-	[BASLER] Defines the dimensions of the camera image.
-
-
-
-.. function:: averaging_method(string)
+.. function:: cam_limit_exposure(int)
 	:noindex:
 
-	**default value:** "mean"
+	**default value:** 5500
 
 
-	This can be either 'mean', 'mode', 'min' or 'max'. All accumulated background images (to be used for generating an average background) will be combined using the max or mean function.
+	[BASLER] Sets the cameras exposure time in micro seconds.
 
 
 
-.. function:: correct_luminance(bool)
+.. function:: cam_resolution(size<int>)
 	:noindex:
 
-	**default value:** false
+	**default value:** [2048,2048]
 
 
-	Attempts to correct for badly lit backgrounds by evening out luminance across the background.
+	[BASLER] Defines the dimensions of the camera image.
 
 
 
-.. function:: enable_difference(bool)
+.. function:: closing_size(int)
 	:noindex:
 
-	**default value:** true
+	**default value:** 3
 
 
-	Enables background subtraction. If disabled, `threshold` will be applied to the raw greyscale values instead of difference values.
+	Size of the dilation/erosion filters for if `use_closing` is enabled.
 
-	.. seealso:: :func:`threshold`, 
+	.. seealso:: :func:`use_closing`, 
 
 
-.. function:: image_adjust(bool)
+.. function:: color_channel(ulong)
 	:noindex:
 
-	**default value:** false
+	**default value:** 1
 
 
-	Converts the image to floating-point (temporarily) and performs f(x,y) * `image_contrast_increase` + `image_brightness_increase` plus, if enabled, squares the image (`image_square_brightness`).
+	Index (0-2) of the color channel to be used during video conversion, if more than one channel is present in the video file.
 
-	.. seealso:: :func:`image_contrast_increase`, :func:`image_brightness_increase`, :func:`image_square_brightness`, 
 
 
-.. function:: grabber_force_settings(bool)
+.. function:: correct_luminance(bool)
 	:noindex:
 
 	**default value:** false
 
 
-	If set to true, live tracking will always overwrite a settings file with `filename`.settings in the output folder.
+	Attempts to correct for badly lit backgrounds by evening out luminance across the background.
 
-	.. seealso:: :func:`filename`, 
 
 
-.. function:: closing_size(int)
+.. function:: crop_offsets(offsets)
 	:noindex:
 
-	**default value:** 3
+	**default value:** [0,0,0,0]
 
 
-	Size of the dilation/erosion filters for if `use_closing` is enabled.
+	Percentage offsets [left, top, right, bottom] that will be cut off the input images (e.g. [0.1,0.1,0.5,0.5] will remove 10%% from the left and top and 50%% from the right and bottom and the video will be 60%% smaller in X and Y).
 
-	.. seealso:: :func:`use_closing`, 
 
 
-.. function:: use_adaptive_threshold(bool)
+.. function:: crop_window(bool)
 	:noindex:
 
 	**default value:** false
 
 
-	Enables or disables adaptive thresholding (slower than normal threshold). Deals better with weird backgrounds.
+	If set to true, the grabber will open a window before the analysis starts where the user can drag+drop points defining the crop_offsets.
 
 
 
-.. function:: grabber_use_threads(bool)
+.. function:: dilation_size(int)
 	:noindex:
 
-	**default value:** true
+	**default value:** 0
 
 
-	Use threads to process images (specifically the blob detection).
+	If set to a value greater than zero, detected shapes will be inflated (and potentially merged). When set to a value smaller than zero, detected shapes will be shrunk (and potentially split).
 
 
 
-.. function:: terminate_error(bool)
+.. function:: enable_closed_loop(bool)
 	:noindex:
 
 	**default value:** false
 
 
-	Internal variable.
+	When enabled, live tracking will be executed for every frame received. Frames will be sent to the 'closed_loop.py' script - see this script for more information. Sets `enable_live_tracking` to true. Allows the tracker to skip frames by default, in order to catch up to the video.
 
+	.. seealso:: :func:`enable_live_tracking`, 
 
 
-.. function:: recording(bool)
+.. function:: enable_difference(bool)
 	:noindex:
 
 	**default value:** true
 
 
-	If set to true, the program will record frames whenever individuals are found.
+	Enables background subtraction. If disabled, `threshold` will be applied to the raw greyscale values instead of difference values.
 
+	.. seealso:: :func:`threshold`, 
 
 
-.. function:: video_conversion_range(pair<int,int>)
+.. function:: enable_live_tracking(bool)
 	:noindex:
 
-	**default value:** [-1,-1]
+	**default value:** false
 
 
-	If set to a valid value (!= -1), start and end values determine the range converted.
+	When enabled, the program will save a .results file for the recorded video plus export the data (see `output_graphs` in the tracker documentation).
 
+	.. seealso:: :func:`output_graphs`, 
 
 
-.. function:: save_raw_movie(bool)
+.. function:: equalize_histogram(bool)
 	:noindex:
 
 	**default value:** false
 
 
-	Saves a RAW movie (.mov) with a similar name in the same folder, while also recording to a PV file. This might reduce the maximum framerate slightly, but it gives you the best of both worlds.
+	Equalizes the histogram of the image before thresholding and background subtraction.
 
 
 
-.. function:: stop_after_minutes(uint)
+.. function:: grabber_force_settings(bool)
 	:noindex:
 
-	**default value:** 0
+	**default value:** false
 
 
-	If set to a value above 0, the video will stop recording after X minutes of recording time.
+	If set to true, live tracking will always overwrite a settings file with `filename`.settings in the output folder.
 
+	.. seealso:: :func:`filename`, 
 
 
-.. function:: crop_offsets(offsets)
+.. function:: grabber_use_threads(bool)
 	:noindex:
 
-	**default value:** [0,0,0,0]
+	**default value:** true
 
 
-	Percentage offsets [left, top, right, bottom] that will be cut off the input images (e.g. [0.1,0.1,0.5,0.5] will remove 10%% from the left and top and 50%% from the right and bottom and the video will be 60%% smaller in X and Y).
+	Use threads to process images (specifically the blob detection).
 
 
 
-.. function:: blob_size_range(rangef)
+.. function:: image_adjust(bool)
 	:noindex:
 
-	**default value:** [0.01,500000]
+	**default value:** false
 
 
-	Minimum or maximum size of the individuals on screen after thresholding. Anything smaller or bigger than these values will be disregarded as noise.
+	Converts the image to floating-point (temporarily) and performs f(x,y) * `image_contrast_increase` + `image_brightness_increase` plus, if enabled, squares the image (`image_square_brightness`).
 
+	.. seealso:: :func:`image_contrast_increase`, :func:`image_brightness_increase`, :func:`image_square_brightness`, 
 
 
 .. function:: image_brightness_increase(float)
@@ -243,167 +236,164 @@ TGrabs parameters
 	.. seealso:: :func:`image_adjust`, 
 
 
-.. function:: enable_live_tracking(bool)
+.. function:: image_contrast_increase(float)
 	:noindex:
 
-	**default value:** false
+	**default value:** 3
 
 
-	When enabled, the program will save a .results file for the recorded video plus export the data (see `output_graphs` in the tracker documentation).
+	Value that is multiplied to the preprocessed image before applying the threshold (see `image_adjust`). The neutral value is 1 here.
 
-	.. seealso:: :func:`output_graphs`, 
+	.. seealso:: :func:`image_adjust`, 
 
 
-.. function:: dilation_size(int)
+.. function:: image_square_brightness(bool)
 	:noindex:
 
-	**default value:** 0
+	**default value:** false
 
 
-	If set to a value greater than zero, detected shapes will be inflated (and potentially merged). When set to a value smaller than zero, detected shapes will be shrunk (and potentially split).
+	Squares the floating point input image after background subtraction. This brightens brighter parts of the image, and darkens darker regions.
 
 
 
-.. function:: meta_write_these(array<string>)
+.. function:: mask_path(path)
 	:noindex:
 
-	**default value:** ["meta_species","meta_age_days","meta_conditions","meta_misc","cam_limit_exposure","meta_real_width","meta_source_path","meta_cmd","meta_build","meta_conversion_time","frame_rate","cam_undistort_vector","cam_matrix"]
+	**default value:** ""
 
 
-	The given settings values will be written to the video file.
+	Path to a video file containing a mask to be applied to the video while recording. Only works for conversions.
 
 
 
-.. function:: video_source(string)
+.. function:: meta_age_days(int)
 	:noindex:
 
-	**default value:** "basler"
+	**default value:** -1
 
 
-	Where the video is recorded from. Can be the name of a file, or one of the keywords ['basler', 'webcam', 'test_image'].
+	Age of the individuals used in days.
 
 
 
-.. function:: image_contrast_increase(float)
+.. function:: meta_build(string)
 	:noindex:
 
-	**default value:** 3
+	**default value:** ""
 
 
-	Value that is multiplied to the preprocessed image before applying the threshold (see `image_adjust`). The neutral value is 1 here.
+	The current commit hash. The video is branded with this information for later inspection of errors that might have occured.
 
-	.. seealso:: :func:`image_adjust`, 
 
 
-.. function:: meta_conversion_time(string)
+.. function:: meta_cmd(string)
 	:noindex:
 
 	**default value:** ""
 
 
-	This contains the time of when this video was converted / recorded as a string.
+	Command-line of the framegrabber when conversion was started.
 
 
 
-.. function:: color_channel(ulong)
+.. function:: meta_conditions(string)
 	:noindex:
 
-	**default value:** 1
+	**default value:** ""
 
 
-	Index (0-2) of the color channel to be used during video conversion, if more than one channel is present in the video file.
+	Treatment name.
 
 
 
-.. function:: image_square_brightness(bool)
+.. function:: meta_conversion_time(string)
 	:noindex:
 
-	**default value:** false
+	**default value:** ""
 
 
-	Squares the floating point input image after background subtraction. This brightens brighter parts of the image, and darkens darker regions.
+	This contains the time of when this video was converted / recorded as a string.
 
 
 
-.. function:: meta_cmd(string)
+.. function:: meta_misc(string)
 	:noindex:
 
 	**default value:** ""
 
 
-	Command-line of the framegrabber when conversion was started.
+	Other information.
 
 
 
-.. function:: test_image(string)
+.. function:: meta_species(string)
 	:noindex:
 
-	**default value:** "checkerboard"
+	**default value:** ""
 
 
-	Defines, which test image will be used if `video_source` is set to 'test_image'.
+	Name of the species used.
 
-	.. seealso:: :func:`video_source`, 
 
 
-.. function:: average_samples(int)
+.. function:: meta_write_these(array<string>)
 	:noindex:
 
-	**default value:** 100
+	**default value:** ["meta_species","meta_age_days","meta_conditions","meta_misc","cam_limit_exposure","meta_real_width","meta_source_path","meta_cmd","meta_build","meta_conversion_time","frame_rate","cam_undistort_vector","cam_matrix"]
 
 
-	Number of samples taken to generate an average image. Usually has to be less if `average_method` is set to max.
+	The given settings values will be written to the video file.
 
-	.. seealso:: :func:`average_method`, 
 
 
-.. function:: reset_average(bool)
+.. function:: quit_after_average(bool)
 	:noindex:
 
 	**default value:** false
 
 
-	If set to true, the average will be regenerated using the live stream of images (video or camera).
+	If set to true, this will terminate the program directly after generating (or loading) a background average image.
 
 
 
-.. function:: meta_age_days(int)
+.. function:: recording(bool)
 	:noindex:
 
-	**default value:** -1
+	**default value:** true
 
 
-	Age of the individuals used in days.
+	If set to true, the program will record frames whenever individuals are found.
 
 
 
-.. function:: threshold_maximum(int)
+.. function:: reset_average(bool)
 	:noindex:
 
-	**default value:** 255
+	**default value:** false
 
 
-	
+	If set to true, the average will be regenerated using the live stream of images (video or camera).
 
 
 
-.. function:: meta_conditions(string)
+.. function:: save_raw_movie(bool)
 	:noindex:
 
-	**default value:** ""
+	**default value:** false
 
 
-	Treatment name.
+	Saves a RAW movie (.mov) with a similar name in the same folder, while also recording to a PV file. This might reduce the maximum framerate slightly, but it gives you the best of both worlds.
 
 
 
-.. function:: threshold(int)
+.. function:: stop_after_minutes(uint)
 	:noindex:
 
-	**default value:** 9
+	**default value:** 0
 
 
-	Threshold to be applied to the input image to find blobs.
+	If set to a value above 0, the video will stop recording after X minutes of recording time.
 
 
 
@@ -418,44 +408,54 @@ TGrabs parameters
 	.. seealso:: :func:`approximate_length_minutes`, :func:`stop_after_minutes`, 
 
 
-.. function:: approximate_length_minutes(uint)
+.. function:: terminate_error(bool)
 	:noindex:
 
-	**default value:** 0
+	**default value:** false
 
 
-	If available, please provide the approximate length of the video in minutes here, so that the encoding strategy can be chosen intelligently. If set to 0, infinity is assumed. This setting is overwritten by `stop_after_minutes`.
+	Internal variable.
 
-	.. seealso:: :func:`stop_after_minutes`, 
 
 
-.. function:: quit_after_average(bool)
+.. function:: test_image(string)
 	:noindex:
 
-	**default value:** false
+	**default value:** "checkerboard"
 
 
-	If set to true, this will terminate the program directly after generating (or loading) a background average image.
+	Defines, which test image will be used if `video_source` is set to 'test_image'.
 
+	.. seealso:: :func:`video_source`, 
 
 
-.. function:: cam_limit_exposure(int)
+.. function:: threshold(int)
 	:noindex:
 
-	**default value:** 5500
+	**default value:** 9
 
 
-	[BASLER] Sets the cameras exposure time in micro seconds.
+	Threshold to be applied to the input image to find blobs.
 
 
 
-.. function:: adaptive_threshold_scale(float)
+.. function:: threshold_maximum(int)
 	:noindex:
 
-	**default value:** 2
+	**default value:** 255
 
 
-	Threshold value to be used for adaptive thresholding, if enabled.
+	
+
+
+
+.. function:: use_adaptive_threshold(bool)
+	:noindex:
+
+	**default value:** false
+
+
+	Enables or disables adaptive thresholding (slower than normal threshold). Deals better with weird backgrounds.
 
 
 
@@ -470,23 +470,23 @@ TGrabs parameters
 	.. seealso:: :func:`closing_size`, 
 
 
-.. function:: equalize_histogram(bool)
+.. function:: video_conversion_range(pair<int,int>)
 	:noindex:
 
-	**default value:** false
+	**default value:** [-1,-1]
 
 
-	Equalizes the histogram of the image before thresholding and background subtraction.
+	If set to a valid value (!= -1), start and end values determine the range converted.
 
 
 
-.. function:: crop_window(bool)
+.. function:: video_source(string)
 	:noindex:
 
-	**default value:** false
+	**default value:** "basler"
 
 
-	If set to true, the grabber will open a window before the analysis starts where the user can drag+drop points defining the crop_offsets.
+	Where the video is recorded from. Can be the name of a file, or one of the keywords ['basler', 'webcam', 'test_image'].
 
 
 
diff --git a/docs/parameters_trex.rst b/docs/parameters_trex.rst
index c0c0ce0..7eca014 100644
--- a/docs/parameters_trex.rst
+++ b/docs/parameters_trex.rst
@@ -3,131 +3,107 @@
 
 TRex parameters
 ###############
-.. function:: image_invert(bool)
+.. function:: analysis_paused(bool)
 
 	**default value:** false
 
 
-	Inverts the image greyscale values before thresholding.
-
-
-
-.. function:: cam_scale(float)
-
-	**default value:** 1
-
-
-	Scales the image down or up by the given factor.
-
-
-
-.. function:: cam_matrix(array<float>)
-
-	**default value:** [2945.0896,0,617.255432,0,2942.825195,682.473633,0,0,1]
-
-
-	
+	Halts the analysis.
 
 
 
-.. function:: gui_connectivity_matrix_file(path)
+.. function:: analysis_range(pair<int,int>)
 
-	**default value:** ""
+	**default value:** [-1,-1]
 
 
-	Path to connectivity table. Expected structure is a csv table with columns [frame | #(track_max_individuals^2) values] and frames in y-direction.
+	Sets start and end of the analysed frames.
 
 
 
-.. function:: gui_foi_types(array<string>)
+.. function:: app_name(string)
 
-	**default value:** []
+	**default value:** "TRex"
 
 
-	A list of all the foi types registered.
+	Name of the application.
 
 
 
-.. function:: gui_foi_name(string)
+.. function:: auto_apply(bool)
 
-	**default value:** "correcting"
+	**default value:** false
 
 
-	If not empty, the gui will display the given FOI type in the timeline and allow to navigate between them via M/N.
+	If set to true, the application will automatically apply the network with existing weights once the analysis is done. It will then automatically correct and reanalyse the video.
 
 
 
-.. function:: huge_timestamp_seconds(double)
+.. function:: auto_minmax_size(bool)
 
-	**default value:** 0.2
+	**default value:** false
 
 
-	Defaults to 0.5s (500ms), can be set to any value that should be recognized as being huge.
+	Program will try to find minimum / maximum size of the individuals automatically for the current `cm_per_pixel` setting. Can only be passed as an argument upon startup. The calculation is based on the median blob size in the video and assumes a relatively low level of noise.
 
+	.. seealso:: :func:`cm_per_pixel`, 
 
 
-.. function:: huge_timestamp_ends_segment(bool)
+.. function:: auto_no_memory_stats(bool)
 
 	**default value:** true
 
 
-	
-
-
-
-.. function:: track_ignore(array<array<vec>>)
-
-	**default value:** []
-
-
-	If this is not empty, objects within the given rectangles or polygons (>= 3 points) [[x0,y0],[x1,y1](, ...)], ...] will be ignored during tracking.
+	If set to true, no memory statistics will be saved on auto_quit.
 
 
 
-.. function:: gpu_accumulation_max_segments(uint)
+.. function:: auto_no_results(bool)
 
-	**default value:** 15
+	**default value:** false
 
 
-	If there are more than `gpu_accumulation_max_segments` global segments to be trained on, they will be filtered according to their quality until said limit is reached.
+	If set to true, the auto_quit option will NOT save a .results file along with the NPZ (or CSV) files. This saves time and space, but also means that the tracked portion cannot be loaded via -load afterwards. Useful, if you only want to analyse the resulting data and never look at the tracked video again.
 
 
 
-.. function:: gpu_max_cache(float)
+.. function:: auto_no_tracking_data(bool)
 
-	**default value:** 2
+	**default value:** false
 
 
-	Size of the image cache (transferring to GPU) in GigaBytes when applying the network.
+	If set to true, the auto_quit option will NOT save any `output_graphs` tracking data - just the posture data (if enabled) and the results file (if not disabled). This saves time and space if that is a need.
 
+	.. seealso:: :func:`output_graphs`, 
 
 
-.. function:: gui_auto_scale_focus_one(bool)
+.. function:: auto_number_individuals(bool)
 
-	**default value:** true
+	**default value:** false
 
 
-	If set to true (and `gui_auto_scale` set to true, too), the tracker will zoom in on the selected individual, if one is selected.
+	Program will automatically try to find the number of individuals (with sizes given in `blob_size_ranges`) and set `track_max_individuals` to that value.
 
-	.. seealso:: :func:`gui_auto_scale`, 
+	.. seealso:: :func:`blob_size_ranges`, :func:`track_max_individuals`, 
 
 
-.. function:: gpu_learning_rate(float)
+.. function:: auto_quit(bool)
 
-	**default value:** 0.0005
+	**default value:** false
 
 
-	Learning rate for training a recognition network.
+	If set to true, the application will automatically save all results and export CSV files and quit, after the analysis is complete.
 
 
 
-.. function:: gpu_accumulation_enable_final_step(bool)
+.. function:: auto_train(bool)
 
-	**default value:** true
+	**default value:** false
 
 
-	If enabled, the network will be trained on all the validation + training data accumulated, as a last step of the accumulation protocol cascade. This is intentional overfitting.
+	If set to true (and `recognition_enable` is also set to true), the application will automatically train the recognition network with the best track segment and apply it to the video.
 
+	.. seealso:: :func:`recognition_enable`, 
 
 
 .. function:: auto_train_dont_apply(bool)
@@ -140,117 +116,96 @@ TRex parameters
 	.. seealso:: :func:`auto_train`, 
 
 
-.. function:: gpu_accepted_uniqueness(float)
-
-	**default value:** 0
-
-
-	If changed (from 0), the ratio given here will be the acceptable uniqueness for the video - which will stop accumulation if reached.
-
-
-
-.. function:: matching_probability_threshold(float)
-
-	**default value:** 0.1
-
+.. function:: auto_train_on_startup(bool)
 
-	The probability below which a possible connection between blob and identity is considered too low. The probability depends largely upon settings like `track_max_speed`.
+	**default value:** false
 
-	.. seealso:: :func:`track_max_speed`, 
 
+	This is a parameter that is used by the system to determine whether `auto_train` was set on startup, and thus also whether a failure of `auto_train` should result in a crash (return code != 0).
 
-.. function:: gpu_max_epochs(ulong)
+	.. seealso:: :func:`auto_train`, :func:`auto_train`, 
 
-	**default value:** 150
 
+.. function:: blob_size_ranges(BlobSizeRange)
 
-	Maximum number of epochs for training a recognition network.
+	**default value:** [[0.1,3]]
 
 
+	Blobs below the lower bound are recognized as noise instead of individuals. Blobs bigger than the upper bound are considered to potentially contain more than one individual. The unit is #pixels * (`meta_real_width` / video_width).
 
-.. function:: individuals_per_thread(float)
+	.. seealso:: :func:`meta_real_width`, 
 
-	**default value:** 1
 
+.. function:: blob_split_global_shrink_limit(float)
 
-	Number of individuals for which positions will be estimated per thread.
+	**default value:** 0.2
 
 
+	The minimum percentage of the minimum in `blob_size_ranges`, that a blob is allowed to be reduced to during splitting. If this value is set too low, the program might start recognizing parts of individual as other individual too quickly.
 
-.. function:: midline_samples(uint64)
+	.. seealso:: :func:`blob_size_ranges`, 
 
-	**default value:** 0
 
+.. function:: blob_split_max_shrink(float)
 
-	The maximum number of samples taken for generating a ``median midline length``. Setting this to 0 removes the limit all together. A limit may be set for very long videos, or videos with lots of individual, for memory reasons.
+	**default value:** 0.2
 
-	.. seealso:: :func:``, :func:``, 
 
+	The minimum percentage of the starting blob size (after thresholding), that a blob is allowed to be reduced to during splitting. If this value is set too low, the program might start recognizing parts of individual as other individual too quickly.
 
-.. function:: recognition_save_training_images(bool)
 
-	**default value:** false
 
+.. function:: blobs_per_thread(float)
 
-	If set to true, the program will save the images used for a successful training of the recognition network to the output path.
+	**default value:** 150
 
 
+	Number of blobs for which properties will be calculated per thread.
 
-.. function:: peak_mode(peak_mode_t)
 
-	**default value:** pointy
 
-	**possible values:**
-		- `pointy`: The head is broader than the tail.
-		- `broad`: The tail is broader than the head.
+.. function:: build(string)
 
-	This determines whether the tail of an individual should be expected to be pointy or broad.
+	**default value:** ""
 
 
+	Current build version
 
 
-.. function:: recognition_smooth_amount(ulong)
 
-	**default value:** 200
+.. function:: build_cxx_options(string)
 
+	**default value:** " -Wno-c++98-compat-pedantic -fvisibility=hidden -O3 -DNDEBUG -O3 -Wno-nullability-extension"
 
-	
 
+	The mode the application was built in.
 
 
-.. function:: smooth_window(uint)
 
-	**default value:** 2
+.. function:: build_is_debug(string)
 
+	**default value:** "debug"
 
-	Smoothing window used for exported data with the #smooth tag.
 
+	If built in debug mode, this will show 'debug'.
 
 
-.. function:: recognition_border(recognition_border_t)
 
-	**default value:** none
+.. function:: build_type(string)
 
-	**possible values:**
-		- `none`: No border at all. All points are inside the recognition boundary. (default)
-		- `heatmap`: Looks at a subset of frames from the video, trying to find out where individuals go and masking all the places they do not.
-		- `outline`: Similar to heatmap, but tries to build a convex border around the around (without holes in it).
-		- `shapes`: Any array of convex shapes. Set coordinates by changing `recognition_shapes`.
-		- `grid`: The points defined in `grid_points` are turned into N different circles inside the arena (with points in `grid_points` being the circle centers), which define in/out if inside/outside any of the circles.
-		- `circle`: The video-file provides a binary mask (e.g. when `cam_circle_mask` was set to true during recording), which is then used to determine in/out.
+	**default value:** "$<$<CONFIG:Debug>:Release>$<$<CONFIG:Release>:Debug>"
 
-	This defines the type of border that is used in all automatic recognition routines. Depending on the type set here, you might need to set other parameters as well (e.g. `recognition_shapes`). In general, this defines whether an image of an individual is usable for automatic recognition. If it is inside the defined border, then it will be passed on to the recognition network - if not, then it wont.
 
+	The mode the application was built in.
 
-	.. seealso:: :func:`recognition_shapes`, 
 
 
-.. function:: grid_points(array<vec>)
+.. function:: calculate_posture(bool)
 
-	**default value:** []
+	**default value:** true
 
 
-	Whenever there is an identification network loaded and this array contains more than one point [[x0,y0],[x1,y1],...], then the network will only be applied to blobs within circles around these points. The size of these circles is half of the average distance between the points.
+	Enables or disables posture calculation. Can only be set before the video is analysed (e.g. in a settings file or as a startup parameter).
 
 
 
@@ -263,555 +218,535 @@ TRex parameters
 
 
 
-.. function:: manually_approved(map<int,int>)
-
-	**default value:** {}
-
-
-	A list of ranges of manually approved frames that may be used for generating training datasets {232:232,5555:5560}.
-
-
-
-.. function:: tags_path(path)
+.. function:: cam_matrix(array<float>)
 
-	**default value:** ""
+	**default value:** [2945.0896,0,617.255432,0,2942.825195,682.473633,0,0,1]
 
 
-	If this path is set, the program will try to find tags and save them at the specified location.
+	
 
 
 
-.. function:: output_centered(bool)
+.. function:: cam_scale(float)
 
-	**default value:** false
+	**default value:** 1
 
 
-	If set to true, the origin of all X and Y coordinates is going to be set to the center of the video.
+	Scales the image down or up by the given factor.
 
 
 
-.. function:: output_recognition_data(bool)
+.. function:: cam_undistort(bool)
 
 	**default value:** false
 
 
-	Save recognition / probability data npz file along with the usual NPZ/CSV files containing positions and such. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_recognition_fishXXX.npz' will be created for each individual XXX.
-
-	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
+	If set to true, the recorded video image will be undistorted using `cam_undistort_vector` (1x5) and `cam_matrix` (3x3).
 
+	.. seealso:: :func:`cam_undistort_vector`, :func:`cam_matrix`, 
 
-.. function:: output_format(output_format_t)
 
-	**default value:** npz
+.. function:: cam_undistort_vector(array<float>)
 
-	**possible values:**
-		- `csv`: A standard data format, comma-separated columns for each data stream.
-		- `npz`: NPZ is basically a collection of binary arrays, readable by NumPy and other plugins (there are plugins available for Matlab and R).
+	**default value:** [-0.257663,-0.192336,0.002455,0.003988,0.35924]
 
-	When pressing the S(ave) button or using auto_quit, this setting allows to switch between CSV and NPZ output. NPZ files are recommended and will be used by default - some functionality (such as visual fields, posture data, etc.) will remain in NPZ format due to technical constraints.
 
+	
 
 
 
-.. function:: tracklet_max_images(ulong)
+.. function:: cm_per_pixel(float)
 
 	**default value:** 0
 
 
-	Maximum number of images that are being output per tracklet given that `output_image_per_tracklet` is true. If the number is 0, then every image will be exported that has been recognized as an individual.
+	The ratio of `meta_real_width` / `video_size`.width that is used to convert pixels to centimeters. Will be automatically calculated based on the video and the meta-parameters contained within.
 
-	.. seealso:: :func:`output_image_per_tracklet`, 
+	.. seealso:: :func:`meta_real_width`, :func:`video_size`, 
 
 
-.. function:: track_include(array<array<vec>>)
+.. function:: cmd_line(string)
 
-	**default value:** []
+	**default value:** ""
 
 
-	If this is not empty, objects within the given rectangles or polygons (>= 3 points) [[x0,y0],[x1,y1](, ...)], ...] will be the only objects being tracked. (overwrites `track_ignore`)
+	An approximation of the command-line arguments passed to the program.
 
-	.. seealso:: :func:`track_ignore`, 
 
 
-.. function:: cm_per_pixel(float)
+.. function:: correct_illegal_lines(bool)
 
-	**default value:** 0
+	**default value:** false
 
 
-	The ratio of `meta_real_width` / `video_size`.width that is used to convert pixels to centimeters. Will be automatically calculated based on the video and the meta-parameters contained within.
+	In older versions of the software, blobs can be constructed in 'illegal' ways, meaning the lines might be overlapping. If the software is printing warnings about it, this should probably be enabled (makes it slower).
 
-	.. seealso:: :func:`meta_real_width`, :func:`video_size`, 
 
 
-.. function:: output_graphs(array<pair<string,array<string>>>)
+.. function:: debug(bool)
 
-	**default value:** [["X",["RAW","WCENTROID"]],["Y",["RAW","WCENTROID"]],["X",["RAW","HEAD"]],["Y",["RAW","HEAD"]],["VX",["RAW","HEAD"]],["VY",["RAW","HEAD"]],["AX",["RAW","HEAD"]],["AY",["RAW","HEAD"]],["ANGLE",["RAW"]],["ANGULAR_V",["RAW"]],["ANGULAR_A",["RAW"]],["MIDLINE_OFFSET",["RAW"]],["normalized_midline",["RAW"]],["midline_length",["RAW"]],["midline_x",["RAW"]],["midline_y",["RAW"]],["segment_length",["RAW"]],["SPEED",["RAW","WCENTROID"]],["SPEED",["SMOOTH","WCENTROID"]],["SPEED",["RAW","PCENTROID"]],["SPEED",["RAW","HEAD"]],["BORDER_DISTANCE",["PCENTROID"]],["time",[]],["timestamp",[]],["frame",[]],["missing",[]],["num_pixels",[]],["ACCELERATION",["RAW","PCENTROID"]],["ACCELERATION",["RAW","WCENTROID"]]]
+	**default value:** false
 
 
-	The functions that will be exported when saving to CSV, or shown in the graph. [['X',[option], ...]]
+	Enables some verbose debug print-outs.
 
 
 
-.. function:: cam_undistort_vector(array<float>)
+.. function:: debug_recognition_output_all_methods(bool)
 
-	**default value:** [-0.257663,-0.192336,0.002455,0.003988,0.35924]
+	**default value:** false
 
 
-	
+	If set to true, a complete training will attempt to output all images for each identity with all available normalization methods.
 
 
 
-.. function:: output_min_frames(ulong)
+.. function:: enable_absolute_difference(bool)
 
-	**default value:** 1
+	**default value:** true
 
 
-	Filters all individual with less than N frames when exporting. Individuals with fewer than N frames will also be hidden in the GUI unless `gui_show_inactive_individuals` is enabled (default).
+	If set to true, the threshold values will be applied to abs(image - background). Otherwise max(0, image - background).
 
-	.. seealso:: :func:`gui_show_inactive_individuals`, 
 
 
-.. function:: gui_show_dataset(bool)
+.. function:: error_terminate(bool)
 
 	**default value:** false
 
 
-	Show/hide detailed dataset information on-screen.
+	
 
 
 
-.. function:: track_posture_threshold(int)
+.. function:: event_min_peak_offset(float)
 
-	**default value:** 15
+	**default value:** 0.15
 
 
-	Same as `track_threshold`, but for posture estimation.
+	
 
-	.. seealso:: :func:`track_threshold`, 
 
 
-.. function:: output_default_options(map<string,array<string>>)
+.. function:: exec(path)
 
-	**default value:** {"event_acceleration":["/10"],"ACCELERATION":["/15","SMOOTH","CENTROID"],"L_V":["/10"],"v_direction":["/10"],"DOT_V":["/10"],"ANGULAR_V":["/10","SMOOTH","CENTROID"],"ANGULAR_A":["/1000","SMOOTH","CENTROID"],"NEIGHBOR_VECTOR_T":["/1"],"SPEED":["/10","SMOOTH"],"NEIGHBOR_DISTANCE":["/10"],"X":["/100"],"Y":["/100"],"tailbeat_threshold":["pm"],"tailbeat_peak":["pm"],"threshold_reached":["POINTS"],"midline_length":["/15"],"amplitude":["/100"],"outline_size":["/100"],"global":["/10"]}
+	**default value:** ""
 
 
-	Default scaling and smoothing options for output functions, which are applied to functions in `output_graphs` during export.
+	This can be set to the path of an additional settings file that is executed after the normal settings file.
 
-	.. seealso:: :func:`output_graphs`, 
 
 
-.. function:: output_annotations(map<string,string>)
+.. function:: ffmpeg_path(path)
 
-	**default value:** {"ACCELERATION":"cm/s2","ACCELERATION_SMOOTH":"cm/s2","BORDER_DISTANCE":"cm","NEIGHBOR_DISTANCE":"cm","ORIENTATION":"rad","SPEED":"cm/s","SPEED_OLD":"cm/s","SPEED_SMOOTH":"cm/s","VX":"cm/s","VY":"cm/s","X":"cm","Y":"cm","global":"px"}
+	**default value:** ""
 
 
-	Units (as a string) of output functions to be annotated in various places like graphs.
+	Path to an ffmpeg executable file. This is used for converting videos after recording them (from the GUI). It is not a critical component of the software, but mostly for convenience.
 
 
 
-.. function:: analysis_range(pair<int,int>)
+.. function:: filename(path)
 
-	**default value:** [-1,-1]
+	**default value:** ""
 
 
-	Sets start and end of the analysed frames.
+	Opened filename (without .pv).
 
 
 
-.. function:: auto_train_on_startup(bool)
+.. function:: fishdata_dir(path)
 
-	**default value:** false
+	**default value:** "data"
 
 
-	This is a parameter that is used by the system to determine whether `auto_train` was set on startup, and thus also whether a failure of `auto_train` should result in a crash (return code != 0).
+	Subfolder (below `output_dir`) where the exported NPZ or CSV files will be saved (see `output_graphs`).
 
-	.. seealso:: :func:`auto_train`, :func:`auto_train`, 
+	.. seealso:: :func:`output_dir`, :func:`output_graphs`, 
 
 
-.. function:: auto_train(bool)
+.. function:: frame_rate(int)
 
-	**default value:** false
+	**default value:** 0
 
 
-	If set to true (and `recognition_enable` is also set to true), the application will automatically train the recognition network with the best track segment and apply it to the video.
+	Specifies the frame rate of the video. It is used e.g. for playback speed and certain parts of the matching algorithm. Will be set by the .settings of a video (or by the video itself).
 
-	.. seealso:: :func:`recognition_enable`, 
 
 
-.. function:: auto_no_results(bool)
+.. function:: gpu_accepted_uniqueness(float)
 
-	**default value:** false
+	**default value:** 0
 
 
-	If set to true, the auto_quit option will NOT save a .results file along with the NPZ (or CSV) files. This saves time and space, but also means that the tracked portion cannot be loaded via -load afterwards. Useful, if you only want to analyse the resulting data and never look at the tracked video again.
+	If changed (from 0), the ratio given here will be the acceptable uniqueness for the video - which will stop accumulation if reached.
 
 
 
-.. function:: track_trusted_probability(float)
+.. function:: gpu_accumulation_enable_final_step(bool)
 
-	**default value:** 0.5
+	**default value:** true
 
 
-	If the probability, that is used to assign an individual to an object, is smaller than this value, the current segment will be ended (thus this will also not be a consecutive segment anymore for this individual).
+	If enabled, the network will be trained on all the validation + training data accumulated, as a last step of the accumulation protocol cascade. This is intentional overfitting.
 
 
 
-.. function:: correct_illegal_lines(bool)
+.. function:: gpu_accumulation_max_segments(uint)
 
-	**default value:** false
+	**default value:** 15
 
 
-	In older versions of the software, blobs can be constructed in 'illegal' ways, meaning the lines might be overlapping. If the software is printing warnings about it, this should probably be enabled (makes it slower).
+	If there are more than `gpu_accumulation_max_segments` global segments to be trained on, they will be filtered according to their quality until said limit is reached.
 
 
 
-.. function:: gui_focus_group(array<int>)
+.. function:: gpu_enable_accumulation(bool)
 
-	**default value:** []
+	**default value:** true
 
 
-	Focus on this group of individuals.
+	Enables or disables the idtrackerai-esque accumulation protocol cascade. It is usually a good thing to enable this (especially in more complicated videos), but can be disabled as a fallback (e.g. if computation time is a major constraint).
 
 
 
-.. function:: track_threshold(int)
+.. function:: gpu_learning_rate(float)
 
-	**default value:** 15
+	**default value:** 0.0005
 
 
-	Constant used in background subtraction. Pixels with grey values above this threshold will be interpreted as potential individuals, while pixels below this threshold will be ignored.
+	Learning rate for training a recognition network.
 
 
 
-.. function:: web_quality(int)
+.. function:: gpu_max_cache(float)
 
-	**default value:** 75
+	**default value:** 2
 
 
-	JPEG quality of images transferred over the web interface.
+	Size of the image cache (transferring to GPU) in GigaBytes when applying the network.
 
 
 
-.. function:: heatmap_smooth(double)
+.. function:: gpu_max_epochs(ulong)
 
-	**default value:** 0.05
+	**default value:** 150
 
 
-	Value between 0 and 1, think of as `heatmap_smooth` times video width, indicating the maximum upscaled size of the heatmaps shown in the tracker. Makes them prettier, but maybe much slower.
+	Maximum number of epochs for training a recognition network.
 
 
 
-.. function:: track_time_probability_enabled(bool)
+.. function:: gpu_max_sample_gb(float)
 
-	**default value:** true
+	**default value:** 2
 
 
-	
+	Maximum size of per-individual sample images in GigaBytes. If the collected images are too many, they will be sub-sampled in regular intervals.
 
 
 
-.. function:: gui_outline_thickness(ulong)
+.. function:: gpu_min_elements(ulong)
 
-	**default value:** 1
+	**default value:** 25000
 
 
-	The thickness of outline / midlines in the GUI.
+	Minimum number of images being collected, before sending them to the GPU.
 
 
 
-.. function:: recognition_image_scale(float)
+.. function:: gpu_min_iterations(ulong)
 
-	**default value:** 1
+	**default value:** 100
 
 
-	Scaling applied to the images before passing them to the network.
+	Minimum number of iterations per epoch for training a recognition network.
 
 
 
-.. function:: threshold_ratio_range(rangef)
+.. function:: grid_points(array<vec>)
 
-	**default value:** [0.5,1]
+	**default value:** []
 
 
-	If `track_threshold_2` is not equal to zero, this ratio will be multiplied by the number of pixels present before the second threshold. If the resulting size falls within the given range, the blob is deemed okay.
+	Whenever there is an identification network loaded and this array contains more than one point [[x0,y0],[x1,y1],...], then the network will only be applied to blobs within circles around these points. The size of these circles is half of the average distance between the points.
 
-	.. seealso:: :func:`track_threshold_2`, 
 
 
-.. function:: recognition_enable(bool)
+.. function:: grid_points_scaling(float)
 
-	**default value:** true
+	**default value:** 0.8
 
 
-	This enables internal training. Requires Python3 and Keras to be available.
+	Scaling applied to the average distance between the points in order to shrink or increase the size of the circles for recognition (see `grid_points`).
 
+	.. seealso:: :func:`grid_points`, 
 
 
-.. function:: track_intensity_range(rangel)
+.. function:: gui_auto_scale(bool)
 
-	**default value:** [-1,-1]
+	**default value:** false
 
 
-	When set to valid values, objects will be filtered to have an average pixel intensity within the given range.
+	If set to true, the tracker will always try to zoom in on the whole group. This is useful for some individuals in a huge video (because if they are too tiny, you cant see them and their posture anymore).
 
 
 
-.. function:: speed_extrapolation(float)
+.. function:: gui_auto_scale_focus_one(bool)
 
-	**default value:** 3
+	**default value:** true
 
 
-	Used for matching when estimating the next position of an individual. Smaller values are appropriate for lower frame rates. The higher this value is, the more previous frames will have significant weight in estimating the next position (with an exponential decay).
+	If set to true (and `gui_auto_scale` set to true, too), the tracker will zoom in on the selected individual, if one is selected.
 
+	.. seealso:: :func:`gui_auto_scale`, 
 
 
-.. function:: posture_direction_smoothing(ulong)
+.. function:: gui_background_color(color)
 
-	**default value:** 0
+	**default value:** [0,0,0,150]
 
 
-	Enables or disables smoothing of the posture orientation based on previous frames (not good for fast turns).
+	Values < 255 will make the background more transparent in standard view. This might be useful with very bright backgrounds.
 
 
 
-.. function:: gui_show_visualfield(bool)
+.. function:: gui_connectivity_matrix(map<int,array<float>>)
 
-	**default value:** false
+	**default value:** {}
 
 
-	Show/hide the visual field rays.
+	Internally used to store the connectivity matrix.
 
 
 
-.. function:: track_max_speed(float)
+.. function:: gui_connectivity_matrix_file(path)
 
-	**default value:** 50
+	**default value:** ""
 
 
-	The maximum speed an individual can have (=> the maximum distance an individual can travel within one second) in cm/s. Uses `meta_real_width`.
+	Path to connectivity table. Expected structure is a csv table with columns [frame | #(track_max_individuals^2) values] and frames in y-direction.
 
-	.. seealso:: :func:`meta_real_width`, 
 
 
-.. function:: cam_undistort(bool)
+.. function:: gui_draw_only_filtered_out(bool)
 
 	**default value:** false
 
 
-	If set to true, the recorded video image will be undistorted using `cam_undistort_vector` (1x5) and `cam_matrix` (3x3).
+	Only show filtered out blob texts.
 
-	.. seealso:: :func:`cam_undistort_vector`, :func:`cam_matrix`, 
 
 
-.. function:: gui_transparent_background(bool)
+.. function:: gui_equalize_blob_histograms(bool)
 
-	**default value:** false
+	**default value:** true
 
 
-	If enabled, fonts might look weird but you can record movies (and images) with transparent background (if gui_background_color.alpha is < 255).
+	Equalize histograms of blobs wihtin videos (makes them more visible).
 
 
 
-.. function:: recognition_image_size(size)
+.. function:: gui_faded_brightness(uchar)
 
-	**default value:** [80,80]
+	**default value:** 255
 
 
-	Size of each image generated for network training.
+	The alpha value of tracking-related elements when timeline is hidden (0-255).
 
 
 
-.. function:: track_threshold_2(int)
+.. function:: gui_fish_color(string)
 
-	**default value:** 0
+	**default value:** "identity"
 
 
-	If not zero, a second threshold will be applied to all objects after they have been deemed do be theoretically large enough. Then they are compared to #before_pixels * `threshold_ratio_range` to see how much they have been shrunk).
+	
 
-	.. seealso:: :func:`threshold_ratio_range`, 
 
 
-.. function:: gpu_max_sample_gb(float)
+.. function:: gui_focus_group(array<int>)
 
-	**default value:** 2
+	**default value:** []
 
 
-	Maximum size of per-individual sample images in GigaBytes. If the collected images are too many, they will be sub-sampled in regular intervals.
+	Focus on this group of individuals.
 
 
 
-.. function:: track_speed_decay(float)
+.. function:: gui_foi_name(string)
 
-	**default value:** 0.7
+	**default value:** "correcting"
 
 
-	The amount the expected speed is reduced over time when an individual is lost. When individuals collide, depending on the expected behavior for the given species, one should choose different values for this variable. If the individuals usually stop when they collide, this should be set to a value > 0.8. If the individuals are expected to move over one another, the value should be set to a small value > 0.
+	If not empty, the gui will display the given FOI type in the timeline and allow to navigate between them via M/N.
 
 
 
-.. function:: blob_split_max_shrink(float)
+.. function:: gui_foi_types(array<string>)
 
-	**default value:** 0.2
+	**default value:** []
 
 
-	The minimum percentage of the starting blob size (after thresholding), that a blob is allowed to be reduced to during splitting. If this value is set too low, the program might start recognizing parts of individual as other individual too quickly.
+	A list of all the foi types registered.
 
 
 
-.. function:: terminate_training(bool)
+.. function:: gui_frame(int)
 
-	**default value:** false
+	**default value:** 0
 
 
-	Setting this to true aborts the training in progress.
+	The currently visible frame.
 
 
 
-.. function:: gui_draw_only_filtered_out(bool)
+.. function:: gui_interface_scale(float)
 
-	**default value:** false
+	**default value:** 0.75
 
 
-	Only show filtered out blob texts.
+	Scales the whole interface. A value greater than 1 will make it smaller.
 
 
 
-.. function:: auto_number_individuals(bool)
+.. function:: gui_max_path_time(float)
 
-	**default value:** false
+	**default value:** 3
 
 
-	Program will automatically try to find the number of individuals (with sizes given in `blob_size_ranges`) and set `track_max_individuals` to that value.
+	Length (in time) of the trails shown in GUI.
 
-	.. seealso:: :func:`blob_size_ranges`, :func:`track_max_individuals`, 
 
 
-.. function:: meta_real_width(float)
+.. function:: gui_mode(mode_t)
 
-	**default value:** 0
+	**default value:** tracking
 
 
-	The actual width of what is seen on a video image in centimeters. So for example if the image is cropped exactly to the tank, it would be the width of the tank. Used to convert from pixels to centimeters.
+	The currently used display mode for the GUI.
 
 
 
-.. function:: visual_field_eye_offset(float)
+.. function:: gui_outline_thickness(ulong)
 
-	**default value:** 0.15
+	**default value:** 1
 
 
-	A percentage telling the program how much the eye positions are offset from the start of the midline.
+	The thickness of outline / midlines in the GUI.
 
 
 
-.. function:: track_end_segment_for_speed(bool)
+.. function:: gui_playback_speed(float)
 
-	**default value:** true
+	**default value:** 1
 
 
-	Sometimes individuals might be assigned to blobs that are far away from the previous position. This could indicate wrong assignments, but not necessarily. If this variable is set to true, consecutive frame segments will end whenever high speeds are reached, just to be on the safe side. For scenarios with lots of individuals (and no recognition) this might spam yellow bars in the timeline and may be disabled.
+	Playback speed when pressing SPACE.
 
 
 
-.. function:: recognition_coeff(ulong)
+.. function:: gui_recording_format(gui_recording_format_t)
 
-	**default value:** 50
+	**default value:** avi
+
+	**possible values:**
+		- `avi`: AVI / video format (codec FFV1 is used in unix systems)
+		- `jpg`: individual images in JPEG format
+		- `png`: individual images in PNG format
 
+	Sets the format for recording mode (when R is pressed in the GUI). Supported formats are 'avi', 'jpg' and 'png'. JPEGs have 75%% compression, AVI is using MJPEG compression.
 
-	
 
 
 
-.. function:: recognition_shapes(array<array<vec>>)
+.. function:: gui_run(bool)
 
-	**default value:** []
+	**default value:** false
 
 
-	If `recognition_border` is set to 'shapes', then the identification network will only be applied to blobs within the convex shapes specified here.
+	When set to true, the GUI starts playing back the video and stops once it reaches the end, or is set to false.
 
-	.. seealso:: :func:`recognition_border`, 
 
 
-.. function:: manual_splits(map<int,set<int64>>)
+.. function:: gui_show_blobs(bool)
 
-	**default value:** {}
+	**default value:** true
 
 
-	This map contains {frame: [blobid1,blobid2,...]} where frame and blobid are integers. When this is read during tracking for a frame, the tracker will attempt to force-split the given blob ids.
+	Showing or hiding individual raw blobs in tracking view (are always shown in RAW mode).
 
 
 
-.. function:: fishdata_dir(path)
+.. function:: gui_show_boundary_crossings(bool)
 
-	**default value:** "data"
+	**default value:** true
 
 
-	Subfolder (below `output_dir`) where the exported NPZ or CSV files will be saved (see `output_graphs`).
+	If set to true (and the number of individuals is set to a number > 0), the tracker will show whenever an individual enters the recognition boundary. Indicated by an expanding cyan circle around it.
 
-	.. seealso:: :func:`output_dir`, :func:`output_graphs`, 
 
 
-.. function:: manual_matches(map<int,map<int,int64>>)
+.. function:: gui_show_dataset(bool)
 
-	**default value:** {}
+	**default value:** false
 
 
-	A map of manually defined matches (also updated by GUI menu for assigning manual identities). {{frame: {fish0: blob2, fish1: blob0}}, ...}
+	Show/hide detailed dataset information on-screen.
 
 
 
-.. function:: gui_run(bool)
+.. function:: gui_show_detailed_probabilities(bool)
 
 	**default value:** false
 
 
-	When set to true, the GUI starts playing back the video and stops once it reaches the end, or is set to false.
+	Show/hide detailed probability stats when an individual is selected.
 
 
 
-.. function:: output_normalize_midline_data(bool)
+.. function:: gui_show_export_options(bool)
 
 	**default value:** false
 
 
-	If enabled: save a normalized version of the midline data saved whenever `output_posture_data` is set to true. Normalized means that the position of the midline points is normalized across frames (or the distance between head and point n in the midline array).
+	Show/hide the export options widget.
 
-	.. seealso:: :func:`output_posture_data`, 
 
 
-.. function:: video_size(size)
+.. function:: gui_show_fish(pair<int64,int>)
 
 	**default value:** [-1,-1]
 
 
-	The dimensions of the currently loaded video.
+	Show debug output for {blob_id, fish_id}.
 
 
 
-.. function:: version(string)
+.. function:: gui_show_graph(bool)
 
-	**default value:** "1.0"
+	**default value:** false
 
 
-	Current application version.
+	Show/hide the data time-series graph.
 
 
 
-.. function:: midline_start_with_head(bool)
+.. function:: gui_show_heatmap(bool)
 
 	**default value:** false
 
 
-	If enabled, the midline is going to be estimated starting at the head instead of the tail.
+	Showing a heatmap per identity, normalized by maximum samples per grid-cell.
 
 
 
-.. function:: recognition_border_size_rescale(float)
+.. function:: gui_show_histograms(bool)
 
-	**default value:** 0.5
+	**default value:** false
 
 
-	The amount that blob sizes for calculating the heatmap are allowed to go below or above blob_size_ranges (e.g. 0.5 means that the sizes can range between blob_size_ranges.min * (1 - 0.5) and blob_size_ranges.max * (1 + 0.5)).
+	Equivalent to the checkbox visible in GUI on the bottom-left.
 
 
 
@@ -825,466 +760,480 @@ TRex parameters
 	.. seealso:: :func:`track_max_reassign_time`, 
 
 
-.. function:: outline_use_dft(bool)
+.. function:: gui_show_manual_matches(bool)
 
 	**default value:** true
 
 
-	If enabled, the program tries to reduce outline noise by convolution of the curvature array with a low pass filter.
+	Show/hide manual matches in path.
 
 
 
-.. function:: grid_points_scaling(float)
+.. function:: gui_show_memory_stats(bool)
 
-	**default value:** 0.8
+	**default value:** false
 
 
-	Scaling applied to the average distance between the points in order to shrink or increase the size of the circles for recognition (see `grid_points`).
+	Showing or hiding memory statistics.
 
-	.. seealso:: :func:`grid_points`, 
 
 
-.. function:: outline_resample(float)
+.. function:: gui_show_midline(bool)
 
-	**default value:** 1
+	**default value:** true
 
 
-	Spacing between outline points in pixels, after resampling (normalizing) the outline. A lower value here can drastically increase the number of outline points generated (and decrease speed).
+	Showing or hiding individual midlines in tracking view.
 
 
 
-.. function:: posture_closing_steps(uchar)
+.. function:: gui_show_midline_histogram(bool)
 
-	**default value:** 0
+	**default value:** false
 
 
-	When enabled (> 0), posture will be processed using a combination of erode / dilate in order to close holes in the shape and get rid of extremities. An increased number of steps will shrink the shape, but will also be more time intensive.
+	Displays a histogram for midline lengths.
 
 
 
-.. function:: gui_show_detailed_probabilities(bool)
+.. function:: gui_show_number_individuals(bool)
 
 	**default value:** false
 
 
-	Show/hide detailed probability stats when an individual is selected.
+	Show/hide the #individuals time-series graph.
 
 
 
-.. function:: posture_head_percentage(float)
+.. function:: gui_show_outline(bool)
 
-	**default value:** 0.1
+	**default value:** true
 
 
-	The percentage of the midline-length that the head is moved away from the front of the body.
+	Showing or hiding individual outlines in tracking view.
 
 
 
-.. function:: event_min_peak_offset(float)
+.. function:: gui_show_paths(bool)
 
-	**default value:** 0.15
+	**default value:** true
 
 
-	
+	Equivalent to the checkbox visible in GUI on the bottom-left.
 
 
 
-.. function:: output_dir(path)
+.. function:: gui_show_pixel_grid(bool)
 
-	**default value:** "/Users/tristan/Videos"
+	**default value:** false
+
+
+	Shows the proximity grid generated for all blobs, which is used for history splitting.
+
+
+
+.. function:: gui_show_posture(bool)
+
+	**default value:** true
 
 
-	Default output-/input-directory. Change this in order to omit paths in front of filenames for open and save.
+	Show/hide the posture window on the top-right.
 
 
 
-.. function:: outline_approximate(uchar)
+.. function:: gui_show_probabilities(bool)
 
-	**default value:** 3
+	**default value:** false
 
 
-	If this is a number > 0, the outline detected from the image will be passed through an elliptical fourier transform with `outline_approximate` number of coefficients. When the given number is sufficiently low, the outline will be smoothed significantly (and more so for lower numbers of coefficients).
+	Show/hide probability visualisation when an individual is selected.
 
 
 
-.. function:: manual_identities(set<int>)
+.. function:: gui_show_recognition_bounds(bool)
 
-	**default value:** []
+	**default value:** true
 
 
-	
+	Shows what is contained within tht recognition boundary as a cyan background. (See `recognition_border` for details.)
 
+	.. seealso:: :func:`recognition_border`, 
 
 
-.. function:: posture_closing_size(uchar)
+.. function:: gui_show_recognition_summary(bool)
 
-	**default value:** 2
+	**default value:** false
 
 
-	The kernel size for erosion / dilation of the posture algorithm. Only has an effect with  `posture_closing_steps` > 0.
+	Show/hide confusion matrix (if network is loaded).
 
-	.. seealso:: :func:`posture_closing_steps`, 
 
 
-.. function:: python_path(path)
+.. function:: gui_show_selections(bool)
 
-	**default value:** "/Users/tristan/opt/anaconda3/envs/only_ffmpeg/bin/python3"
+	**default value:** true
 
 
-	Path to the python home folder. If left empty, the user is required to make sure that all necessary libraries are in-scope the PATH environment variable.
+	Show/hide circles around selected individual.
 
 
 
-.. function:: individual_prefix(string)
+.. function:: gui_show_shadows(bool)
 
-	**default value:** "fish"
+	**default value:** true
 
 
-	The prefix that is added to all the files containing certain IDs. So individual 0 will turn into '[prefix]0' for all the npz files and within the program.
+	Showing or hiding individual shadows in tracking view.
 
 
 
-.. function:: gui_show_paths(bool)
+.. function:: gui_show_texts(bool)
 
 	**default value:** true
 
 
-	Equivalent to the checkbox visible in GUI on the bottom-left.
+	Showing or hiding individual identity (and related) texts in tracking view.
 
 
 
-.. function:: postures_per_thread(float)
+.. function:: gui_show_uniqueness(bool)
 
-	**default value:** 1
+	**default value:** false
 
 
-	Number of individuals for which postures will be estimated per thread.
+	Show/hide uniqueness overview after training.
 
 
 
-.. function:: build_type(string)
+.. function:: gui_show_visualfield(bool)
 
-	**default value:** "$<$<CONFIG:Debug>:Release>$<$<CONFIG:Release>:Debug>"
+	**default value:** false
 
 
-	The mode the application was built in.
+	Show/hide the visual field rays.
 
 
 
-.. function:: gui_show_texts(bool)
+.. function:: gui_show_visualfield_ts(bool)
 
-	**default value:** true
+	**default value:** false
 
 
-	Showing or hiding individual identity (and related) texts in tracking view.
+	Show/hide the visual field time series.
 
 
 
-.. function:: gui_zoom_limit(size)
+.. function:: gui_single_identity_color(color)
 
-	**default value:** [300,300]
+	**default value:** [0,0,0,0]
 
 
-	
+	If set to something else than transparent, all individuals will be displayed with this color.
 
 
 
-.. function:: output_posture_data(bool)
+.. function:: gui_transparent_background(bool)
 
 	**default value:** false
 
 
-	Save posture data npz file along with the usual NPZ/CSV files containing positions and such. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_posture_fishXXX.npz' will be created for each individual XXX.
+	If enabled, fonts might look weird but you can record movies (and images) with transparent background (if gui_background_color.alpha is < 255).
 
-	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
 
 
-.. function:: gui_fish_color(string)
+.. function:: gui_zoom_limit(size)
 
-	**default value:** "identity"
+	**default value:** [300,300]
 
 
 	
 
 
 
-.. function:: gui_show_posture(bool)
-
-	**default value:** true
-
-
-	Show/hide the posture window on the top-right.
-
+.. function:: heatmap_dynamic(bool)
 
+	**default value:** false
 
-.. function:: gui_faded_brightness(uchar)
 
-	**default value:** 255
+	If enabled the heatmap will only show frames before the frame currently displayed in the graphical user interface.
 
 
-	The alpha value of tracking-related elements when timeline is hidden (0-255).
 
+.. function:: heatmap_frames(uint)
 
+	**default value:** 0
 
-.. function:: gui_auto_scale(bool)
 
-	**default value:** false
+	If `heatmap_dynamic` is enabled, this variable determines the range of frames that are considered. If set to 0, all frames up to the current frame are considered. Otherwise, this number determines the number of frames previous to the current frame that are considered.
 
+	.. seealso:: :func:`heatmap_dynamic`, 
 
-	If set to true, the tracker will always try to zoom in on the whole group. This is useful for some individuals in a huge video (because if they are too tiny, you cant see them and their posture anymore).
 
+.. function:: heatmap_normalization(heatmap_normalization_t)
 
+	**default value:** cell
 
-.. function:: gui_show_midline_histogram(bool)
+	**possible values:**
+		- `none`: No normalization at all. Values will only be averaged per cell.
+		- `value`: Normalization based in value-space. The average of each cell will be divided by the maximum value encountered.
+		- `cell`: The cell sum will be divided by the maximum cell value encountered.
+		- `variance`: Displays the variation within each cell.
 
-	**default value:** false
+	Normalization used for the heatmaps. If `value` is selected, then the maximum of all values encountered will be used to normalize the average of each cell. If `cell` is selected, the sum of each cell will be divided by the maximum cell value encountered.
 
 
-	Displays a histogram for midline lengths.
+	.. seealso:: :func:`value`, :func:`cell`, 
 
 
+.. function:: heatmap_resolution(uint)
 
-.. function:: gui_show_fish(pair<int64,int>)
+	**default value:** 64
 
-	**default value:** [-1,-1]
 
+	Square resolution of individual heatmaps displayed with `gui_show_heatmap`. Will generate a square grid, each cell with dimensions (video_width / N, video_height / N), and sort all positions of each identity into it.
 
-	Show debug output for {blob_id, fish_id}.
+	.. seealso:: :func:`gui_show_heatmap`, 
 
 
+.. function:: heatmap_smooth(double)
 
-.. function:: frame_rate(int)
+	**default value:** 0.05
 
-	**default value:** 0
 
+	Value between 0 and 1, think of as `heatmap_smooth` times video width, indicating the maximum upscaled size of the heatmaps shown in the tracker. Makes them prettier, but maybe much slower.
 
-	Specifies the frame rate of the video. It is used e.g. for playback speed and certain parts of the matching algorithm. Will be set by the .settings of a video (or by the video itself).
 
 
+.. function:: heatmap_source(string)
 
-.. function:: gui_show_heatmap(bool)
+	**default value:** ""
 
-	**default value:** false
 
+	If empty, the source will simply be an individuals identity. Otherwise, information from export data sources will be used.
 
-	Showing a heatmap per identity, normalized by maximum samples per grid-cell.
 
 
+.. function:: heatmap_value_range(range<double>)
 
-.. function:: gui_show_boundary_crossings(bool)
+	**default value:** [-1,-1]
 
-	**default value:** true
 
+	Give a custom value range that is used to normalize heatmap cell values.
 
-	If set to true (and the number of individuals is set to a number > 0), the tracker will show whenever an individual enters the recognition boundary. Indicated by an expanding cyan circle around it.
 
 
+.. function:: history_matching_log(path)
 
-.. function:: build_cxx_options(string)
+	**default value:** ""
 
-	**default value:** " -Wno-c++98-compat-pedantic -fvisibility=hidden -O3 -DNDEBUG -O3 -Wno-nullability-extension"
 
+	If this is set to a valid html file path, a detailed matching history log will be written to the given file for each frame.
 
-	The mode the application was built in.
 
 
+.. function:: httpd_port(int)
 
-.. function:: midline_invert(bool)
+	**default value:** 8080
 
-	**default value:** false
 
+	This is where the webserver tries to establish a socket. If it fails, this will be set to the port that was chosen.
 
-	If enabled, all midlines will be inverted (tail/head swapped).
 
 
+.. function:: huge_timestamp_ends_segment(bool)
 
-.. function:: individual_names(map<int,string>)
+	**default value:** true
 
-	**default value:** {}
 
+	
 
-	A map of {individual-id: "individual-name", ...} that names individuals in the GUI and exported data.
 
 
+.. function:: huge_timestamp_seconds(double)
 
-.. function:: gui_interface_scale(float)
+	**default value:** 0.2
 
-	**default value:** 0.75
 
+	Defaults to 0.5s (500ms), can be set to any value that should be recognized as being huge.
 
-	Scales the whole interface. A value greater than 1 will make it smaller.
 
 
+.. function:: image_invert(bool)
 
-.. function:: pixel_grid_cells(ulong)
+	**default value:** false
 
-	**default value:** 25
 
+	Inverts the image greyscale values before thresholding.
 
-	
 
 
+.. function:: individual_names(map<int,string>)
 
-.. function:: analysis_paused(bool)
+	**default value:** {}
 
-	**default value:** false
 
+	A map of {individual-id: "individual-name", ...} that names individuals in the GUI and exported data.
 
-	Halts the analysis.
 
 
+.. function:: individual_prefix(string)
 
-.. function:: use_differences(bool)
+	**default value:** "fish"
 
-	**default value:** false
 
+	The prefix that is added to all the files containing certain IDs. So individual 0 will turn into '[prefix]0' for all the npz files and within the program.
 
-	This should be set to false unless when using really old files.
 
 
+.. function:: individuals_per_thread(float)
 
-.. function:: gui_show_pixel_grid(bool)
+	**default value:** 1
 
-	**default value:** false
 
+	Number of individuals for which positions will be estimated per thread.
 
-	Shows the proximity grid generated for all blobs, which is used for history splitting.
 
 
+.. function:: limit(float)
 
-.. function:: gpu_enable_accumulation(bool)
+	**default value:** 0.09
 
-	**default value:** true
 
+	Limit for tailbeat event detection.
 
-	Enables or disables the idtrackerai-esque accumulation protocol cascade. It is usually a good thing to enable this (especially in more complicated videos), but can be disabled as a fallback (e.g. if computation time is a major constraint).
 
 
+.. function:: log_file(path)
 
-.. function:: gui_show_selections(bool)
+	**default value:** ""
 
-	**default value:** true
 
+	Set this to a path you want to save the log file to.
 
-	Show/hide circles around selected individual.
 
 
+.. function:: manual_identities(set<int>)
 
-.. function:: gui_show_graph(bool)
+	**default value:** []
 
-	**default value:** false
 
+	
 
-	Show/hide the data time-series graph.
 
 
+.. function:: manual_matches(map<int,map<int,int64>>)
 
-.. function:: gui_show_probabilities(bool)
+	**default value:** {}
 
-	**default value:** false
 
+	A map of manually defined matches (also updated by GUI menu for assigning manual identities). {{frame: {fish0: blob2, fish1: blob0}}, ...}
 
-	Show/hide probability visualisation when an individual is selected.
 
 
+.. function:: manual_splits(map<int,set<int64>>)
 
-.. function:: gui_show_recognition_summary(bool)
+	**default value:** {}
 
-	**default value:** false
 
+	This map contains {frame: [blobid1,blobid2,...]} where frame and blobid are integers. When this is read during tracking for a frame, the tracker will attempt to force-split the given blob ids.
 
-	Show/hide confusion matrix (if network is loaded).
 
 
+.. function:: manually_approved(map<int,int>)
 
-.. function:: enable_absolute_difference(bool)
+	**default value:** {}
 
-	**default value:** true
 
+	A list of ranges of manually approved frames that may be used for generating training datasets {232:232,5555:5560}.
 
-	If set to true, the threshold values will be applied to abs(image - background). Otherwise max(0, image - background).
 
 
+.. function:: match_mode(matching_mode_t)
 
-.. function:: gui_show_visualfield_ts(bool)
+	**default value:** accurate
 
-	**default value:** false
+	**possible values:**
+		- `accurate`: Maximizes the probability sum by assigning (or potentially not assigning) individuals to objects in the frame. This returns the correct solution, but might take long for high quantities of individuals.
+		- `approximate`: Simply assigns the highest probability edges (blob to individual) to all individuals - first come, first serve. Parameters have to be set very strictly (especially speed) in order to have as few objects to choose from as possible and limit the error.
+		- `hungarian`: The hungarian algorithm (as implemented in O(n^3) by Mattias Andrée `https://github.com/maandree/hungarian-algorithm-n3`).
+		- `benchmark`: Runs all algorithms and pits them against each other, outputting statistics every few frames.
 
+	Changes the default algorithm to be used for matching blobs in one frame to blobs in the next frame. The accurate algorithm performs best, but also scales less well for more individuals than the approximate one. However, if it is too slow (temporarily) in a few frames, the program falls back to using the approximate one that doesnt slow down.
 
-	Show/hide the visual field time series.
 
 
 
-.. function:: gui_show_uniqueness(bool)
+.. function:: matching_probability_threshold(float)
 
-	**default value:** false
+	**default value:** 0.1
 
 
-	Show/hide uniqueness overview after training.
+	The probability below which a possible connection between blob and identity is considered too low. The probability depends largely upon settings like `track_max_speed`.
 
+	.. seealso:: :func:`track_max_speed`, 
 
 
-.. function:: output_statistics(bool)
+.. function:: meta_mass_mg(float)
 
-	**default value:** true
+	**default value:** 200
 
 
-	Save an NPZ file containing an array with shape Nx5 and contents [[adding_frame_seconds, combined_posture_seconds, track_max_individuals, loading_seconds, posture_seconds],...] and an 1D-array containing all frame numbers. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_statistics.npz' will be created. This will not output anything interesting, if the data was loaded instead of analysed.
+	Used for exporting event-energy levels.
 
-	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
 
 
-.. function:: gui_show_shadows(bool)
+.. function:: meta_real_width(float)
 
-	**default value:** true
+	**default value:** 0
 
 
-	Showing or hiding individual shadows in tracking view.
+	The actual width of what is seen on a video image in centimeters. So for example if the image is cropped exactly to the tank, it would be the width of the tank. Used to convert from pixels to centimeters.
 
 
 
-.. function:: gpu_min_elements(ulong)
+.. function:: meta_source_path(path)
 
-	**default value:** 25000
+	**default value:** ""
 
 
-	Minimum number of images being collected, before sending them to the GPU.
+	Path of the original video file for conversions (saved as debug info).
 
 
 
-.. function:: gui_show_outline(bool)
+.. function:: midline_invert(bool)
 
-	**default value:** true
+	**default value:** false
 
 
-	Showing or hiding individual outlines in tracking view.
+	If enabled, all midlines will be inverted (tail/head swapped).
 
 
 
-.. function:: panic_button(int)
+.. function:: midline_resolution(uint)
 
-	**default value:** 0
+	**default value:** 12
 
 
-	42
+	Number of midline points that are saved. Higher number increases detail.
 
 
 
-.. function:: gui_show_manual_matches(bool)
+.. function:: midline_samples(uint64)
 
-	**default value:** true
+	**default value:** 0
 
 
-	Show/hide manual matches in path.
+	The maximum number of samples taken for generating a ``median midline length``. Setting this to 0 removes the limit all together. A limit may be set for very long videos, or videos with lots of individual, for memory reasons.
 
+	.. seealso:: :func:``, :func:``, 
 
 
-.. function:: gui_mode(mode_t)
+.. function:: midline_start_with_head(bool)
 
-	**default value:** tracking
+	**default value:** false
 
 
-	The currently used display mode for the GUI.
+	If enabled, the midline is going to be estimated starting at the head instead of the tail.
 
 
 
@@ -1297,358 +1246,370 @@ TRex parameters
 
 
 
-.. function:: heatmap_value_range(range<double>)
+.. function:: midline_walk_offset(float)
 
-	**default value:** [-1,-1]
+	**default value:** 0.025
 
 
-	Give a custom value range that is used to normalize heatmap cell values.
+	This percentage of the number of outline points is the amount of points that the midline-algorithm is allowed to move left and right upon each step. Higher numbers will make midlines more straight, especially when extremities are present (that need to be skipped over), but higher numbers will also potentially decrease accuracy for less detailed objects.
 
 
 
-.. function:: gpu_min_iterations(ulong)
+.. function:: nowindow(bool)
 
-	**default value:** 100
+	**default value:** false
 
 
-	Minimum number of iterations per epoch for training a recognition network.
+	If set to true, no GUI will be created on startup (e.g. when starting from SSH).
 
 
 
-.. function:: gui_show_memory_stats(bool)
+.. function:: outline_approximate(uchar)
 
-	**default value:** false
+	**default value:** 3
 
 
-	Showing or hiding memory statistics.
+	If this is a number > 0, the outline detected from the image will be passed through an elliptical fourier transform with `outline_approximate` number of coefficients. When the given number is sufficiently low, the outline will be smoothed significantly (and more so for lower numbers of coefficients).
 
 
 
-.. function:: error_terminate(bool)
+.. function:: outline_curvature_range_ratio(float)
 
-	**default value:** false
+	**default value:** 0.03
 
 
-	
+	Determines the ratio between number of outline points and distance used to calculate its curvature. Program will look at index +- `ratio * size()` and calculate the distance between these points (see posture window red/green color).
 
+	.. seealso:: :func:`ratio * size()`, 
 
 
-.. function:: exec(path)
+.. function:: outline_resample(float)
 
-	**default value:** ""
+	**default value:** 1
 
 
-	This can be set to the path of an additional settings file that is executed after the normal settings file.
+	Spacing between outline points in pixels, after resampling (normalizing) the outline. A lower value here can drastically increase the number of outline points generated (and decrease speed).
 
 
 
-.. function:: visual_field_eye_separation(float)
+.. function:: outline_smooth_samples(uchar)
 
-	**default value:** 60
+	**default value:** 4
 
 
-	Degrees of separation between the eye and looking straight ahead. Results in the eye looking towards head.angle +- `visual_field_eye_separation`.
+	Use N samples for smoothing the outline. More samples will generate a smoother (less detailed) outline.
 
 
 
-.. function:: limit(float)
+.. function:: outline_smooth_step(uchar)
 
-	**default value:** 0.09
+	**default value:** 1
 
 
-	Limit for tailbeat event detection.
+	Jump over N outline points when smoothing (reducing accuracy).
 
 
 
-.. function:: gui_equalize_blob_histograms(bool)
+.. function:: outline_use_dft(bool)
 
 	**default value:** true
 
 
-	Equalize histograms of blobs wihtin videos (makes them more visible).
+	If enabled, the program tries to reduce outline noise by convolution of the curvature array with a low pass filter.
 
 
 
-.. function:: recognition_save_progress_images(bool)
+.. function:: output_annotations(map<string,string>)
 
-	**default value:** false
+	**default value:** {"ACCELERATION":"cm/s2","ACCELERATION_SMOOTH":"cm/s2","BORDER_DISTANCE":"cm","NEIGHBOR_DISTANCE":"cm","ORIENTATION":"rad","SPEED":"cm/s","SPEED_OLD":"cm/s","SPEED_SMOOTH":"cm/s","VX":"cm/s","VY":"cm/s","X":"cm","Y":"cm","global":"px"}
 
 
-	If set to true, an image will be saved for all training epochs, documenting the uniqueness in each step.
+	Units (as a string) of output functions to be annotated in various places like graphs.
 
 
 
-.. function:: gui_show_export_options(bool)
+.. function:: output_centered(bool)
 
 	**default value:** false
 
 
-	Show/hide the export options widget.
+	If set to true, the origin of all X and Y coordinates is going to be set to the center of the video.
 
 
 
-.. function:: gui_max_path_time(float)
+.. function:: output_default_options(map<string,array<string>>)
 
-	**default value:** 3
+	**default value:** {"event_acceleration":["/10"],"ACCELERATION":["/15","SMOOTH","CENTROID"],"L_V":["/10"],"v_direction":["/10"],"DOT_V":["/10"],"ANGULAR_V":["/10","SMOOTH","CENTROID"],"ANGULAR_A":["/1000","SMOOTH","CENTROID"],"NEIGHBOR_VECTOR_T":["/1"],"SPEED":["/10","SMOOTH"],"NEIGHBOR_DISTANCE":["/10"],"X":["/100"],"Y":["/100"],"tailbeat_threshold":["pm"],"tailbeat_peak":["pm"],"threshold_reached":["POINTS"],"midline_length":["/15"],"amplitude":["/100"],"outline_size":["/100"],"global":["/10"]}
 
 
-	Length (in time) of the trails shown in GUI.
+	Default scaling and smoothing options for output functions, which are applied to functions in `output_graphs` during export.
 
+	.. seealso:: :func:`output_graphs`, 
 
 
-.. function:: gui_show_blobs(bool)
+.. function:: output_dir(path)
 
-	**default value:** true
+	**default value:** "/Users/tristan/Videos"
 
 
-	Showing or hiding individual raw blobs in tracking view (are always shown in RAW mode).
+	Default output-/input-directory. Change this in order to omit paths in front of filenames for open and save.
 
 
 
-.. function:: settings_file(path)
+.. function:: output_format(output_format_t)
 
-	**default value:** ""
+	**default value:** npz
 
+	**possible values:**
+		- `csv`: A standard data format, comma-separated columns for each data stream.
+		- `npz`: NPZ is basically a collection of binary arrays, readable by NumPy and other plugins (there are plugins available for Matlab and R).
 
-	Name of the settings file. By default, this will be set to `filename`.settings in the same folder as `filename`.
+	When pressing the S(ave) button or using auto_quit, this setting allows to switch between CSV and NPZ output. NPZ files are recommended and will be used by default - some functionality (such as visual fields, posture data, etc.) will remain in NPZ format due to technical constraints.
 
-	.. seealso:: :func:`filename`, :func:`filename`, 
 
 
-.. function:: gui_playback_speed(float)
 
-	**default value:** 1
+.. function:: output_frame_window(int)
 
+	**default value:** 100
 
-	Playback speed when pressing SPACE.
 
+	If an individual is selected during CSV output, use these number of frames around it (or -1 for all frames).
 
 
-.. function:: heatmap_normalization(heatmap_normalization_t)
 
-	**default value:** cell
+.. function:: output_graphs(array<pair<string,array<string>>>)
 
-	**possible values:**
-		- `none`: No normalization at all. Values will only be averaged per cell.
-		- `value`: Normalization based in value-space. The average of each cell will be divided by the maximum value encountered.
-		- `cell`: The cell sum will be divided by the maximum cell value encountered.
-		- `variance`: Displays the variation within each cell.
+	**default value:** [["X",["RAW","WCENTROID"]],["Y",["RAW","WCENTROID"]],["X",["RAW","HEAD"]],["Y",["RAW","HEAD"]],["VX",["RAW","HEAD"]],["VY",["RAW","HEAD"]],["AX",["RAW","HEAD"]],["AY",["RAW","HEAD"]],["ANGLE",["RAW"]],["ANGULAR_V",["RAW"]],["ANGULAR_A",["RAW"]],["MIDLINE_OFFSET",["RAW"]],["normalized_midline",["RAW"]],["midline_length",["RAW"]],["midline_x",["RAW"]],["midline_y",["RAW"]],["segment_length",["RAW"]],["SPEED",["RAW","WCENTROID"]],["SPEED",["SMOOTH","WCENTROID"]],["SPEED",["RAW","PCENTROID"]],["SPEED",["RAW","HEAD"]],["BORDER_DISTANCE",["PCENTROID"]],["time",[]],["timestamp",[]],["frame",[]],["missing",[]],["num_pixels",[]],["ACCELERATION",["RAW","PCENTROID"]],["ACCELERATION",["RAW","WCENTROID"]]]
 
-	Normalization used for the heatmaps. If `value` is selected, then the maximum of all values encountered will be used to normalize the average of each cell. If `cell` is selected, the sum of each cell will be divided by the maximum cell value encountered.
 
+	The functions that will be exported when saving to CSV, or shown in the graph. [['X',[option], ...]]
 
-	.. seealso:: :func:`value`, :func:`cell`, 
 
 
-.. function:: build_is_debug(string)
+.. function:: output_image_per_tracklet(bool)
 
-	**default value:** "debug"
+	**default value:** false
 
 
-	If built in debug mode, this will show 'debug'.
+	If set to true, the program will output one median image per tracklet (time-series segment) and save it alongside the npz/csv files.
 
 
 
-.. function:: heatmap_resolution(uint)
+.. function:: output_min_frames(ulong)
 
-	**default value:** 64
+	**default value:** 1
 
 
-	Square resolution of individual heatmaps displayed with `gui_show_heatmap`. Will generate a square grid, each cell with dimensions (video_width / N, video_height / N), and sort all positions of each identity into it.
+	Filters all individual with less than N frames when exporting. Individuals with fewer than N frames will also be hidden in the GUI unless `gui_show_inactive_individuals` is enabled (default).
 
-	.. seealso:: :func:`gui_show_heatmap`, 
+	.. seealso:: :func:`gui_show_inactive_individuals`, 
 
 
-.. function:: filename(path)
+.. function:: output_normalize_midline_data(bool)
 
-	**default value:** ""
+	**default value:** false
 
 
-	Opened filename (without .pv).
+	If enabled: save a normalized version of the midline data saved whenever `output_posture_data` is set to true. Normalized means that the position of the midline points is normalized across frames (or the distance between head and point n in the midline array).
 
+	.. seealso:: :func:`output_posture_data`, 
 
 
-.. function:: terminate(bool)
+.. function:: output_posture_data(bool)
 
 	**default value:** false
 
 
-	If set to true, the application terminates.
+	Save posture data npz file along with the usual NPZ/CSV files containing positions and such. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_posture_fishXXX.npz' will be created for each individual XXX.
 
+	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
 
 
-.. function:: auto_no_tracking_data(bool)
+.. function:: output_prefix(string)
 
-	**default value:** false
+	**default value:** ""
 
 
-	If set to true, the auto_quit option will NOT save any `output_graphs` tracking data - just the posture data (if enabled) and the results file (if not disabled). This saves time and space if that is a need.
+	A prefix that is prepended to all output files (csv/npz).
 
-	.. seealso:: :func:`output_graphs`, 
 
 
-.. function:: blob_size_ranges(BlobSizeRange)
+.. function:: output_recognition_data(bool)
 
-	**default value:** [[0.1,3]]
+	**default value:** false
 
 
-	Blobs below the lower bound are recognized as noise instead of individuals. Blobs bigger than the upper bound are considered to potentially contain more than one individual. The unit is #pixels * (`meta_real_width` / video_width).
+	Save recognition / probability data npz file along with the usual NPZ/CSV files containing positions and such. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_recognition_fishXXX.npz' will be created for each individual XXX.
 
-	.. seealso:: :func:`meta_real_width`, 
+	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
 
 
-.. function:: history_matching_log(path)
+.. function:: output_statistics(bool)
 
-	**default value:** ""
+	**default value:** true
 
 
-	If this is set to a valid html file path, a detailed matching history log will be written to the given file for each frame.
+	Save an NPZ file containing an array with shape Nx5 and contents [[adding_frame_seconds, combined_posture_seconds, track_max_individuals, loading_seconds, posture_seconds],...] and an 1D-array containing all frame numbers. If set to true, a file called '`output_dir`/`fish_data_dir`/`filename`\_statistics.npz' will be created. This will not output anything interesting, if the data was loaded instead of analysed.
 
+	.. seealso:: :func:`output_dir`, :func:`fish_data_dir`, :func:`filename`, 
 
 
-.. function:: meta_source_path(path)
+.. function:: panic_button(int)
 
-	**default value:** ""
+	**default value:** 0
 
 
-	Path of the original video file for conversions (saved as debug info).
+	42
 
 
 
-.. function:: httpd_port(int)
+.. function:: peak_mode(peak_mode_t)
 
-	**default value:** 8080
+	**default value:** pointy
+
+	**possible values:**
+		- `pointy`: The head is broader than the tail.
+		- `broad`: The tail is broader than the head.
 
+	This determines whether the tail of an individual should be expected to be pointy or broad.
 
-	This is where the webserver tries to establish a socket. If it fails, this will be set to the port that was chosen.
 
 
 
-.. function:: log_file(path)
+.. function:: pixel_grid_cells(ulong)
 
-	**default value:** ""
+	**default value:** 25
 
 
-	Set this to a path you want to save the log file to.
+	
 
 
 
-.. function:: heatmap_source(string)
+.. function:: posture_closing_size(uchar)
 
-	**default value:** ""
+	**default value:** 2
 
 
-	If empty, the source will simply be an individuals identity. Otherwise, information from export data sources will be used.
+	The kernel size for erosion / dilation of the posture algorithm. Only has an effect with  `posture_closing_steps` > 0.
 
+	.. seealso:: :func:`posture_closing_steps`, 
 
 
-.. function:: track_max_individuals(int)
+.. function:: posture_closing_steps(uchar)
 
 	**default value:** 0
 
 
-	The maximal number of individual that are assigned at the same time (infinite if set to zero). If the given number is below the actual number of individual, then only a (random) subset of individual are assigned and a warning is shown.
+	When enabled (> 0), posture will be processed using a combination of erode / dilate in order to close holes in the shape and get rid of extremities. An increased number of steps will shrink the shape, but will also be more time intensive.
 
 
 
-.. function:: auto_quit(bool)
+.. function:: posture_direction_smoothing(ulong)
 
-	**default value:** false
+	**default value:** 0
 
 
-	If set to true, the application will automatically save all results and export CSV files and quit, after the analysis is complete.
+	Enables or disables smoothing of the posture orientation based on previous frames (not good for fast turns).
 
 
 
-.. function:: debug(bool)
+.. function:: posture_head_percentage(float)
 
-	**default value:** false
+	**default value:** 0.1
 
 
-	Enables some verbose debug print-outs.
+	The percentage of the midline-length that the head is moved away from the front of the body.
 
 
 
-.. function:: auto_minmax_size(bool)
+.. function:: postures_per_thread(float)
 
-	**default value:** false
+	**default value:** 1
 
 
-	Program will try to find minimum / maximum size of the individuals automatically for the current `cm_per_pixel` setting. Can only be passed as an argument upon startup. The calculation is based on the median blob size in the video and assumes a relatively low level of noise.
+	Number of individuals for which postures will be estimated per thread.
 
-	.. seealso:: :func:`cm_per_pixel`, 
 
 
-.. function:: meta_mass_mg(float)
+.. function:: python_path(path)
 
-	**default value:** 200
+	**default value:** "/Users/tristan/opt/anaconda3/envs/only_ffmpeg/bin/python3"
 
 
-	Used for exporting event-energy levels.
+	Path to the python home folder. If left empty, the user is required to make sure that all necessary libraries are in-scope the PATH environment variable.
 
 
 
-.. function:: nowindow(bool)
+.. function:: recognition_border(recognition_border_t)
 
-	**default value:** false
+	**default value:** none
 
+	**possible values:**
+		- `none`: No border at all. All points are inside the recognition boundary. (default)
+		- `heatmap`: Looks at a subset of frames from the video, trying to find out where individuals go and masking all the places they do not.
+		- `outline`: Similar to heatmap, but tries to build a convex border around the around (without holes in it).
+		- `shapes`: Any array of convex shapes. Set coordinates by changing `recognition_shapes`.
+		- `grid`: The points defined in `grid_points` are turned into N different circles inside the arena (with points in `grid_points` being the circle centers), which define in/out if inside/outside any of the circles.
+		- `circle`: The video-file provides a binary mask (e.g. when `cam_circle_mask` was set to true during recording), which is then used to determine in/out.
 
-	If set to true, no GUI will be created on startup (e.g. when starting from SSH).
+	This defines the type of border that is used in all automatic recognition routines. Depending on the type set here, you might need to set other parameters as well (e.g. `recognition_shapes`). In general, this defines whether an image of an individual is usable for automatic recognition. If it is inside the defined border, then it will be passed on to the recognition network - if not, then it wont.
 
 
+	.. seealso:: :func:`recognition_shapes`, 
 
-.. function:: outline_smooth_samples(uchar)
 
-	**default value:** 4
+.. function:: recognition_border_shrink_percent(float)
 
+	**default value:** 0.3
 
-	Use N samples for smoothing the outline. More samples will generate a smoother (less detailed) outline.
 
+	The amount by which the recognition border is shrunk after generating it (roughly and depends on the method).
 
 
-.. function:: gui_show_recognition_bounds(bool)
 
-	**default value:** true
+.. function:: recognition_border_size_rescale(float)
 
+	**default value:** 0.5
 
-	Shows what is contained within tht recognition boundary as a cyan background. (See `recognition_border` for details.)
 
-	.. seealso:: :func:`recognition_border`, 
+	The amount that blob sizes for calculating the heatmap are allowed to go below or above blob_size_ranges (e.g. 0.5 means that the sizes can range between blob_size_ranges.min * (1 - 0.5) and blob_size_ranges.max * (1 + 0.5)).
 
 
-.. function:: video_info(string)
 
-	**default value:** ""
+.. function:: recognition_coeff(ulong)
+
+	**default value:** 50
 
 
-	Information on the current video as provided by PV.
+	
 
 
 
-.. function:: auto_no_memory_stats(bool)
+.. function:: recognition_enable(bool)
 
 	**default value:** true
 
 
-	If set to true, no memory statistics will be saved on auto_quit.
+	This enables internal training. Requires Python3 and Keras to be available.
 
 
 
-.. function:: track_max_reassign_time(float)
+.. function:: recognition_image_scale(float)
 
-	**default value:** 0.5
+	**default value:** 1
 
 
-	Distance in time (seconds) where the matcher will stop trying to reassign an individual based on previous position. After this time runs out, depending on the settings, the tracker will try to find it based on other criteria, or generate a new individual.
+	Scaling applied to the images before passing them to the network.
 
 
 
-.. function:: ffmpeg_path(path)
+.. function:: recognition_image_size(size)
 
-	**default value:** ""
+	**default value:** [80,80]
 
 
-	Path to an ffmpeg executable file. This is used for converting videos after recording them (from the GUI). It is not a critical component of the software, but mostly for convenience.
+	Size of each image generated for network training.
 
 
 
@@ -1668,103 +1629,106 @@ TRex parameters
 	.. seealso:: :func:`none`, :func:`image moments`, 
 
 
-.. function:: tracklet_restore_split_blobs(bool)
+.. function:: recognition_save_progress_images(bool)
 
-	**default value:** true
+	**default value:** false
 
 
-	If enabled, all exported tracklet images are checked for missing pixels. When a blob is too close to another blob, parts of the other blob might be erased so the individuals can be told apart. If enabled, another mask will be saved, that contains only the blob in focus, without the rest-pixels.
+	If set to true, an image will be saved for all training epochs, documenting the uniqueness in each step.
 
 
 
-.. function:: output_prefix(string)
+.. function:: recognition_save_training_images(bool)
 
-	**default value:** ""
+	**default value:** false
 
 
-	A prefix that is prepended to all output files (csv/npz).
+	If set to true, the program will save the images used for a successful training of the recognition network to the output path.
 
 
 
-.. function:: video_length(ulong)
+.. function:: recognition_shapes(array<array<vec>>)
 
-	**default value:** 0
+	**default value:** []
 
 
-	The length of the video in frames
+	If `recognition_border` is set to 'shapes', then the identification network will only be applied to blobs within the convex shapes specified here.
 
+	.. seealso:: :func:`recognition_border`, 
 
 
-.. function:: auto_apply(bool)
+.. function:: recognition_smooth_amount(ulong)
 
-	**default value:** false
+	**default value:** 200
 
 
-	If set to true, the application will automatically apply the network with existing weights once the analysis is done. It will then automatically correct and reanalyse the video.
+	
 
 
 
-.. function:: gui_connectivity_matrix(map<int,array<float>>)
+.. function:: settings_file(path)
 
-	**default value:** {}
+	**default value:** ""
 
 
-	Internally used to store the connectivity matrix.
+	Name of the settings file. By default, this will be set to `filename`.settings in the same folder as `filename`.
 
+	.. seealso:: :func:`filename`, :func:`filename`, 
 
 
-.. function:: gui_single_identity_color(color)
+.. function:: smooth_window(uint)
 
-	**default value:** [0,0,0,0]
+	**default value:** 2
 
 
-	If set to something else than transparent, all individuals will be displayed with this color.
+	Smoothing window used for exported data with the #smooth tag.
 
 
 
-.. function:: heatmap_dynamic(bool)
+.. function:: speed_extrapolation(float)
 
-	**default value:** false
+	**default value:** 3
 
 
-	If enabled the heatmap will only show frames before the frame currently displayed in the graphical user interface.
+	Used for matching when estimating the next position of an individual. Smaller values are appropriate for lower frame rates. The higher this value is, the more previous frames will have significant weight in estimating the next position (with an exponential decay).
 
 
 
-.. function:: build(string)
+.. function:: tags_path(path)
 
 	**default value:** ""
 
 
-	Current build version
+	If this path is set, the program will try to find tags and save them at the specified location.
 
 
 
-.. function:: web_time_threshold(float)
+.. function:: terminate(bool)
 
-	**default value:** 0.05
+	**default value:** false
 
 
-	Maximum refresh rate in seconds for the web interface.
+	If set to true, the application terminates.
 
 
 
-.. function:: midline_walk_offset(float)
+.. function:: terminate_training(bool)
 
-	**default value:** 0.025
+	**default value:** false
 
 
-	This percentage of the number of outline points is the amount of points that the midline-algorithm is allowed to move left and right upon each step. Higher numbers will make midlines more straight, especially when extremities are present (that need to be skipped over), but higher numbers will also potentially decrease accuracy for less detailed objects.
+	Setting this to true aborts the training in progress.
 
 
 
-.. function:: gui_show_histograms(bool)
+.. function:: threshold_ratio_range(rangef)
 
-	**default value:** false
+	**default value:** [0.5,1]
 
 
-	Equivalent to the checkbox visible in GUI on the bottom-left.
+	If `track_threshold_2` is not equal to zero, this ratio will be multiplied by the number of pixels present before the second threshold. If the resulting size falls within the given range, the blob is deemed okay.
 
+	.. seealso:: :func:`track_threshold_2`, 
 
 
 .. function:: track_do_history_split(bool)
@@ -1776,144 +1740,135 @@ TRex parameters
 
 
 
-.. function:: output_image_per_tracklet(bool)
+.. function:: track_end_segment_for_speed(bool)
 
-	**default value:** false
+	**default value:** true
 
 
-	If set to true, the program will output one median image per tracklet (time-series segment) and save it alongside the npz/csv files.
+	Sometimes individuals might be assigned to blobs that are far away from the previous position. This could indicate wrong assignments, but not necessarily. If this variable is set to true, consecutive frame segments will end whenever high speeds are reached, just to be on the safe side. For scenarios with lots of individuals (and no recognition) this might spam yellow bars in the timeline and may be disabled.
 
 
 
-.. function:: outline_curvature_range_ratio(float)
+.. function:: track_ignore(array<array<vec>>)
 
-	**default value:** 0.03
+	**default value:** []
 
 
-	Determines the ratio between number of outline points and distance used to calculate its curvature. Program will look at index +- `ratio * size()` and calculate the distance between these points (see posture window red/green color).
+	If this is not empty, objects within the given rectangles or polygons (>= 3 points) [[x0,y0],[x1,y1](, ...)], ...] will be ignored during tracking.
 
-	.. seealso:: :func:`ratio * size()`, 
 
 
-.. function:: gui_show_midline(bool)
+.. function:: track_include(array<array<vec>>)
 
-	**default value:** true
+	**default value:** []
 
 
-	Showing or hiding individual midlines in tracking view.
+	If this is not empty, objects within the given rectangles or polygons (>= 3 points) [[x0,y0],[x1,y1](, ...)], ...] will be the only objects being tracked. (overwrites `track_ignore`)
 
+	.. seealso:: :func:`track_ignore`, 
 
 
-.. function:: outline_smooth_step(uchar)
+.. function:: track_intensity_range(rangel)
 
-	**default value:** 1
+	**default value:** [-1,-1]
 
 
-	Jump over N outline points when smoothing (reducing accuracy).
+	When set to valid values, objects will be filtered to have an average pixel intensity within the given range.
 
 
 
-.. function:: heatmap_frames(uint)
+.. function:: track_max_individuals(int)
 
 	**default value:** 0
 
 
-	If `heatmap_dynamic` is enabled, this variable determines the range of frames that are considered. If set to 0, all frames up to the current frame are considered. Otherwise, this number determines the number of frames previous to the current frame that are considered.
-
-	.. seealso:: :func:`heatmap_dynamic`, 
-
+	The maximal number of individual that are assigned at the same time (infinite if set to zero). If the given number is below the actual number of individual, then only a (random) subset of individual are assigned and a warning is shown.
 
-.. function:: gui_recording_format(gui_recording_format_t)
 
-	**default value:** avi
 
-	**possible values:**
-		- `avi`: AVI / video format (codec FFV1 is used in unix systems)
-		- `jpg`: individual images in JPEG format
-		- `png`: individual images in PNG format
+.. function:: track_max_reassign_time(float)
 
-	Sets the format for recording mode (when R is pressed in the GUI). Supported formats are 'avi', 'jpg' and 'png'. JPEGs have 75%% compression, AVI is using MJPEG compression.
+	**default value:** 0.5
 
 
+	Distance in time (seconds) where the matcher will stop trying to reassign an individual based on previous position. After this time runs out, depending on the settings, the tracker will try to find it based on other criteria, or generate a new individual.
 
 
-.. function:: debug_recognition_output_all_methods(bool)
 
-	**default value:** false
+.. function:: track_max_speed(float)
 
+	**default value:** 50
 
-	If set to true, a complete training will attempt to output all images for each identity with all available normalization methods.
 
+	The maximum speed an individual can have (=> the maximum distance an individual can travel within one second) in cm/s. Uses `meta_real_width`.
 
+	.. seealso:: :func:`meta_real_width`, 
 
-.. function:: output_frame_window(int)
 
-	**default value:** 100
+.. function:: track_posture_threshold(int)
 
+	**default value:** 15
 
-	If an individual is selected during CSV output, use these number of frames around it (or -1 for all frames).
 
+	Same as `track_threshold`, but for posture estimation.
 
+	.. seealso:: :func:`track_threshold`, 
 
-.. function:: gui_background_color(color)
 
-	**default value:** [0,0,0,150]
+.. function:: track_speed_decay(float)
 
+	**default value:** 0.7
 
-	Values < 255 will make the background more transparent in standard view. This might be useful with very bright backgrounds.
 
+	The amount the expected speed is reduced over time when an individual is lost. When individuals collide, depending on the expected behavior for the given species, one should choose different values for this variable. If the individuals usually stop when they collide, this should be set to a value > 0.8. If the individuals are expected to move over one another, the value should be set to a small value > 0.
 
 
-.. function:: recognition_border_shrink_percent(float)
 
-	**default value:** 0.3
+.. function:: track_threshold(int)
 
+	**default value:** 15
 
-	The amount by which the recognition border is shrunk after generating it (roughly and depends on the method).
 
+	Constant used in background subtraction. Pixels with grey values above this threshold will be interpreted as potential individuals, while pixels below this threshold will be ignored.
 
 
-.. function:: match_mode(matching_mode_t)
 
-	**default value:** accurate
+.. function:: track_threshold_2(int)
 
-	**possible values:**
-		- `accurate`: Maximizes the probability sum by assigning (or potentially not assigning) individuals to objects in the frame. This returns the correct solution, but might take long for high quantities of individuals.
-		- `approximate`: Simply assigns the highest probability edges (blob to individual) to all individuals - first come, first serve. Parameters have to be set very strictly (especially speed) in order to have as few objects to choose from as possible and limit the error.
-		- `hungarian`: The hungarian algorithm (as implemented in O(n^3) by Mattias Andrée `https://github.com/maandree/hungarian-algorithm-n3`).
-		- `benchmark`: Runs all algorithms and pits them against each other, outputting statistics every few frames.
+	**default value:** 0
 
-	Changes the default algorithm to be used for matching blobs in one frame to blobs in the next frame. The accurate algorithm performs best, but also scales less well for more individuals than the approximate one. However, if it is too slow (temporarily) in a few frames, the program falls back to using the approximate one that doesnt slow down.
 
+	If not zero, a second threshold will be applied to all objects after they have been deemed do be theoretically large enough. Then they are compared to #before_pixels * `threshold_ratio_range` to see how much they have been shrunk).
 
+	.. seealso:: :func:`threshold_ratio_range`, 
 
 
-.. function:: app_name(string)
+.. function:: track_time_probability_enabled(bool)
 
-	**default value:** "TRex"
+	**default value:** true
 
 
-	Name of the application.
+	
 
 
 
-.. function:: blob_split_global_shrink_limit(float)
+.. function:: track_trusted_probability(float)
 
-	**default value:** 0.2
+	**default value:** 0.5
 
 
-	The minimum percentage of the minimum in `blob_size_ranges`, that a blob is allowed to be reduced to during splitting. If this value is set too low, the program might start recognizing parts of individual as other individual too quickly.
+	If the probability, that is used to assign an individual to an object, is smaller than this value, the current segment will be ended (thus this will also not be a consecutive segment anymore for this individual).
 
-	.. seealso:: :func:`blob_size_ranges`, 
 
 
-.. function:: blobs_per_thread(float)
+.. function:: tracklet_max_images(ulong)
 
-	**default value:** 150
+	**default value:** 0
 
 
-	Number of blobs for which properties will be calculated per thread.
+	Maximum number of images that are being output per tracklet given that `output_image_per_tracklet` is true. If the number is 0, then every image will be exported that has been recognized as an individual.
 
+	.. seealso:: :func:`output_image_per_tracklet`, 
 
 
 .. function:: tracklet_normalize_orientation(bool)
@@ -1925,48 +1880,93 @@ TRex parameters
 
 
 
-.. function:: midline_resolution(uint)
+.. function:: tracklet_restore_split_blobs(bool)
 
-	**default value:** 12
+	**default value:** true
 
 
-	Number of midline points that are saved. Higher number increases detail.
+	If enabled, all exported tracklet images are checked for missing pixels. When a blob is too close to another blob, parts of the other blob might be erased so the individuals can be told apart. If enabled, another mask will be saved, that contains only the blob in focus, without the rest-pixels.
 
 
 
-.. function:: gui_show_number_individuals(bool)
+.. function:: use_differences(bool)
 
 	**default value:** false
 
 
-	Show/hide the #individuals time-series graph.
+	This should be set to false unless when using really old files.
 
 
 
-.. function:: cmd_line(string)
+.. function:: version(string)
 
-	**default value:** ""
+	**default value:** "1.0"
 
 
-	An approximation of the command-line arguments passed to the program.
+	Current application version.
 
 
 
-.. function:: calculate_posture(bool)
+.. function:: video_info(string)
 
-	**default value:** true
+	**default value:** ""
 
 
-	Enables or disables posture calculation. Can only be set before the video is analysed (e.g. in a settings file or as a startup parameter).
+	Information on the current video as provided by PV.
 
 
 
-.. function:: gui_frame(int)
+.. function:: video_length(ulong)
 
 	**default value:** 0
 
 
-	The currently visible frame.
+	The length of the video in frames
+
+
+
+.. function:: video_size(size)
+
+	**default value:** [-1,-1]
+
+
+	The dimensions of the currently loaded video.
+
+
+
+.. function:: visual_field_eye_offset(float)
+
+	**default value:** 0.15
+
+
+	A percentage telling the program how much the eye positions are offset from the start of the midline.
+
+
+
+.. function:: visual_field_eye_separation(float)
+
+	**default value:** 60
+
+
+	Degrees of separation between the eye and looking straight ahead. Results in the eye looking towards head.angle +- `visual_field_eye_separation`.
+
+
+
+.. function:: web_quality(int)
+
+	**default value:** 75
+
+
+	JPEG quality of images transferred over the web interface.
+
+
+
+.. function:: web_time_threshold(float)
+
+	**default value:** 0.05
+
+
+	Maximum refresh rate in seconds for the web interface.
 
 
 
-- 
GitLab