Skip to content

Commit

Permalink
Bring in master commits prior to merge
Browse files Browse the repository at this point in the history
  • Loading branch information
oceancolorcoder committed Mar 19, 2024
1 parent efb8f48 commit 133c96f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Config/sample_SEABIRD_pySAS.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"CalibrationFiles": {"HSL0385_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "HLD0385_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}, "SATMSG.tdf": {"enabled": true, "frameType": "Not Required"}, "HSE0488_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "SATTHS0045A.tdf": {"enabled": true, "frameType": "Not Required"}, "UMTWR_v0.tdf": {"enabled": true, "frameType": "Not Required"}, "HED0488_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}, "HSL0386_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "GPRMC_NMEA0183v3.01.tdf": {"enabled": true, "frameType": "Not Required"}, "HLD0386_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}}, "SensorType": "SeaBird", "fL1aUTCOffset": 0.0, "bL1aCleanSZA": 1, "fL1aCleanSZAMax": 70.0, "bL1aqcSolarTracker": 1, "bL1aqcCleanPitchRoll": 1, "fL1aqcPitchRollPitch": 5.0, "fL1aqcPitchRollRoll": 5.0, "fL1aqcRotatorHomeAngle": 0.0, "bL1aqcRotatorDelay": 1, "fL1aqcRotatorDelay": 2.0, "bL1aqcRotatorAngle": 1, "fL1aqcRotatorAngleMin": -126.0, "fL1aqcRotatorAngleMax": 42.0, "bL1aqcCleanSunAngle": 1, "fL1aqcSunAngleMin": 90.0, "fL1aqcSunAngleMax": 135.0, "bL1aqcDeglitch": 1, "fL1aqcESWindowDark": 11, "fL1aqcESWindowLight": 5, "fL1aqcESSigmaDark": 3.2, "fL1aqcESSigmaLight": 2.3, "fL1aqcLIWindowDark": 11, "fL1aqcLIWindowLight": 5, "fL1aqcLISigmaDark": 3.3, "fL1aqcLISigmaLight": 3.0, "fL1aqcLTWindowDark": 11, "fL1aqcLTWindowLight": 13, "fL1aqcLTSigmaDark": 3.2, "fL1aqcLTSigmaLight": 2.7, "bL1aqcThreshold": 0, "fL1aqcESMinDark": null, "fL1aqcESMinLight": null, "fL1aqcESMaxDark": null, "fL1aqcESMaxLight": null, "fL1aqcESMinMaxBandDark": null, "fL1aqcESMinMaxBandLight": null, "fL1aqcLIMinDark": null, "fL1aqcLIMinLight": null, "fL1aqcLIMaxDark": null, "fL1aqcLIMaxLight": null, "fL1aqcLIMinMaxBandDark": null, "fL1aqcLIMinMaxBandLight": null, "fL1aqcLTMinDark": null, "fL1aqcLTMinLight": null, "fL1aqcLTMaxDark": null, "fL1aqcLTMaxLight": null, "fL1aqcLTMinMaxBandDark": null, "fL1aqcLTMinMaxBandLight": null, "fL1aqcAnomalyStep": 20, "bL1bGetAnc": 1, "bL1bObpgCreds": 0, "fL1bDefaultWindSpeed": 5.0, "fL1bDefaultAOD": 0.2, "fL1bDefaultSalt": 38.0, "fL1bDefaultSST": 28.0, "bL1bCal": 1, "FullCalDir": "/Users/daurin/GitRepos/HyperCP/Config/sample_SEABIRD_pySAS_Calibration", "RadCalDir": "/Users/daurin/GitRepos/HyperCP/Config/sample_SEABIRD_pySAS_Calibration", "FidRadDB": false, "fL1bInterpInterval": 3.3, "bL1bPlotTimeInterp": 0, "fL1bPlotInterval": 20.0, "bL1bqcLtUVNIR": 1, "fL1bqcMaxWind": 10.0, "fL1bqcSZAMin": 20.0, "fL1bqcSZAMax": 60.0, "bL1bqcEnableSpecQualityCheck": 1, "bL1bqcEnableSpecQualityCheckPlot": 1, "fL1bqcSpecFilterEs": 5.0, "fL1bqcSpecFilterLi": 8.0, "fL1bqcSpecFilterLt": 3.0, "bL1bqcEnableQualityFlags": 0, "fL1bqcCloudFlag": 1.0, "fL1bqcSignificantEsFlag": 2.0, "fL1bqcDawnDuskFlag": 1.0, "fL1bqcRainfallHumidityFlag": 1.095, "bL2Stations": 0, "fL2TimeInterval": 300, "bL2EnablePercentLt": 1, "fL2PercentLt": 10.0, "fL2RhoSky": 0.0256, "bL23CRho": 0, "bL2ZhangRho": 0, "bL2DefaultRho": 1, "bL2PerformNIRCorrection": 1, "bL2SimpleNIRCorrection": 0, "bL2SimSpecNIRCorrection": 1, "bL2NegativeSpec": 1, "bL2BRDF": 1, "bL2BRDF_fQ": 1, "bL2BRDF_IOP": 0, "bL2WeightMODISA": 0, "bL2WeightSentinel3A": 0, "bL2WeightVIIRSN": 0, "bL2WeightMODIST": 0, "bL2WeightSentinel3B": 0, "bL2WeightVIIRSJ": 0, "bL2WeightUncertainties": 0, "bL2PlotRrs": 1, "bL2PlotnLw": 1, "bL2PlotEs": 1, "bL2PlotLi": 1, "bL2PlotLt": 1, "seaBASSHeaderFileName": "sample_SEABIRD_pySAS.hdr", "bL2SaveSeaBASS": 1, "bL2WriteReport": 1, "bL1dDeglitch": 1, "bL2EnableQualityFlags": 0, "bL1b_InterpPlotTimeInterp": 1, "bL2Prodoc3m": 0, "bL2Prodkd490": 0, "bL2Prodpic": 0, "bL2Prodpoc": 0, "bL2Prodipar": 0, "bL2Prodavw": 1, "bL2Prodqwip": 1, "bL2ProdweiQA": 0, "bL2Prodgocad": 0, "bL2Prodag": 0, "bL2ProdSg": 0, "bL2ProdDOC": 0, "bL2Prodgiop": 0, "bL2ProdaGiop": 0, "bL2ProdadgGiop": 0, "bL2ProdadgSGiop": 0, "bL2ProdaphGiop": 0, "bL2ProdaphSGiop": 0, "bL2ProdbbGiop": 0, "bL2ProdbbpGiop": 0, "bL2ProdbbpSGiop": 0, "bL2Prodqaa": 0, "bL2ProdaQaa": 0, "bL2ProdadgQaa": 0, "bL2ProdaphQaa": 0, "bL2ProdbQaa": 0, "bL2ProdbbQaa": 0, "bL2ProdbbpQaa": 0, "bL2ProdcQaa": 0}
{"CalibrationFiles": {"HSL0385_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "HLD0385_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}, "SATMSG.tdf": {"enabled": true, "frameType": "Not Required"}, "HSE0488_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "SATTHS0045A.tdf": {"enabled": true, "frameType": "Not Required"}, "UMTWR_v0.tdf": {"enabled": true, "frameType": "Not Required"}, "HED0488_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}, "HSL0386_Tartu.cal": {"enabled": true, "frameType": "ShutterLight"}, "GPRMC_NMEA0183v3.01.tdf": {"enabled": true, "frameType": "Not Required"}, "HLD0386_Tartu.cal": {"enabled": true, "frameType": "ShutterDark"}}, "SensorType": "SeaBird", "fL1aUTCOffset": 0.0, "bL1aCleanSZA": 1, "fL1aCleanSZAMax": 70.0, "bL1aqcSolarTracker": 1, "bL1aqcCleanPitchRoll": 1, "fL1aqcPitchRollPitch": 5.0, "fL1aqcPitchRollRoll": 5.0, "fL1aqcRotatorHomeAngle": 0.0, "bL1aqcRotatorDelay": 1, "fL1aqcRotatorDelay": 2.0, "bL1aqcRotatorAngle": 1, "fL1aqcRotatorAngleMin": -126.0, "fL1aqcRotatorAngleMax": 42.0, "bL1aqcCleanSunAngle": 1, "fL1aqcSunAngleMin": 90.0, "fL1aqcSunAngleMax": 135.0, "bL1aqcDeglitch": 1, "fL1aqcESWindowDark": 11, "fL1aqcESWindowLight": 5, "fL1aqcESSigmaDark": 3.2, "fL1aqcESSigmaLight": 2.3, "fL1aqcLIWindowDark": 11, "fL1aqcLIWindowLight": 5, "fL1aqcLISigmaDark": 3.3, "fL1aqcLISigmaLight": 3.0, "fL1aqcLTWindowDark": 11, "fL1aqcLTWindowLight": 13, "fL1aqcLTSigmaDark": 3.2, "fL1aqcLTSigmaLight": 2.7, "bL1aqcThreshold": 0, "fL1aqcESMinDark": null, "fL1aqcESMinLight": null, "fL1aqcESMaxDark": null, "fL1aqcESMaxLight": null, "fL1aqcESMinMaxBandDark": null, "fL1aqcESMinMaxBandLight": null, "fL1aqcLIMinDark": null, "fL1aqcLIMinLight": null, "fL1aqcLIMaxDark": null, "fL1aqcLIMaxLight": null, "fL1aqcLIMinMaxBandDark": null, "fL1aqcLIMinMaxBandLight": null, "fL1aqcLTMinDark": null, "fL1aqcLTMinLight": null, "fL1aqcLTMaxDark": null, "fL1aqcLTMaxLight": null, "fL1aqcLTMinMaxBandDark": null, "fL1aqcLTMinMaxBandLight": null, "fL1aqcAnomalyStep": 20, "bL1bGetAnc": 1, "bL1bObpgCreds": 0, "fL1bDefaultWindSpeed": 5.0, "fL1bDefaultAOD": 0.2, "fL1bDefaultSalt": 38.0, "fL1bDefaultSST": 28.0, "bL1bCal": 1, "FullCalDir": "/Users/daurin/GitRepos/HyperCP/Config/sample_SEABIRD_pySAS_Calibration", "RadCalDir": "/Users/daurin/GitRepos/HyperCP/Config/sample_SEABIRD_pySAS_Calibration", "FidRadDB": false, "fL1bInterpInterval": 3.3, "bL1bPlotTimeInterp": 0, "fL1bPlotInterval": 20.0, "bL1bqcLtUVNIR": 1, "fL1bqcMaxWind": 10.0, "fL1bqcSZAMin": 20.0, "fL1bqcSZAMax": 60.0, "bL1bqcEnableSpecQualityCheck": 1, "bL1bqcEnableSpecQualityCheckPlot": 1, "fL1bqcSpecFilterEs": 5.0, "fL1bqcSpecFilterLi": 8.0, "fL1bqcSpecFilterLt": 3.0, "bL1bqcEnableQualityFlags": 0, "fL1bqcCloudFlag": 1.0, "fL1bqcSignificantEsFlag": 2.0, "fL1bqcDawnDuskFlag": 1.0, "fL1bqcRainfallHumidityFlag": 1.095, "bL2Stations": 0, "fL2TimeInterval": 300, "bL2EnablePercentLt": 1, "fL2PercentLt": 10.0, "fL2RhoSky": 0.0256, "bL23CRho": 0, "bL2ZhangRho": 0, "bL2DefaultRho": 1, "bL2PerformNIRCorrection": 1, "bL2SimpleNIRCorrection": 0, "bL2SimSpecNIRCorrection": 1, "bL2NegativeSpec": 1, "bL2BRDF": 1, "bL2BRDF_fQ": 1, "bL2BRDF_IOP": 0, "bL2WeightMODISA": 0, "bL2WeightSentinel3A": 0, "bL2WeightVIIRSN": 0, "bL2WeightMODIST": 0, "bL2WeightSentinel3B": 0, "bL2WeightVIIRSJ": 0, "bL2WeightUncertainties": 0, "bL2PlotRrs": 1, "bL2PlotnLw": 1, "bL2PlotEs": 1, "bL2PlotLi": 1, "bL2PlotLt": 1, "seaBASSHeaderFileName": "sample_SEABIRD_pySAS.hdr", "bL2SaveSeaBASS": 1, "bL2WriteReport": 1, "bL1dDeglitch": 1, "bL2EnableQualityFlags": 0, "bL2Prodoc3m": 0, "bL2Prodkd490": 0, "bL2Prodpic": 0, "bL2Prodpoc": 0, "bL2Prodipar": 0, "bL2Prodavw": 1, "bL2Prodqwip": 1, "bL2ProdweiQA": 0, "bL2Prodgocad": 0, "bL2Prodag": 0, "bL2ProdSg": 0, "bL2ProdDOC": 0, "bL2Prodgiop": 0, "bL2ProdaGiop": 0, "bL2ProdadgGiop": 0, "bL2ProdadgSGiop": 0, "bL2ProdaphGiop": 0, "bL2ProdaphSGiop": 0, "bL2ProdbbGiop": 0, "bL2ProdbbpGiop": 0, "bL2ProdbbpSGiop": 0, "bL2Prodqaa": 0, "bL2ProdaQaa": 0, "bL2ProdadgQaa": 0, "bL2ProdaphQaa": 0, "bL2ProdbQaa": 0, "bL2ProdbbQaa": 0, "bL2ProdbbpQaa": 0, "bL2ProdcQaa": 0}
30 changes: 0 additions & 30 deletions Source/ProcessL1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,35 +136,6 @@ def read_unc_coefficient_frm(root, inpath, classbased_dir):
gp = root.addGroup("RAW_UNCERTAINTIES")
gp.attributes['FrameType'] = 'NONE' # add FrameType = None so grp passes a quality check later

