Skip to content

Commit e5f9924

Browse files
authored
Merge pull request #10 from holukas/adding-new-datablocks
Adding new datablocks
2 parents 3148054 + 3317da9 commit e5f9924

File tree

15 files changed

+190
-50
lines changed

15 files changed

+190
-50
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# BICO Changelog
22

3+
## v1.6.5 | 8 Apr 2024
4+
5+
- Added: new datablock `QCL-B`, used at site CH-CHA in 2012
6+
- Added: new datablock `QCL-D`, used at site CH-CHA in 2009
7+
38
## v1.6.4 | 7 Apr 2024
49

510
- Updated env: `PyQt5` needed specific declaration to work in `poetry` env

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "bico"
3-
version = "1.6.4"
3+
version = "1.6.5"
44
description = "Binary Converter for converting ETH eddy covariance binary raw data to ASCII CSV files"
55
authors = ["Lukas Hörtnagl <31772692+holukas@users.noreply.github.com>"]
66
readme = "README.md"
@@ -12,6 +12,7 @@ numpy = "=1.21.2"
1212
pytz = "=2021.3"
1313
matplotlib = "=3.5.0"
1414
# PyQt5 has to be installed like this to work in this poetry env:
15+
# https://github.com/python-poetry/poetry/issues/8540#issuecomment-1968457610
1516
pyqt5 = "=5.15.10"
1617
pyqt5-qt5 = "=5.15.2"
1718

src/gui/gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ def add_section_instruments(self):
188188

189189
sonic_anemometers = ['HS50-A', 'HS50-B', 'HS100-A', 'R2-A', 'R350-A', 'R350-B', '-None-']
190190
gas_analyzers = ['IRGA72-A', 'IRGA72-A-GN1', 'IRGA72-B', 'IRGA72-B-GN1', 'IRGA75-A', 'IRGA75-A-GN1',
191-
'LGR-A', 'QCL-A', 'QCL-A2', 'QCL-A3', 'QCL-A4',
192-
'QCL-C', 'QCL-C2', 'QCL-C3', 'QCL-ISO', 'QCL-L', 'QCL-L2', '-None-']
191+
'LGR-A', 'QCL-A', 'QCL-A2', 'QCL-A3', 'QCL-A4', 'QCL-B',
192+
'QCL-C', 'QCL-C2', 'QCL-C3', 'QCL-D', 'QCL-ISO', 'QCL-L', 'QCL-L2', '-None-']
193193

194194
header_instr_data_blocks = qtw.QLabel('Data Blocks')
195195
header_instr_data_blocks.setProperty('labelClass', 'header_2')

src/settings/BICO.settings

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
run_id=BICO-20240407-012431
1+
run_id=BICO-20240408-163201
22

33
# INSTRUMENTS
44
# ===========
55

66
# Site
7-
site=CH-TAN
7+
site=CH-CHA
88

99
# Data Blocks
1010
header=WECOM3
1111
instrument_1=R350-A
1212
instrument_2=IRGA75-A
13-
instrument_3=-None-
13+
instrument_3=QCL-D
1414

1515
# RAW DATA
1616
# ========
1717

1818
# Source Folder
19-
dir_source=L:/Sync/luhk_work/TMP
19+
dir_source=F:/CURRENT/CHA/FP2024.1/2009_2/0-BINARIES
2020

2121
# Time Range
2222
start_date=2005-01-01 00:00
23-
end_date=2024-12-31 23:59
23+
end_date=2012-12-31 23:59
2424

2525
# File Settings
2626
filename_datetime_format=yyyymmddHH.bMM
2727
file_ext=*.b*
2828
file_size_min=900
2929
file_limit=0
30-
row_limit=777
30+
row_limit=99
3131

3232
# Special
33-
select_random_files=0
33+
select_random_files=20
3434

3535
# OUTPUT
3636
# ======
37-
dir_out=L:/Sync/luhk_work/TMP
38-
dir_out_run=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431
39-
dir_out_run_log=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431\log
40-
dir_out_run_plots=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431\plots
41-
dir_out_run_plots_hires=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431\plots\hires
42-
dir_out_run_plots_agg=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431\plots\agg
43-
dir_out_run_raw_data_ascii=L:\Sync\luhk_work\TMP\test_BICO-20240407-012431\raw_data_ascii
37+
dir_out=F:/TMP
38+
dir_out_run=F:\TMP\test3_BICO-20240408-163201
39+
dir_out_run_log=F:\TMP\test3_BICO-20240408-163201\log
40+
dir_out_run_plots=F:\TMP\test3_BICO-20240408-163201\plots
41+
dir_out_run_plots_hires=F:\TMP\test3_BICO-20240408-163201\plots\hires
42+
dir_out_run_plots_agg=F:\TMP\test3_BICO-20240408-163201\plots\agg
43+
dir_out_run_raw_data_ascii=F:\TMP\test3_BICO-20240408-163201\raw_data_ascii
4444

