from solar import * from CCSDS import CCSDS_reader def count_sid (day): filename = get_L0_filename (day, "swa-pas-tm", "bin") with CCSDS_reader (filename) as stream: x = [packet.sid for packet in stream if packet.sid == 194] print (len (x)) if __name__ == "__main__": from sys import argv day = str_to_date (argv [1]) count_sid (day)