smoothing - smoothing time series data
Description
Require a method for smoothing data (neutrons, soil moisture, others?).
Expected Behavior
It should be able to provide methods for smoothing data (mean, Savitsky-Golay etc.). Extensible for testing new methods. Adaptable to different parameters or data resolutions.
Current Behavior
No smoothing method in neptoon
Proposed Solution
We should produce a separate class which handles smoothing of data. There should then be a method in CRNSDataHub which utilises it.
Potentially we restructure some of the other code in neptoon to ensure the code being processed is the most current one.
E.g., If we smooth neutrons, those values will be written to a new column - presumably this is the column we want to process. Currently code is still looking for str(ColumnInfo.Name.EPITHERMAL_NEUTRONS).
Martin suggested in corny there is an N_FINAL column, which is always the column last updated.
I propose we implement this concept to neptoon in the ColumnInfo object. We can create an enum value of EPITHERMAL_NEUTRON_FINAL, which begins as the same value as EPITHERMAL_NEUTRON. When smoothing occurs, EPITHERMAL_NEUTRON_FINAL is updated to the new string. This means we can still access raw, none-smoothed data when needed.
Additional Context
We provide options for users to update the expected column names so they could change the string representation of EPITHERMAL_NEUTRONS. We need to have this update also apply to EPITHERMAL_NEUTRON_FINAL. We possibly also want to lock this somehow. For example if a user updates EPITHERMAL_NEUTRONS in an active kernel it would overwrite EPITHERMAL_NEUTRON_FINAL.
We also want to ensure ColumnInfo is reset between processing (during batch processing).
UPDATE @daniel.power 30.07.24 - decided not to implement resetting system in this class, better to have a way to do this in the main data_hub class
Acceptance Criteria
-
Class to support smoothing -
Possibility to extend it to new smoothing techniques -
A way to telegraph what column now needs processing (e.g., EPITHERMAL_NEUTRON_FINAL) -
(OPTIONAL) locking system for the ColumnInfo object -
(OPTIONAL) auto-reset ColumnInfo when finished processing -
Tests -
Documentation