Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = [
"cloudnet-api-client>=0.12.4",
"cloudnetpy[extras]>=1.90.4",
"cloudnetpy_qc>=1.30.6",
"doppy==0.5.10",
"doppy>=0.5.14",
"earthcare-downloader",
"influxdb-client",
"model-munger>=0.3.7",
Expand Down
22 changes: 20 additions & 2 deletions src/processing/instrument_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,18 +387,19 @@ def process_halo_doppler_lidar(self) -> None:
)
self.uuid.raw = raw_uuids_co + raw_uuids_cross

noise_mask_method = self._noise_mask_method()
stare: doppy.product.Stare | doppy.product.StareDepol
try:
stare = doppy.product.Stare.from_halo_data(
data=full_paths_co,
data_bg=full_paths_bg,
bg_correction_method=doppy.options.BgCorrectionMethod.FIT,
noise_mask_method=noise_mask_method,
)
if full_paths_cross:
stare_cross = doppy.product.Stare.from_halo_data(
data=full_paths_cross,
data_bg=full_paths_bg,
bg_correction_method=doppy.options.BgCorrectionMethod.FIT,
noise_mask_method=noise_mask_method,
)
stare = doppy.product.StareDepol(stare, stare_cross)
except doppy.exceptions.NoDataError as err:
Expand Down Expand Up @@ -467,6 +468,23 @@ def _process_windcube(self, instrument: instruments.Instrument) -> None:
data, instrument
)

def _noise_mask_method(self) -> doppy.options.NoiseMaskMethod:
default = doppy.options.NoiseMaskMethod.INTENSITY_AND_VELOCITY
try:
calibration = self.processor.client.calibration(
self.params.instrument.pid, self.params.date
)
except CloudnetAPIError:
return default
value = (
calibration.get("data", {}).get("noise_mask_method")
if calibration
else None
)
if value is None:
return default
return doppy.options.NoiseMaskMethod(value)


class ProcessLidar(ProcessInstrument):
def process_cs135(self) -> None:
Expand Down