45-
output_folder_name_prefix=test
45+
output_folder_name_prefix=test3
4646
file_compression=gzip
4747

4848
add_instr_to_varname=1
@@ -54,10 +54,10 @@ plot_ts_agg=1
5454

5555
# DIRECTORIES
5656
# ===================
57-
dir_bico=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico
58-
dir_script=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src
59-
dir_settings=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src\settings
60-
dir_root=L:\Sync\luhk_work\20 - CODING\23 - FLUX
57+
dir_bico=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico
58+
dir_script=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src
59+
dir_settings=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src\settings
60+
dir_root=F:\Sync\luhk_work\20 - CODING\23 - FLUX
6161
dir_server_CH-AES=
6262
dir_server_CH-AWS=\\green.ethz.ch\share-green-gl-archive-1-$\FluxData\CH-AWS_CrapAlv\20_sonic_ghg
6363
dir_server_CH-CHA=\\green.ethz.ch\share-green-gl-archive-1-$\FluxData\CH-CHA_Chamau\20_sonic_ghg

src/settings/BICO.settingsOld

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
run_id=BICO-20240321-151120
1+
run_id=BICO-20240408-162747
22

33
# INSTRUMENTS
44
# ===========
55

66
# Site
7-
site=CH-TAN
7+
site=CH-CHA
88

99
# Data Blocks
1010
header=WECOM3
1111
instrument_1=R350-A
1212
instrument_2=IRGA75-A
13-
instrument_3=-None-
13+
instrument_3=QCL-D
1414

1515
# RAW DATA
1616
# ========
1717

1818
# Source Folder
19-
dir_source=Y:/CH-TAN_Taenikon/20_sonic_ghg/2024/03/10_HS_LI72
19+
dir_source=F:/CURRENT/CHA/FP2024.1/2009_2/0-BINARIES
2020

2121
# Time Range
22-
start_date=2023-01-01 00:00
23-
end_date=2024-12-31 23:59
22+
start_date=2005-01-01 00:00
23+
end_date=2012-12-31 23:59
2424

2525
# File Settings
26-
filename_datetime_format=yyyymmddHH.tMM
27-
file_ext=*.t*
26+
filename_datetime_format=yyyymmddHH.bMM
27+
file_ext=*.b*
2828
file_size_min=900
2929
file_limit=0
3030
row_limit=777
3131

3232
# Special
33-
select_random_files=0
33+
select_random_files=10
3434

3535
# OUTPUT
3636
# ======
37-
dir_out=F:/TMP/tan
38-
dir_out_run=F:\TMP\tan\test_BICO-20240321-151120
39-
dir_out_run_log=F:\TMP\tan\test_BICO-20240321-151120\log
40-
dir_out_run_plots=F:\TMP\tan\test_BICO-20240321-151120\plots
41-
dir_out_run_plots_hires=F:\TMP\tan\test_BICO-20240321-151120\plots\hires
42-
dir_out_run_plots_agg=F:\TMP\tan\test_BICO-20240321-151120\plots\agg
43-
dir_out_run_raw_data_ascii=F:\TMP\tan\test_BICO-20240321-151120\raw_data_ascii
37+
dir_out=F:/TMP
38+
dir_out_run=F:\TMP\test2_BICO-20240408-162747
39+
dir_out_run_log=F:\TMP\test2_BICO-20240408-162747\log
40+
dir_out_run_plots=F:\TMP\test2_BICO-20240408-162747\plots
41+
dir_out_run_plots_hires=F:\TMP\test2_BICO-20240408-162747\plots\hires
42+
dir_out_run_plots_agg=F:\TMP\test2_BICO-20240408-162747\plots\agg
43+
dir_out_run_raw_data_ascii=F:\TMP\test2_BICO-20240408-162747\raw_data_ascii
4444

45-
output_folder_name_prefix=test
45+
output_folder_name_prefix=test2
4646
file_compression=gzip
4747

4848
add_instr_to_varname=1
@@ -54,10 +54,10 @@ plot_ts_agg=1
5454

5555
# DIRECTORIES
5656
# ===================
57-
dir_bico=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico
58-
dir_script=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src
59-
dir_settings=L:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src\settings
60-
dir_root=L:\Sync\luhk_work\20 - CODING\23 - FLUX
57+
dir_bico=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico
58+
dir_script=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src
59+
dir_settings=F:\Sync\luhk_work\20 - CODING\23 - FLUX\bico\src\settings
60+
dir_root=F:\Sync\luhk_work\20 - CODING\23 - FLUX
6161
dir_server_CH-AES=
6262
dir_server_CH-AWS=\\green.ethz.ch\share-green-gl-archive-1-$\FluxData\CH-AWS_CrapAlv\20_sonic_ghg
6363
dir_server_CH-CHA=\\green.ethz.ch\share-green-gl-archive-1-$\FluxData\CH-CHA_Chamau\20_sonic_ghg

