Skip to content

Commit 695d29a

Browse files
Merge dev to master
2 parents 50c4510 + e957fde commit 695d29a

File tree

8 files changed

+76
-90
lines changed

8 files changed

+76
-90
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# HyperCP
1616
# .gitignore
1717
/Bundled/
18-
# Data/FidRadDB/
18+
Data/FidRadDB/
1919
Data/Zhang_rho_db.mat
2020
Data/Zhang_rho_db_expanded.mat
2121
Data/Zhang_rho_LUT.nc

Config/sample_SEABIRD_pySAS.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@
186186
"bL2SaveSeaBASS": 1,
187187
"bL2WriteReport": 1,
188188
"bL2EnableQualityFlags": 1,
189+
<<<<<<< HEAD
190+
=======
191+
"FidRadDB": 1,
192+
"bL2filterMetFlags": 0,
193+
"sL1aqcphotoFormat": "%Y%m%d_%H%M%S.jpg+0300",
194+
>>>>>>> dev
189195
"bL2PlotProd": 0,
190196
"bL2Prodoc3m": 1,
191197
"bL2Prodkd490": 0,

Config/sample_TRIOS_NOTRACKER.cfg

Lines changed: 38 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,28 @@
11
{
2-
"inDir": "/Users/daurin/GitRepos/HyperCP/Data/Sample_Data/Manual_TriOS",
3-
"outDir": "/Users/daurin/GitRepos/HyperCP/Data/Sample_Data/Manual_TriOS",
2+
"inDir": "./Data",
3+
"outDir": "./Data",
44
"ancFileDir": "./Data/Sample_Data",
5-
"ancFile": "/Users/daurin/GitRepos/HyperCP/Data/Sample_Data/Manual_TriOS/FICE22_TriOS_Ancillary.sb",
6-
"CalibrationFiles": {
7-
"SAM_8329.ini": {
8-
"enabled": true,
9-
"frameType": "ES",
10-
"serialNumber": "SAM_8329"
11-
},
12-
"SAM_8166.ini": {
13-
"enabled": true,
14-
"frameType": "LI",
15-
"serialNumber": "SAM_8166"
16-
},
17-
"SAM_8595.ini": {
18-
"enabled": true,
19-
"frameType": "LT",
20-
"serialNumber": "SAM_8595"
21-
}
22-
},
23-
"SensorType": "TriOS",
5+
"ancFile": "",
6+
"CalibrationFiles": {},
7+
"SensorType": "SeaBird",
248
"fL1aUTCOffset": 0.0,
259
"bL1aCleanSZA": 1,
2610
"fL1aCleanSZAMax": 70.0,
2711
"bL1aCOD": 0,
28-
"bL1aqcSunTracker": 0,
29-
"bL1aqcCleanPitchRoll": 0,
12+
"bL1aqcSunTracker": 1,
13+
"bL1aqcCleanPitchRoll": 1,
3014
"fL1aqcPitchRollPitch": 5.0,
3115
"fL1aqcPitchRollRoll": 5.0,
3216
"fL1aqcRotatorHomeAngle": 0.0,
33-
"bL1aqcRotatorDelay": 0,
17+
"bL1aqcRotatorDelay": 1,
3418
"fL1aqcRotatorDelay": 2.0,
3519
"bL1aqcRotatorAngle": 0,
3620
"fL1aqcRotatorAngleMin": -40.0,
3721
"fL1aqcRotatorAngleMax": 40.0,
3822
"bL1aqcCleanSunAngle": 1,
3923
"fL1aqcSunAngleMin": 90.0,
4024
"fL1aqcSunAngleMax": 135.0,
41-
"bL1aqcDeglitch": 0,
25+
"bL1aqcDeglitch": 1,
4226
"fL1aqcESWindowDark": 11,
4327
"fL1aqcESWindowLight": 5,
4428
"fL1aqcESSigmaDark": 3.2,
@@ -71,34 +55,15 @@
7155
"fL1aqcLTMinMaxBandDark": null,
7256
"fL1aqcLTMinMaxBandLight": null,
7357
"fL1aqcAnomalyStep": 20,
74-
"bL1bGetAnc": 1,
58+
"bL1bGetAnc": 0,
7559
"fL1bDefaultWindSpeed": 5.0,
7660
"fL1bDefaultAOD": 0.2,
7761
"fL1bDefaultAirT": 26.0,
78-
"fL1bDefaultSalt": 38.0,
79-
"fL1bDefaultSST": 28.0,
80-
"fL1bCal": 3,
81-
"fL1bThermal": 2,
82-
"neededCalCharsFRM": {
83-
"ES": [
84-
"SAM_8329_RADCAL",
85-
"SAM_8329_STRAY",
86-
"SAM_8329_THERMAL",
87-
"SAM_8329_ANGULAR"
88-
],
89-
"LI": [
90-
"SAM_8166_RADCAL",
91-
"SAM_8166_STRAY",
92-
"SAM_8166_THERMAL",
93-
"SAM_8166_POLAR"
94-
],
95-
"LT": [
96-
"SAM_8595_RADCAL",
97-
"SAM_8595_STRAY",
98-
"SAM_8595_THERMAL",
99-
"SAM_8595_POLAR"
100-
]
101-
},
62+
"fL1bDefaultSalt": 35.0,
63+
"fL1bDefaultSST": 26.0,
64+
"fL1bCal": 1,
65+
"fL1bThermal": 1,
66+
"neededCalCharsFRM": {},
10267
"MultiCal": 0,
10368
"preCal_ES": null,
10469
"preCal_LT": null,
@@ -117,61 +82,60 @@
11782
"fL1bqcSZAMin": 20.0,
11883
"fL1bqcSZAMax": 60.0,
11984
"bL1bqcEnableSpecQualityCheck": 1,
120-
"bL1bqcEnableSpecQualityCheckPlot": 0,
85+
"bL1bqcEnableSpecQualityCheckPlot": 1,
12186
"fL1bqcSpecFilterEs": 5.0,
12287
"fL1bqcSpecFilterLi": 8.0,
12388
"fL1bqcSpecFilterLt": 3.0,
124-
"bL1bqcEnableQualityFlags": 1,
125-
"fL1bqcCloudFlag": 1.0,
89+
"bL1bqcEnableQualityFlags": 0,
90+
"fL1bqcCloudFlag": 0.05,
12691
"fL1bqcSignificantEsFlag": 2.0,
12792
"fL1bqcDawnDuskFlag": 1.0,
12893
"fL1bqcRainfallHumidityFlag": 1.095,
12994
"fL2SVA": 40,
13095
"bL2Stations": 0,
13196
"fL2TimeInterval": 300,
132-
"bL2EnablePercentLt": 0,
97+
"bL2EnablePercentLt": 1,
13398
"fL2PercentLt": 10.0,
13499
"fL2RhoSky": 0.0256,
135100
"bL23CRho": 0,
136101
"bL2ZhangRho": 0,
137102
"bL2DefaultRho": 1,
138103
"bL2PerformNIRCorrection": 1,
139-
"bL2SimpleNIRCorrection": 1,
140-
"bL2SimSpecNIRCorrection": 0,
104+
"bL2SimpleNIRCorrection": 0,
105+
"bL2SimSpecNIRCorrection": 1,
141106
"bL2NegativeSpec": 1,
142-
"bL2BRDF": 1,
107+
"bL2BRDF": 0,
143108
"bL2BRDF_fQ": 0,
144109
"bL2BRDF_IOP": 0,
145-
"bL2WeightMODISA": 1,
110+
"bL2WeightMODISA": 0,
146111
"bL2WeightSentinel3A": 0,
147112
"bL2WeightVIIRSN": 0,
148113
"bL2WeightMODIST": 0,
149114
"bL2WeightSentinel3B": 0,
150115
"bL2WeightVIIRSJ": 0,
151116
"bL2PlotRrs": 1,
152-
"bL2PlotnLw": 0,
117+
"bL2PlotnLw": 1,
153118
"bL2PlotEs": 1,
154119
"bL2PlotLi": 1,
155120
"bL2PlotLt": 1,
156121
"bL2UncertaintyBreakdownPlot": 0,
157122
"seaBASSHeaderFileName": "sample_TRIOS_NOTRACKER.hdr",
158-
"bL2SaveSeaBASS": 0,
159-
"bL2WriteReport": 0,
160-
"bL2EnableQualityFlags": 1,
161-
"FidRadDB": 1,
123+
"bL2SaveSeaBASS": 1,
124+
"bL2WriteReport": 1,
125+
"bL2EnableQualityFlags": 0,
162126
"bL2PlotProd": 0,
163-
"bL2Prodoc3m": 1,
127+
"bL2Prodoc3m": 0,
164128
"bL2Prodkd490": 0,
165129
"bL2Prodpic": 0,
166130
"bL2Prodpoc": 0,
167131
"bL2Prodipar": 0,
168-
"bL2Prodavw": 1,
169-
"bL2Prodqwip": 1,
132+
"bL2Prodavw": 0,
133+
"bL2Prodqwip": 0,
170134
"bL2ProdweiQA": 0,
171-
"bL2Prodgocad": 1,
172-
"bL2Prodag": 1,
173-
"bL2ProdSg": 1,
174-
"bL2ProdDOC": 1,
135+
"bL2Prodgocad": 0,
136+
"bL2Prodag": 0,
137+
"bL2ProdSg": 0,
138+
"bL2ProdDOC": 0,
175139
"bL2Prodgiop": 0,
176140
"bL2ProdaGiop": 0,
177141
"bL2ProdadgGiop": 0,
@@ -181,12 +145,12 @@
181145
"bL2ProdbbGiop": 0,
182146
"bL2ProdbbpGiop": 0,
183147
"bL2ProdbbpSGiop": 0,
184-
"bL2Prodqaa": 1,
185-
"bL2ProdaQaa": 1,
186-
"bL2ProdadgQaa": 1,
148+
"bL2Prodqaa": 0,
149+
"bL2ProdaQaa": 0,
150+
"bL2ProdadgQaa": 0,
187151
"bL2ProdaphQaa": 0,
188152
"bL2ProdbQaa": 0,
189153
"bL2ProdbbQaa": 0,
190-
"bL2ProdbbpQaa": 1,
154+
"bL2ProdbbpQaa": 0,
191155
"bL2ProdcQaa": 0
192156
}