# # <<<<<<< dev
# sensorIDs = Utilities.get_sensor_dict(root)
# # acq_time = root.attributes["TIME-STAMP"].replace('_', '')
# acq_datetime = datetime.strptime(root.attributes["TIME-STAMP"], "%a %b %d %H:%M:%S %Y")
# acq_time = acq_datetime.strftime('%Y%m%d%H%M%S')
# cal_char_types = ['POLAR','RADCAL','STRAY','ANGULAR','THERMAL']

# cal_char_candidates = glob.glob(os.path.join(inpath, '*.TXT'))
# cal_class_candidates = glob.glob(os.path.join(classbased_dir, '*.txt'))

# for sensorID in sensorIDs:
# for cal_char_type in cal_char_types:
# # temporarily use class-based polar unc for FRM
# if 'POLAR' in cal_char_type:
# # don't read ES Pol which is the manufacturer cosine error
# if 'ES' not in sensorIDs[sensorID]:
# cal_char_candidates_subset = [f for f in cal_class_candidates if '%s_class_%s' % (sensorIDs[sensorID],cal_char_type) in os.path.basename(f)]
# else:
# cal_char_candidates_subset = None
# else:
# cal_char_candidates_subset = [f for f in cal_char_candidates if '%s_%s' % (sensorID,cal_char_type) in os.path.basename(f)]

