Skip to content

Commit

Permalink
FIX: Update sigmet reader to handle 1byte kdp, that needs to be divid…
Browse files Browse the repository at this point in the history
…ed by wavelength. (ARM-DOE#1707)

* FIX: Update sigmet reader to handle 1byte kdp, that needs to be divided
by wavelength.

* FIX: Weird style issues.

* Update pyart/io/_sigmetfile.pyx

* Update pyart/io/_sigmetfile.pyx

* FIX: ANother style fix and doc fix possibly.
  • Loading branch information
zssherman authored Dec 13, 2024
1 parent 28c16de commit 55cc71c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ dependencies:
- pip:
- pooch
- versioneer
- -e ..
7 changes: 6 additions & 1 deletion pyart/io/_sigmetfile.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ cdef class SigmetFile:
prt_value = 1. / self.product_hdr['product_end']['prf']
nyquist = wavelength_cm / (10000.0 * 4.0 * prt_value)
data['WIDTH'] *= nyquist

# scale 1-byte KDP by the wavelength
if 'KDP' in self.data_type_names:
# The IRIS Programmer's Manual indicates 1-byte differential phase format
# data should be divided by the wavelength in cm (section 4.3.12).
wavelength_cm = self.product_hdr['product_end']['wavelength']
data['KDP'] /= wavelength_cm
return data, metadata

def _get_sweep(self, full_xhdr=False, raw_data=False):
Expand Down

0 comments on commit 55cc71c

Please sign in to comment.