Small bug in range correcting signal with pre-trigger regions.

Wed, 25 Mar 2020 18:17:28 +0200

author
ioannis <ioannis@ioannis-VirtualBox>
date
Wed, 25 Mar 2020 18:17:28 +0200
changeset 196
27a0024331fd
parent 195
3e652f8063d4
child 197
43c73fdae528
child 198
f1eee7daf593

Small bug in range correcting signal with pre-trigger regions.

atmospheric_lidar/generic.py file | annotate | diff | comparison | revisions
changelog.rst file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/generic.py	Wed Mar 25 11:53:07 2020 +0200
+++ b/atmospheric_lidar/generic.py	Wed Mar 25 18:17:28 2020 +0200
@@ -732,7 +732,7 @@
         background = np.mean(self.matrix[:, idx_min:idx_max], axis=1)
         background_corrected = (self.matrix.transpose() - background).transpose()
         background_corrected = np.roll(background_corrected, -first_signal_bin, axis=1)
-        background_corrected[:, -9:] = 0
+        background_corrected[:, -first_signal_bin:] = 0
         self.rc = background_corrected * (self.z ** 2)
 
     def noise_mask(self, idx_min=-2000, idx_max=-500, threshold=1.):
--- a/changelog.rst	Wed Mar 25 11:53:07 2020 +0200
+++ b/changelog.rst	Wed Mar 25 18:17:28 2020 +0200
@@ -3,6 +3,9 @@
 
 Unreleased
 ----------
+Fixed
+~~~~~
+ - Bug in range correcting signal when using pre-trigger region.  
 
 0.5.0 - 2020‑03‑25
 ------------------

mercurial