Journey's End

Jul 04
2026

Siril Script to Calculate Total Sequence Exposure Time

When stacking sub-exposures of different durations while also disabling images based on FWHM and visual inspection the question of "what is the total exposure time" can be difficult to answer. The following python script should answer the question.

from collections import Counter

import sirilpy as s

siril = s.SirilInterface()
siril.connect()

seq = siril.get_seq()

print(f'Computing exposure time for sequence {seq.seqname}')
print(f'Sequence has {seq.number} images, {seq.selnum} selected/enabled')

exp_time_table = Counter()

for idx, imparam in enumerate(seq.imgparam):
    if not imparam.incl:
        continue

    header = siril.get_seq_frame_header(idx, return_as='dict')
    exp_time_table[header['EXPTIME']] += 1

total_exp_time_s = 0
for exp_time, count in exp_time_table.items():
    print(f'Exposure time: {count:4d} x {exp_time:4.0f} secs')
    total_exp_time_s += exp_time * count

total_exp_time_min = total_exp_time_s / 60
total_exp_time_hr = total_exp_time_s / 3600

print(f'Total exposure time: {total_exp_time_s:.0f} secs (={total_exp_time_min:.1f} mins '
      f'={total_exp_time_hr:.1f} hrs)')

Example output:

14:06:45: Computing exposure time for sequence r_ngc_6188_combined_
14:06:45: Sequence has 606 images, 566 selected/enabled
14:06:46: Exposure time:  293 x   60 secs
14:06:46: Exposure time:  248 x   30 secs
14:06:46: Exposure time:   25 x  120 secs
14:06:46: Total exposure time: 28020 secs (=467.0 mins =7.8 hrs)