Skip to content

Commit

Permalink
MasterTrack: Emit just one revolution of flux if data is index aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
Keir Fraser authored and keirf committed Aug 17, 2023
1 parent 03f1342 commit d40678d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/greaseweazle/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,12 @@ def _flux(self, for_writeout, cue_at_index) -> Union[Flux, WriteoutFlux]:
terminate_at_index = splice_at_index)

# Package up Flux.
flux_list = flux_list + [flux_ticks+flux_list[0]] + flux_list[1:]
flux = Flux([ticks_to_index]*2, flux_list,
index_list = [ticks_to_index]
if not splice_at_index:
# Emit two revolutions if track data crosses the index.
flux_list = flux_list + [flux_ticks+flux_list[0]] + flux_list[1:]
index_list *= 2
flux = Flux(index_list, flux_list,
sample_freq = ticks_to_index / self.time_per_rev,
index_cued = True)
flux.splice = sum(bit_ticks[:self.splice])
Expand Down

0 comments on commit d40678d

Please sign in to comment.