Created
February 2, 2020 12:12
-
-
Save MShirazAhmad/04fd1e98cc886637d662cf392ee47905 to your computer and use it in GitHub Desktop.
Clipping raw data on two levels and normalizing to unity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| def clipping(data): | |
| temp = data | |
| cond_zero = (temp <= 0.7) & (temp <= 1.5) | |
| cond_one = (temp >= 0.7) & (temp >= 1.5) | |
| temp[cond_zero] = 0 | |
| temp[cond_one] = 1 | |
| return temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment