|
6 | 6 |
|
7 | 7 | ## Upgrading |
8 | 8 |
|
9 | | -<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with --> |
| 9 | +* The resampler now takes a `name` argument for `add_timeseries()`. This is only used for logging purposes. |
| 10 | + |
| 11 | +* The resampler and resampling actor now takes a `ResamplerConfig` object in the constructor instead of the individual values. |
| 12 | + |
| 13 | +* The resampler and resampling actor can emit errors or warnings if the buffer needed to resample is too big. If it is bigger than `ResamplingConfig.max_buffer_len`, the buffer will be truncated to that length, so the resampling can lose accuracy. |
| 14 | + |
| 15 | +* The `ResamplingFunction` now takes different arguments: |
| 16 | + |
| 17 | + * `resampling_period_s` was removed. |
| 18 | + * `resampler_config` is the configuration of the resampler calling the resampling function. |
| 19 | + * `source_properties` is the properties of the source being resampled. |
10 | 20 |
|
11 | 21 | ## New Features |
12 | 22 |
|
13 | | -<!-- Here goes the main new features and examples or instructions on how to use them --> |
| 23 | +* The resampler and resampling actor can now take a few new options via the new `ResamplerConfig` object: |
| 24 | + |
| 25 | + * `warn_buffer_len`: The minimum length of the resampling buffer that will emit a warning. |
| 26 | + * `max_buffer_len`: The maximum length of the resampling buffer. |
| 27 | + |
| 28 | +* The resampler now infers the input sampling rate of sources and use a buffer size according to it. |
| 29 | + |
| 30 | + This information can be consulted via `resampler.get_source_properties(source)`. The buffer size is now calculated so it can store all the needed samples requested via the combination of `resampling_period_s`, `max_data_age_in_periods` and the calculated `input_sampling_period_s`. |
| 31 | + |
| 32 | + If we are upsampling, one sample could be enough for back-filling, but we store `max_data_age_in_periods` using `input_sampling_period_s` as period, so the resampling functions can do more complex inter/extrapolation if they need to. |
| 33 | + |
| 34 | + If we are downsampling, we want a buffer that can hold `max_data_age_in_periods * resampling_period_s` seconds of data, and we have one sample every `input_sampling_period_s`, so we use a buffer length of: `max_data_age_in_periods * resampling_period_s / input_sampling_period_s` |
14 | 35 |
|
15 | 36 | ## Bug Fixes |
16 | 37 |
|
17 | | -<!-- Here goes notable bug fixes that are worth a special mention or explanation --> |
| 38 | +* Fixed logger creationg for some modules. |
| 39 | + |
| 40 | + Some modules didn't create the logger properly so there was no way to configure them using the standard logger configuration system. Because of this, it might have happened that some log messages were never showed, or some message that the user didn't want to get were emitted anyway. |
0 commit comments