[SciPy-user] creating timeseries for non convertional custom frequencies
Marco Tuckner
marcotuckner at public-files.de
Mon Apr 14 17:56:37 EDT 2008
Hello Pierre, Matt and others!
The thing you suggested worked and gave the result that I wanted to achieve.
The crutial thing was -- as Pierre write -- the filling of the missing dates:
timeseries.fill_missing_dates(series)
But now I have kind of 'two different' masks:
(1) One mask that I created when importing the data or creating the masked
array. This is used to mask all data values are physically inplausible or
invalid.
(2) Another mask that I just created with fill_missing_dates to get the missing
dates filled.
You'd say that this is fine.
I now want continue to mask invalid data with filters (e.g. discard x lower 5
AND higher 100). And many more filters in between. In the end I would like to
count the
all masked data points to get a feeling of the performance of my logging device
or the measurement process as a whole. When I now count all masked values the
result would include those data points masked in stage (2). This would
signifcantly reduce the accuracy of my data recovery ratio:
number of valid data points / number of expected data points.
Any suggestion who I can get around this?
BTW, Is there a more efficient way to get properties of the masked array like
number of masked and not masked values?
I tried this:
# return the number of masked values
number_of_valid_values = filled.mask.size-sum(filled.mask)
#return number of False values in a masked array
number_of_valid_values = filled.mask.size-filled.mask.size-sum(filled.mask)
Greetings,
Marco
More information about the SciPy-User
mailing list