Skip to content
Snippets Groups Projects

File information box

Merged Kien Le requested to merge feature-#20-file_information_box into master
All threads resolved!
1 file
+ 22
0
Compare changes
  • Side-by-side
  • Inline
@@ -227,7 +227,13 @@ def extract_data_set_info(tracking_box: QTextBrowser,
- Tag number
- GPS information
- Software version
:param tracking_box: widget to display tracking info on
:param data_obj: the data object to extract file information from
:param date_format: the format by which to format file's start/end times
:return: a dictionary containing the information of a file
"""
data_set_info = {}
sources_read = data_obj.dir
data_set_info['Sources Read'] = sources_read.name
@@ -269,6 +275,11 @@ def extract_data_set_info(tracking_box: QTextBrowser,
def extract_start_end_time(data_obj: DataTypeModel):
"""
Extract start and end time of a data set.
:param data_obj: the data object to extract start/end time from
:return: the start and end time obtained from data_obj
"""
start_time = float('inf')
end_time = float('-inf')
@@ -289,6 +300,12 @@ def extract_start_end_time(data_obj: DataTypeModel):
def extract_start_end_time_soh(data_obj: DataTypeModel):
"""
Extract start and end time of a data set from its SOH data. Count mass
position data as SOH data.
:param data_obj: the data object that contains the data of the data set
:return: the SOH data start and end time
"""
start_time = float('inf')
end_time = float('-inf')
@@ -312,6 +329,11 @@ def extract_start_end_time_soh(data_obj: DataTypeModel):
def extract_start_end_time_waveform(data_obj: DataTypeModel):
"""
Extract start and end time of a data set from its waveform data.
:param data_obj: the data object that contains the data of the data set
:return: the waveform data start and end time
"""
start_time = float('inf')
end_time = float('-inf')
Loading