ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Add back the outlier filter #73

Closed ivoflipse closed 10 years ago

ivoflipse commented 10 years ago

Because model.calculate_average no longer contains a list of contacts, but just one average contact, I can't easily calculate a filtered average contact outside of model.calculate_average.

The solution seems simple: (re)calculate the average after labeling and also provide a filtered version of model.calculate_average. Preferably give the user the option to determine how strict it should be and recalculate on command.

Note that whether a contact should be filtered (at least with the default settings), should be stored, so figure out how to update this in a sensible way.

ivoflipse commented 10 years ago

I should note that these things are being calculated again, but since I'm going to rewrite the way we handle the calculation of average results and whatnot, I'll still have to change this part too, so I'll leave it open for now. But certainly a work in progress.

Its also dependent on displaying the results for each separate contact, like Lyn requested, which requires a different way of organizing things.

One advantage of the changes I made to the models is that the rest of the application receives Contact instances, so if the filtered attribute is set, every widget can just check for it.

ivoflipse commented 10 years ago

I'm working on re-enabling it, but I'm not sure how I want this to function. For example with the force graphs, I just go through each contact and if the outlier_toggle is on, I simply skip contacts where contact.filtered == True.

But why should I even allow a user to click on it? Shouldn't I provide feedback about this in the measurement tree? Perhaps even consider adding another item in the contact_dict, something like -4 == filtered.

I also need to figure out how to compute which contacts get filtered and then never do the calculation again if I don't have to.

ivoflipse commented 10 years ago

For now I've only made it turn the color to gray in the measurement_tree for analysis_widget. But I do need to figure out how to save that information

ivoflipse commented 10 years ago

The computation doesn't take long on a couple of measurements, so I've changed it such that when you switch tabs to Analysis, it computes the average (just in case) and then filters the contacts. Those results are then written to Pytables.