You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lights_on_hour is given in local time instead of being given in zt time.
This will produce erroneous binning. I think that it's easy to catch that bin_pellets_lightcycle is being called with zt and modify lights_on_hour to 0 and lights_off_hour to 12. This function will mostly be used with zt anyway since we want the light/dark info instead of the date, so it's better this way. We can also add a zt_date to this result to make clear that we are talking about zt datetime instead of date.
> df %>% recalculate_pellets() %>% add_zt(Pi_Time, lights_on_hour=7) %>% bin_pellets_lightcycle(Pi_Time, lights_on_hour=7)
# A tibble: 6 × 3
# Groups: date, light_cycle [6]
date light_cycle pellets
<date> <chr> <int>
1 2023-08-03 dark 89
2 2023-08-03 light 23
3 2023-08-04 dark 168
4 2023-08-04 light 45
5 2023-08-05 dark 87
6 2023-08-05 light 14
> df %>% recalculate_pellets() %>% add_zt(Pi_Time, lights_on_hour=7) %>% bin_pellets_lightcycle(zt, lights_on_hour=7)
# A tibble: 5 × 3
# Groups: date, light_cycle [5]
date light_cycle pellets
<date> <chr> <int>
1 2023-08-03 dark 53
2 2023-08-03 light 138
3 2023-08-04 dark 71
4 2023-08-04 light 150
5 2023-08-05 dark 14
The text was updated successfully, but these errors were encountered:
But I think the user should not need to know this, it's better to intercept the use of zt and adjust. When using zt, we should also have a zt_date and a date, since it can be really confusing for the user. Unfortunately, we would need to add an extra parameter to the function to keep the original date...Will evaluate in the future if it makes sense at all.
The
lights_on_hour
is given in local time instead of being given in zt time.This will produce erroneous binning. I think that it's easy to catch that bin_pellets_lightcycle is being called with zt and modify lights_on_hour to 0 and lights_off_hour to 12. This function will mostly be used with
zt
anyway since we want the light/dark info instead of the date, so it's better this way. We can also add azt_date
to this result to make clear that we are talking aboutzt
datetime instead ofdate
.The text was updated successfully, but these errors were encountered: