Skip to content

Commit

Permalink
MAINT: allow old clean routine if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Nov 21, 2023
1 parent fb9c9ff commit b1ed7ef
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions pysatNASA/instruments/cnofs_vefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

import datetime as dt
import functools
import numpy as np

from pysat.instruments.methods import general as mm_gen

Expand Down Expand Up @@ -90,8 +91,24 @@
init = functools.partial(mm_nasa.init, module=mm_cnofs, name=name)


# Use default clean
clean = mm_nasa.clean
def clean(self):
"""Clean VEFI data to the specified level.
Note
----
'dusty' or 'clean' removes data when interpolation flag is set to 1
'dirty' is the same as 'none'
"""

if 'B_flag' in self.variables:
if (self.clean_level == 'dusty') | (self.clean_level == 'clean'):
idx, = np.where(self['B_flag'] == 0)
self.data = self[idx, :]
else:
mm_nasa.clean(self)

return


# ----------------------------------------------------------------------------
Expand Down

0 comments on commit b1ed7ef

Please sign in to comment.