Data/Sample_Data/Manual_TriOS/FICE22_TriOS_Ancillary.sb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
/experiment=FRM4SOC2
66
/cruise=FICE22
7-
/station=AAOT
7+
/platform=AAOT
88
/data_file_name=FICE_TriOS_Ancillary_TrueRelAz_V2.sb
99
/documents=FICE_TriOS_Ancillary_TrueRelAz_V2.sb
1010
/calibration_files=notapplicable.txt

Source/ConfigWindow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,10 @@ def l2BRDFCheckBoxUpdate(self):
16461646
ConfigFile.settings["bL2BRDF_IOP"] = 0
16471647
self.l2BRDF_fQCheckBox.setChecked(False)
16481648
self.l2BRDF_IOPCheckBox.setChecked(False)
1649+
elif ConfigFile.settings["bL2BRDF_fQ"] == 0 and ConfigFile.settings["bL2BRDF_IOP"] == 0:
1650+
ConfigFile.settings["bL2BRDF_IOP"] = 1
1651+
self.l2BRDF_IOPCheckBox.setChecked(True)
1652+
16491653

16501654
# Make BRDF type exclusive so that it is clear what is written to SeaBASS output
16511655
# Reprocess to change to another BRDF type

Source/SeaBASSHeaderWindow.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,21 @@ def configUpdateButtonPressed(self, caller):
492492
omitList = ['data_file_name','calibration_files','data_status','station','documents','start_date','end_date',\
493493
'north_latitude','south_latitude','east_longitude','west_longitude','start_time','end_time',\
494494
'measurement_depth','water_depth','fields','units']
495-
if key in SeaBASSHeader.settings and SeaBASSHeader.settings[key] == '' and key not in omitList:
495+
if key in SeaBASSHeader.settings and \
496+
(SeaBASSHeader.settings[key] == '' or SeaBASSHeader.settings[key] == 'temp') \
497+
and key not in omitList:
496498
SeaBASSHeader.settings[key] = value
497499

