Skip to content

Commit 3e529e2

Browse files
Fix negReflectance for satellite convolutions, and S3B convolution
1 parent c44acb0 commit 3e529e2

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

Config/sample_SEABIRD_pySAS.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@
157157
"bL2EnablePercentLt": 1,
158158
"fL2PercentLt": 10.0,
159159
"fL2RhoSky": 0.0256,
160-
"bL23CRho": 1,
161-
"bL2Z17Rho": 0,
160+
"bL23CRho": 0,
161+
"bL2Z17Rho": 1,
162162
"bL2M99Rho": 0,
163163
"bL2RhoUnc10": 0,
164164
"bL2PerformNIRCorrection": 1,
165-
"bL2SimpleNIRCorrection": 1,
166-
"bL2SimSpecNIRCorrection": 0,
165+
"bL2SimpleNIRCorrection": 0,
166+
"bL2SimSpecNIRCorrection": 1,
167167
"bL2NegativeSpec": 1,
168168
"bL2BRDF": 0,
169169
"bL2BRDF_fQ": 0,

Config/sample_SEABIRD_pySAS.hdr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"east_longitude": "",
3232
"west_longitude": "",
3333
"nadir": "40",
34-
"rho_correction": "3C",
35-
"NIR_residual_correction": "MA95",
34+
"rho_correction": "Z17",
35+
"NIR_residual_correction": "R06",
3636
"BRDF_correction": "noBRDF",
37-
"comments": "! HyperInSPACE vers = 1.2.15\n! HyperInSPACE Config = sample_SEABIRD_pySAS.cfg\n! Rotator Home Angle = 0.0\n! Rotator Delay = 2.0\n! Pitch/Roll Filter = On\n! Max Pitch/Roll = 5.0\n! Rotator Min/Max Filter = On\n! Rotator Min = -126.0\n! Rotator Max = 42.0\n! Rel Azimuth Filter = On\n! Rel Azimuth Min = 87.0\n! Rel Azimuth Max = 138.0\n! Deglitch Filter = On\n! ES Dark Window = 11\n! ES Light Window = 5\n! ES Dark Sigma = 3.2\n! ES Light Sigma = 2.5\n! LI Dark Window = 11\n! LI Light Window = 5\n! LI Dark Sigma = 3.0\n! LI Light Sigma = 2.9\n! LT Dark Window = 11\n! LT Light Window = 5\n! LT Dark Sigma = 3.5\n! LT Light Sigma = 2.9\n! FRM Pathway = FRM-Full-Characterization\n! Thermal Source = Internal_Thermistor\n! Default Salt = 38.0\n! Default SST = 28.0\n! Default AOD = 0.2\n! Default Wind = 5.0\n! Default AirTemp = 26.0\n! Wavelength Interp Int = 3.3\n! Max Wind = 10.0\n! Min SZA = 20.0\n! Max SZA = 60.0\n! Spectral Filter = On\n! Filter Sigma Es = 5.0\n! Filter Sigma Li = 8.0\n! Filter Sigma Lt = 3.0\n! Meteorological Filter = On\n! Cloud Flag = 1.0\n! Es Flag = 2.0\n! Dawn/Dusk Flag = 1.0\n! Rain/Humidity Flag = 1.095\n! Ensemble Interval = 300\n! Percent Lt Filter = On\n! Percent Light = 10.0\n! Remove Negatives = On",
37+
"comments": "! HyperInSPACE vers = 1.2.16\n! HyperInSPACE Config = sample_SEABIRD_pySAS.cfg\n! Rotator Home Angle = 0.0\n! Rotator Delay = 2.0\n! Pitch/Roll Filter = On\n! Max Pitch/Roll = 5.0\n! Rotator Min/Max Filter = On\n! Rotator Min = -126.0\n! Rotator Max = 42.0\n! Rel Azimuth Filter = On\n! Rel Azimuth Min = 87.0\n! Rel Azimuth Max = 138.0\n! Deglitch Filter = On\n! ES Dark Window = 11\n! ES Light Window = 5\n! ES Dark Sigma = 3.2\n! ES Light Sigma = 2.5\n! LI Dark Window = 11\n! LI Light Window = 5\n! LI Dark Sigma = 3.0\n! LI Light Sigma = 2.9\n! LT Dark Window = 11\n! LT Light Window = 5\n! LT Dark Sigma = 3.5\n! LT Light Sigma = 2.9\n! FRM Pathway = FRM-Full-Characterization\n! Thermal Source = Internal_Thermistor\n! Default Salt = 38.0\n! Default SST = 28.0\n! Default AOD = 0.2\n! Default Wind = 5.0\n! Default AirTemp = 26.0\n! Wavelength Interp Int = 3.3\n! Max Wind = 10.0\n! Min SZA = 20.0\n! Max SZA = 60.0\n! Spectral Filter = On\n! Filter Sigma Es = 5.0\n! Filter Sigma Li = 8.0\n! Filter Sigma Lt = 3.0\n! Meteorological Filter = On\n! Cloud Flag = 1.0\n! Es Flag = 2.0\n! Dawn/Dusk Flag = 1.0\n! Rain/Humidity Flag = 1.095\n! Ensemble Interval = 300\n! Percent Lt Filter = On\n! Percent Light = 10.0\n! Remove Negatives = On",
3838
"other_comments": "!\n! COMMENTS\n!\n! FRM4SOC-2 Field InterComparison Experiment (FICE)\n! July 11 - 21, 2022\n! Acqua Alta Oceanographic Tower (AAOT), CNR-ISMAR\n!\n! Ancillary data from: % https://www.comune.venezia.it/content/3-piattaforma-ISMAR-CNR\n! and field notes. relAz refers to target relative azimuth in pySAS.\n!\n! Home",
3939
"missing": -9999,
4040
"delimiter": "comma"