# if cal_char_candidates_subset is not None:
# matchingFile = FidradDB_choose_cal_char_file('%s_%s' % (sensorID,cal_char_type), acq_time, cal_char_candidates_subset)
# else:
# matchingFile = None
# if matchingFile is not None:
# Utilities.read_char(matchingFile, gp)
# # =======
# Read uncertainty parameters from full calibration from TARTU
# for f in glob.glob(os.path.join(inpath, r'*POLAR*')):
# Utilities.read_char(f, gp)
Expand All @@ -182,7 +153,6 @@ def read_unc_coefficient_frm(root, inpath, classbased_dir):
Utilities.read_char(f, gp)
for f in glob.glob(os.path.join(inpath, r'*THERMAL*')):
Utilities.read_char(f, gp)
# >>>>>>> dev

if len(gp.datasets) < 23:
print(f'Too few characterization files found: {len(gp.datasets)} of 23')
Expand Down
2 changes: 1 addition & 1 deletion Source/SeaBASSHeaderWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def initUI(self):
self.data_statusLineEdit = QtWidgets.QLineEdit(self)
self.data_statusLineEdit.setText(str(SeaBASSHeader.settings["data_status"]))

water_depthLabel = QtWidgets.QLabel("water_depth (use -999 for missing)", self)
water_depthLabel = QtWidgets.QLabel("water_depth (use -9999 for missing)", self)
water_depthLabel_font = water_depthLabel.font()
water_depthLabel_font.setBold(True)
water_depthLabel.setFont(water_depthLabel_font)
Expand Down
13 changes: 0 additions & 13 deletions Source/SeaBASSWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,6 @@ def writeSeaBASS(dtype,fp,headerBlock,formattedData,fields,units):
print('Creating a SeaBASS directory')
os.makedirs(os.path.split(fp)[0] + '/SeaBASS')