498-
# if ConfigFile.settings["bL1aCleanSZA"]:
499-
# szaFilt = "On"
500-
# else:
501-
# szaFilt = "Off"
500+
SeaBASSHeader.settings['instrument_manufacturer'] = ConfigFile.settings['SensorType']
501+
if ConfigFile.settings['SensorType'].lower() == 'trios':
502+
SeaBASSHeader.settings['instrument_model'] = 'RAMSES'
503+
if ConfigFile.settings['SensorType'].lower() == 'seabird':
504+
SeaBASSHeader.settings['instrument_model'] = 'HyperOCR'
505+
if ConfigFile.settings['SensorType'].lower() == 'dalec':
506+
SeaBASSHeader.settings['instrument_model'] = 'DALEC'
507+
508+
# NOTE: Need to capture the calibration date for the SeaBASS file header
509+
502510
if ConfigFile.settings["bL1aqcCleanPitchRoll"]:
503511
pitchRollFilt = "On"
504512
else:

Source/SeaBASSWriter.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ def formatHeader(fp,node, level):
9797
station = node.getGroup('ANCILLARY').getDataset('STATION').data[0][2]
9898
headerBlock['station'] = station
9999
else:
100-
if ConfigFile.settings['SensorType'].lower() =='trios':
101-
headerBlock['station'] = headerRawNames
102-
else:
103-
headerBlock['station'] = node.attributes['RAW_FILE_NAME'].split('.')[0]
100+
# if ConfigFile.settings['SensorType'].lower() =='trios':
101+
# headerBlock['station'] = headerRawNames
102+
headerBlock['station'] = node.attributes['L1BQC_FILE_NAME'].split('.')[0]
103+
# else:
104+
# headerBlock['station'] = node.attributes['RAW_FILE_NAME'].split('.')[0]
104105
if headerBlock['start_time'] == '':
105106
headerBlock['start_time'] = startTime
106107
if headerBlock['end_time'] == '':
@@ -240,12 +241,13 @@ def writeSeaBASS(dtype,fp,headerBlock,formattedData,fields,units):
240241
outFile = open(outFileName,'w',newline='\n')
241242
outFile.write('/begin_header\n')
242243
for key,value in headerBlock.items():
243-
if key != 'comments' and key != 'other_comments' and key != 'version' and key != 'platform':
244+
if key != 'comments' and key != 'other_comments' and key != 'version':# and key != 'platform':
244245
line = f'/{key}={value}\n'
245246
outFile.write(line)
246-
if key == 'platform':
247-
line = f'!/{key}={value}\n'
248-
outFile.write(line)
247+
# if key == 'platform':
248+
# # NOTE: While header is pending at SeaBASS
249+
# line = f'!/{key}={value}\n'
250+
# outFile.write(line)
249251
outFile.write(headerBlock['comments']+'\n')
250252
outFile.write(headerBlock['other_comments']+'\n')
251253
outFile.write('/fields='+fields+'\n')
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
"""
2+
Split long DALEC files (e.g., dailies) into hourly raw files for HyperCP
3+
24
Args Needed To Run:
35
-f, --file (str) : The path to the text file that you want to split into hourly files
46
-o, --output (str): The path to the directory that you want the hourly files to be placed in.
57
68
Example Run Command:
7-
python raw_Data_Hourly_Cutter.py -f path/to/file.TXT -o dir/to/place/files
9+
python prepDALEC.py -f path/to/file.TXT -o dir/to/place/files
810
911
*** NOTE : The output directory path should NOT end with a '/' ***
1012
*** NOTE : Currently only works with DALEC Raw data file! ***

0 commit comments

Comments
 (0)