change refinement to a separate function in refine.py so it can be called by other plugins.
Currently in the refine plugin, the refine_time function finds the channel and time window to use for refinement, refines the time, adds a tag, writes it to event.py and plots the graphs.
I would like to be able to call a function that just refines the time. To do this we would need to split up refine_time into two functions, maybe:
- refine_channel Takes an input of the time window and dictionary containing information about the channel needed for refinement (channel, std, min); then outputs the refined time.
- refine_time Does the job of the old refine_time function but calls channel_refine to do the actual refinement.