From ba5f638ca8188ae8915e2f8c6e56e27e216305f2 Mon Sep 17 00:00:00 2001
From: ldam <ldam@passcal.nmt.edu>
Date: Fri, 6 Oct 2023 08:48:13 -0600
Subject: [PATCH] docstring

---
 documentation/02 _ Shortcuts.md               | 13 +++
 .../05 _ Read from Memory Card.help.md        | 37 ++++++++
 documentation/10 _ TPS Dialog.help.md         | 93 +++++++++++++++++++
 sohstationviewer/controller/util.py           |  2 +-
 4 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 documentation/02 _ Shortcuts.md
 create mode 100644 documentation/05 _ Read from Memory Card.help.md
 create mode 100644 documentation/10 _ TPS Dialog.help.md

diff --git a/documentation/02 _ Shortcuts.md b/documentation/02 _ Shortcuts.md
new file mode 100644
index 000000000..2469cc6b7
--- /dev/null
+++ b/documentation/02 _ Shortcuts.md	
@@ -0,0 +1,13 @@
+# Shortcuts
+
+<br />
+
+Below is a list of available keyboard shortcuts for commonly used operations and
+forms.
+
+<br />
+
+| Shortcut | Combination |
+| -------- | ----------- |
+| Ctrl + I | Open Documentation Viewer                               |
+| Ctrl + F | Open folder (Change data directory to another location) |
diff --git a/documentation/05 _ Read from Memory Card.help.md b/documentation/05 _ Read from Memory Card.help.md
new file mode 100644
index 000000000..458af3d64
--- /dev/null
+++ b/documentation/05 _ Read from Memory Card.help.md	
@@ -0,0 +1,37 @@
+## To read data from external memory card:
+There are different kinds of memory cards that can be used in SOH 
+View,  eg.  SD card,  CF card or flash drive.
+
+To read data from a memory card,  check the checkbox "From Memory Card".
+
+Directory List box will display "Memory Card" and the data in the selected card can be
+read without selecting "Memory Card" in the Directory List box. 
+
+<br />
+<br />
+<img alt="From Memory Card checkbox" src="images/memory_card/from_memory_card_checkbox.png" height="80" />
+<br />
+
+Note: This will work the same way as selecting the first level folder of a data set.
+
+### Baler data
+Baler data has data/ folder for main data and sdata/ folder for backup
+data.  When Baler data is selected,  the radio buttons for data/ and sdata/
+are enable for user to select one of the folder to read from.
+
+<br />
+<br />
+<img alt="data/sdata radio buttons" src="images/memory_card/data_sdata_radio_buttons.png" height="80" />
+<br />
+
+### CF card
+When CF card which contents RT130 data is selected,  the serial numbers of the 
+DASs in the CF card will be listed for user to select for reading.
+
+<br />
+<br />
+<img alt="DAS in CF Card" src="images/memory_card/das_in_cf_card.png" height="100" />
+<br />
+
+Note: DASs list will be displayed in the File List box no matter the From Data
+Card checkbox is checked or not.
\ No newline at end of file
diff --git a/documentation/10 _ TPS Dialog.help.md b/documentation/10 _ TPS Dialog.help.md
new file mode 100644
index 000000000..24925be70
--- /dev/null
+++ b/documentation/10 _ TPS Dialog.help.md	
@@ -0,0 +1,93 @@
+# Plotting TPS
+Each block of TPS shows the square root of the average of the squares of 
+each 5 minute of data.  Each TPS bar consists of 288 blocks bar representing a 
+UT day. One TPS channel channel consists of multi TPS bars depends on the time 
+range the channel cover.
+
+Each 5-minute block is color-coded according to the average amplitude 
+during the period following the Color range code at the end of this document.
+<br />
+
+---------------------------
+---------------------------
+# TPS Dialog
+
+<br />
+<img alt="TPS Dialog" src="images/tps/tps_dialog.png" width="700" />
+<br />
+
+TPS are plotted in tab(s).
+
+* If total days <= 180: all channels are plotted in one tab.
+* If total days > 180: each channel will be plotted in a separate tab.
+<br />
+---------------------------
+---------------------------
+# TPS Color Range
+
+<br />
+<br />
+<img alt="Change TPS Color Range" src="images/tps/tps_color_range.png" height="100" />
+<br />
+
+## Selecting Color Range
+User can select the desired color range from the dropdown list in the above picture.  There are 4 different 
+color ranges in the list: Antarctica,  Low,  Medium and High
+<br />
+
+## Applying the selected Color Range
+* Click button "RePlot Current Tab" to apply new selected color range to TPS plots in the current tab.
+* Click button "RePlot All Tabs" to apply new selected color range to TPS plots in all tabs.
+<br />
+
+## Color range code
+**Antarctica**
+* Dark Grey/Black: there was no data for that period or the average really 
+was 0.0 (not likely)
+* Dark blue: the average was +/-10 counts
+* Cyan: +/-100 counts
+* Green: +/-1,000 counts
+* Yellow: +/-10,000 counts
+* Red: +/-100,000 counts
+* Magenta: +/-1,000,000 counts
+* Light Grey/White: > +/-1,000,000 counts
+<br />
+
+**Low**
+* Dark Grey/Black: there was no data for that period or the average 
+really was 0.0 (not likely)
+* Dark blue: the average was +/-20 counts
+* Cyan: +/-200 counts 
+* Green: +/-2,000 counts
+* Yellow: +/-20,000 counts
+* Red: +/-200,000 counts
+* Magenta: +/-2,000,000 counts
+* Light Grey/White: > +/-2,000,000 counts
+<br />
+
+**Medium**
+* Dark Grey/Black: there was no data for that period or the average really
+was 0.0 (not likely)
+* Dark blue: the average was +/-50 counts
+* Cyan: +/-500 counts
+* Green: +/-5,000 counts
+* Yellow: +/-50,000 counts
+* Red: +/-500,000 counts
+* Magenta: +/-5,000,000 counts
+* Light Grey/White: > +/-5,000,000 counts
+<br />
+
+**High**
+* Dark Grey/Black: there was no data for that period or the average really
+was 0.0 (not likely)
+* Dark blue: the average was +/-80 counts
+* Cyan: +/-800 counts
+* Green: +/-8,000 counts
+* Yellow: +/-80,000 counts 
+* Red: +/-800,000 counts
+* Magenta: +/-8,000,000 counts
+* Light Grey/White: > +/-8,000,000 counts
+
+<br />
+
+
diff --git a/sohstationviewer/controller/util.py b/sohstationviewer/controller/util.py
index 3f8eefcee..53677dc48 100644
--- a/sohstationviewer/controller/util.py
+++ b/sohstationviewer/controller/util.py
@@ -36,7 +36,7 @@ def validate_file(path2file: Union[str, Path], file_name: str):
 
 def validate_dir(path: str):
     """
-    When selecting option "From Data Card", all files and folders out of
+    When selecting option "From Memory Card", all files and folders out of
         the data folder may be processed. This check help to skip checking
         system/info/meta folders. If check fail, raise Exception.
 
-- 
GitLab