-
Notifications
You must be signed in to change notification settings - Fork 1
Ramp analysis ver0 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thoughts:
-> although actually, we maybe just want to filter the df before passing it in. so the function doesn't have to do this filtering. or if the function does this it should def be optional for averaging DA (or any phot signal), make sure to account for the duration of each sample. the true mean is actually avg_in_that_hex*duration_in_that_hex , and then all divided by the total duration (python probs has a weighted avg function) General comments
|
calderast
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See prev comment
|
pls review my code <3 |
calderast
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for add_averaged_series_column you could even get soooo crazy and just grab the name from the series object itself instead of new_col_name as an argument. but that's totally optional, this function rocks!
for weighted_mean_and_sem if you're always using it with the hexpath df, the duration column name will always be duration so you might not need that as an argument. Not sure if the weighted part would make sense with any other column that isn't duration, but I also understand keeping it for flexibility
for group_series_by_hex_path_col you actually do a lot of filtering etc that I would maybe do separately from this function? like I would probably filter the df first (or have a filtering function for all filtering - like how you do then duration filtering earlier - these should probably all be filtered all at once) and then the function just for the grouping. so then it's easier to have a pipeline of df -> add series col -> filter -> group
also the plots are so cute I LOVE THESE RAMPS. YOU ROCK
you already KNOW i LOVE the maze hexes colored by DA !!!! perfect incredible!! (I will add more comments on the filtering by conditions part after this flight! but PR is approved you can merge if you wish)
very preliminary. contains a few steps of functions briefly average - merge - plot. Added a few more functions for further steps but needs to be discussed.