tardis.transport.montecarlo.progress_bars module¶
Progress bar utilities for Monte Carlo transport calculations.
- tardis.transport.montecarlo.progress_bars.fix_bar_layout(bar, no_of_packets=None, total_iterations=None)[source]¶
Fix the layout of progress bars.
This function handles the visual layout and configuration of progress bars, with proper environment detection for notebook vs terminal environments.
- Parameters:
- bartqdm.tqdm
Progress bar instance to change the layout of.
- no_of_packetsint, optional
Number of packets to be propagated, by default None.
- total_iterationsint, optional
Total number of iterations, by default None.
- tardis.transport.montecarlo.progress_bars.initialize_iterations_pbar(total_iterations: int) None [source]¶
Initialize the iterations progress bar with the total number of iterations.
- Parameters:
- total_iterationsint
Total number of iterations.
- tardis.transport.montecarlo.progress_bars.refresh_packet_pbar() None [source]¶
Refresh packet progress bar after each iteration.
This function refreshes the visual display of the packet progress bar to ensure accurate rendering after each iteration completes.
- tardis.transport.montecarlo.progress_bars.reset_packet_pbar(no_of_packets: int) None [source]¶
Reset the packet progress bar for a new iteration.
- Parameters:
- no_of_packetsint
Total number of packets in the iteration.
- tardis.transport.montecarlo.progress_bars.update_iterations_pbar(i: int) None [source]¶
Update progress bar for each iteration.
- Parameters:
- iint
Amount by which the progress bar needs to be updated.
- tardis.transport.montecarlo.progress_bars.update_packets_pbar(i: int, no_of_packets: int) None [source]¶
Update packet progress bar with packet count updates only.
This function only handles packet progress without iteration logic, suitable for use within the montecarlo main loop.
- Parameters:
- iint
Amount by which the progress bar needs to be updated.
- no_of_packetsint
Total number of packets in one iteration.