Source/ProcessL2.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def spectralReflectance(node, sensor, timeObj, xSlice, F0, F0_unc, rhoScalar, rh
451451
liUNC = {}
452452
ltUNC = {}
453453

454-
# Only Factory - Trios has no uncertainty here
454+
# Only Factory Trios has no uncertainty here
455455
if ConfigFile.settings['fL1bCal'] >= 2 or ConfigFile.settings['SensorType'].lower() == 'seabird':
456456
#or ConfigFile.settings['SensorType'].lower() == 'dalec':
457457
esUNC = xUNC[f'esUNC_{sensor}'] # should already be convolved to hyperspec
@@ -1182,7 +1182,7 @@ def ensemblesReflectance(node, sasGroup, refGroup, ancGroup, uncGroup,
11821182
convolve_to_satellite['Sentinel3A'] = lambda sliceData: Weight_RSR.processSentinel3Bands(sliceData, sensor='A')
11831183
satellite_bands['Sentinel3'] = Weight_RSR.Sentinel3Bands()
11841184
if ConfigFile.settings['bL2WeightSentinel3B']:
1185-
convolve_to_satellite['Sentinel3A'] = lambda sliceData: Weight_RSR.processSentinel3Bands(sliceData, sensor='B')
1185+
convolve_to_satellite['Sentinel3B'] = lambda sliceData: Weight_RSR.processSentinel3Bands(sliceData, sensor='B')
11861186
satellite_bands['Sentinel3'] = Weight_RSR.Sentinel3Bands()
11871187

11881188
satellite_slice = {satellite: {k: convolve_to_satellite[satellite](sliceData) for k, sliceData in data_slice.items()}
@@ -1838,6 +1838,13 @@ def stationsEnsemblesReflectance(node, root, station=None):
18381838
if sixS_available:
18391839
filtering.filterDataL2(node.getGroup("SIXS_MODEL"), badTimes)
18401840

1841+
# Now address convolutions, if any, but don't remove those spectra (again), just 0 the UV and NIR
1842+
sensorList = ['bL2WeightMODISA','bL2WeightMODIST','bL2WeightSentinel3A','bL2WeightSentinel3B',
1843+
'bL2WeightVIIRSN','bL2WeightVIIRSJ']
1844+
for satellite in sensorList:
1845+
if ConfigFile.settings[satellite]:
1846+
ProcessL2.negReflectance(newReflectanceGroup,
1847+
'Rrs_'+satellite.split('bL2Weight')[1], VIS = fRange)
18411848
return True
18421849

18431850
@staticmethod

0 commit comments

Comments
 (0)