# # outFileName = f'{os.path.split(fp)[0]}/SeaBASS/{os.path.split(fp)[1].replace(".hdf",f"_{dtype}_{version}.sb")}'
# # Conforms to SeaBASS file names: Experiment_Cruise_Platform_Instrument_YYMMDD_HHmmSS_Level_DataType_Revision
# if ConfigFile.settings['bL2Stations']:
# station = str(headerBlock['station']).replace('.','_')
# outFileName = \
# ( f"{os.path.split(fp)[0]}/SeaBASS/{headerBlock['experiment']}_{headerBlock['cruise']}_"
# f"{headerBlock['platform']}_{headerBlock['instrument_model']}_{formattedData[0].split(',')[0]}_"
# f"{formattedData[0].split(',')[1].replace(':','')}_L2_{dtype}_STATION_{station}_{version}.sb")
# else:
# outFileName = \
# ( f"{os.path.split(fp)[0]}/SeaBASS/{headerBlock['experiment']}_{headerBlock['cruise']}_"
# f"{headerBlock['platform']}_{headerBlock['instrument_model']}_{formattedData[0].split(',')[0]}_"
# f"{formattedData[0].split(',')[1].replace(':','')}_L2_{dtype}_{version}.sb")
outFileName = SeaBASSWriter.sbFileName(fp,headerBlock,formattedData,dtype)

outFile = open(outFileName,'w',newline='\n')
Expand Down

0 comments on commit 133c96f

Please sign in to comment.