(self, events, max_shift_ratio)
| 97 | |
| 98 | |
| 99 | def random_shift_time(self, events, max_shift_ratio): |
| 100 | events = copy.deepcopy(events) |
| 101 | max_shift_ratio = int(max_shift_ratio) |
| 102 | t_max = torch.amax(events[:, 2]).item() |
| 103 | t_min = torch.amin(events[:, 2]).item() |
| 104 | shift_length = max_shift_ratio * (t_max - t_min) |
| 105 | t_shift = (torch.rand(size=(len(events),)).to(events.device) - 0.5) * shift_length |
| 106 | events[:, 2] += t_shift |
| 107 | return events |
| 108 | |
| 109 | def random_shift_xy(self, events, max_shift_length): |
| 110 | events = copy.deepcopy(events) |
nothing calls this directly
no outgoing calls
no test coverage detected