src/settings/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# from single_source import get_version
22
# __version__ = get_version(__name__, Path(__file__).parent.parent.parent) # Single source of truth for version
33

4-
__version__ = "1.6.4"
5-
__date__ = "7 Apr 2024"
4+
__version__ = "1.6.5"
5+
__date__ = "8 Apr 2024"
66
__link_changelog__ = "https://github.com/holukas/bico/blob/master/CHANGELOG.md"
77
__link_source_code__ = "https://github.com/holukas/bico"
88
__link_releases__ = "https://github.com/holukas/bico/releases"

src/settings/data_blocks/QCL-A.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- FCT Source code: --> https://gitlab.ethz.ch/holukas/fct-flux-calculation-tool
3838

3939
# Details
40-
- in WE's sonicread.pdf Table 2: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
40+
- in WE's `sonicread.pdf` Table 2 or Table 3: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
4141
Columns: "CH4, N2O, H2O, TEMP, PRESS since V. 7.06 (2015-05-18)"
4242
- Note that H2O has no gain!
4343
- Modified data acquisition to also record QCL temperature and pressure.

src/settings/data_blocks/QCL-A2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
# Details
4141
- Note that there is no H2O (was unintended at the time)!
42-
- in WE's sonicread.pdf Table 2: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
42+
- in WE's `sonicread.pdf` Table 2 or Table 3: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
4343
Columns: "CH4, N2O, H2O, TEMP, PRESS since V. 7.06 (2015-05-18)", but instead
4444
of H2O the ambient CH4 was logged by mistake, due to an undocumented? change
4545
in the order of incoming data from the QCL

src/settings/data_blocks/QCL-A4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Basically the same as QCL-A, but with gain 1000 on H2O signal instead of gain 1.
4040
# Details
4141
- Was used for 2 days at CH-CHA in 2020. By accident, the gain on the H2O signal was set to 1000 instead
4242
of the correct gain 1.
43-
- This format is similar to: in WE's sonicread.pdf Table 2: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
43+
- This format is similar to: in WE's `sonicread.pdf` Table 2 or Table 3: QCL Version 1 Variant 6, QC-TILDAS ETHZ,
4444
Columns: "CH4, N2O, H2O, TEMP, PRESS since V. 7.06 (2015-05-18)"
4545
- Modified data acquisition to also record QCL temperature and pressure.
4646
- Now there are 5 QCL variables that are detected (there were 3 in previous versions).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ============================================
2+
# QCL-B - QUANTUM CASCADE LASER (AERODYNE QCL)
3+
# ============================================
4+
# Details: see QCL-B.md
5+
6+
7+
DATA_SIZE == {'order': 1, 'bytes': 1, 'format': 'B', 'gain_on_signal': 1, 'offset_on_signal': 0, 'apply_gain': 1, 'add_offset': 0, 'units': 'Bytes', 'conversion_type': 'regular', 'datablock': 'QCL-B'}
8+
STATUS_CODE == {'order': 2, 'bytes': 1, 'format': 'B', 'gain_on_signal': 1, 'offset_on_signal': 0, 'apply_gain': 1, 'add_offset': 0, 'units': 'bit_map', 'conversion_type': 'regular', 'datablock': 'QCL-B'}
9+
CH4_DRY == {'order': 3, 'bytes': 4, 'format': 'B B B B', 'gain_on_signal': 1000, 'offset_on_signal': 0, 'apply_gain': 1, 'add_offset': 0, 'units': 'nmol+1 mol-1', 'conversion_type': 'regular', 'datablock': 'QCL-B'}
10+
N2O_DRY == {'order': 4, 'bytes': 4, 'format': 'B B B B', 'gain_on_signal': 1000, 'offset_on_signal': 0, 'apply_gain': 1, 'add_offset': 0, 'units': 'nmol+1 mol-1', 'conversion_type': 'regular', 'datablock': 'QCL-B'}
11+
H2O_DRY == {'order': 5, 'bytes': 4, 'format': 'B B B B', 'gain_on_signal': 1, 'offset_on_signal': 0, 'apply_gain': 1, 'add_offset': 0, 'units': 'nmol+1 mol-1', 'conversion_type': 'regular', 'datablock': 'QCL-B'}
12+
13+
# Values extracted from STATUS_CODE:
14+
# ----------------------------------
15+
STATUS == {'order': 2.01, 'bit_pos_start': 4, 'bit_pos_end': 8, 'apply_gain': 1, 'add_offset': 0, 'units': '0=OK', 'output': 1, 'datablock': 'QCL-B'}
16+
VARIANT == {'order': 2.02, 'bit_pos_start': 0, 'bit_pos_end': 4, 'apply_gain': 1, 'add_offset': 0, 'units': '#', 'output': 0, 'datablock': 'QCL-B'}

0 commit comments

Comments
 (0)