Skip to content

Commit

Permalink
Update write_tracking_h5.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsai881 committed Dec 6, 2023
1 parent 50debbe commit 1106ce0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sleap/info/write_tracking_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def write_csv_file(output_path, data_dict):
tracks.append(detection)

tracks = pd.DataFrame(tracks)

all_frames = globals().get('all_frames', False)

if all_frames:
tracks = tracks.set_index('frame_idx')
tracks = tracks.reindex(range(0, len(data_dict['track_occupancy'])),fill_value=np.nan)
Expand All @@ -362,7 +363,7 @@ def main(
labels: Labels,
output_path: str,
labels_path: str = None,
all_frames: bool = True,
all_frames: bool = False,
video: Video = None,
csv: bool = False,
):
Expand Down

0 comments on commit 1106ce0

Please sign in to comment.