Conversation
|
Something @oakleybrunt mentioned on the previous PR (and @mo-mglover has just mentioned as well) the spelling of |
agreed, see |
3c9bb2a to
f9ed767
Compare
|
i have added tests for the new aggregation class this is likely suitable for review now @EdHone |
|
The technical implementation seems sound to me all round. For the case where a user wants to group a set of runs that have been loaded in order to analyse them as one, it's simple to do with a script like this: from vernier import VernierReader, aggregate
# Load data
run1_timers = VernierReader(Path(run1_file)).load()
run2_timers = VernierReader(Path(run2_file)).load()
run3_timers = VernierReader(Path(run3_file)).load()
run4_timers = VernierReader(Path(run4_file)).load()
# Analyse individual data
analyse_data(run1_timers)
analyse_data(run2_timers)
analyse_data(run3_timers)
analyse_data(run4_timers)
# Analyse aggregated data
aggregated_timers = aggregate[run1_timers, run2_timers, run3_timers, run4_timers]
analyse_data(aggregated_timers)with the benefit that because the product of the aggregation is just a If i'm misunderstanding the scope of your change and the example I've given above isn't the same as what you're trying to achieve please let me know |
I think that the design issue here is important. I think that having an object which aggregates whilst keeping the identities of the members separate is a valuable and different entity from an aggregation that loses the distinction between input units. On reflection, I think that the aggregate function as defined would be better to be moved to a method on the VernierData class, to continue to enable collecting data from many single files (& perhaps renamed) I think that the VernierDataAggregation class provides a richer interface, better supporting an aggregation by assertion, that is that two or more independent runs can be considered together, whilst a VernierData method that support managing data in different files from the same run can be adapted from the current function. I'll have a look at putting such a change set into a further commit to this PR, for design and implementation consideration. |
|
8408b39 this provides a consistent design, with aggregate now being a method on the VernierData class, and the different behaviour of an asserted aggregation being a new VernierDataAggregation class |
|
this does leave a further potential confusion, with overuse of the term aggregate, so I have changed the name of the new class to An aggregation, in constrast, is something formed by adding together several amounts or things |
280d574 to
02acc93
Compare
02acc93 to
cad1247
Compare
|
Really happy with these changes, I'll get into a full review soon. I think the potential to enforce consistency of interface between the |
EdHone
left a comment
There was a problem hiding this comment.
A few spelling issues to fix
EdHone
left a comment
There was a problem hiding this comment.
I managed to use GitHub's magic to fix the spelling errors - now approved
Description
a new class is added to the post-processing vernier python library, to enable aggregation across multiple runs, that are asserted to be the same, but where the members can be also accessed, removed, etc.
Linked issues
Closes # (issue)
related to #221
related to #229
Type of change
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: