Exemplo n.º 1
0
    def __init__(self, stix_packets):
        self.num_samples = len(stix_packets['coarse_time'])
        # Header
        self.scet_coarse = stix_packets['coarse_time'][0]
        self.scet_fine = stix_packets['fine_time'][0]
        self.obs_utc = scet_to_datetime(f'{self.scet_coarse}:{self.scet_fine}')
        self.obs_beg = self.obs_utc
        self.obs_end = self.obs_end = scet_to_datetime(
            f"{stix_packets['coarse_time'][-1]}:{stix_packets['fine_time'][-1]}"
        )
        self.obs_avg = self.obs_beg + (self.obs_end - self.obs_beg) / 2.0

        # Data
        self.sw_running = stix_packets.get('NIXD0021')
        self.instrument_number = stix_packets.get('NIXD0022')
        self.instrument_mode = stix_packets.get('NIXD0023')
        self.hk_dpu_pcb_t = stix_packets.get('NIXD0025')
        self.hk_dpu_fpga_t = stix_packets.get('NIXD0026')
        self.hk_dpu_3v3_c = stix_packets.get('NIXD0027')
        self.hk_dpu_2v5_c = stix_packets.get('NIXD0028')
        self.hk_dpu_1v5_c = stix_packets.get('NIXD0029')
        self.hk_dpu_spw_c = stix_packets.get('NIXD0030')
        self.hk_dpu_spw0_v = stix_packets.get('NIXD0031')
        self.hk_dpu_spw1_v = stix_packets.get('NIXD0032')
        self.sw_version = stix_packets.get('NIXD0001')
        self.cpu_load = stix_packets.get('NIXD0002')
        self.archive_memory_usage = stix_packets.get('NIXD0003')
        self.autonomous_asw_boot_stat = stix_packets.get('NIXD0166')
        self.memory_load_ena_flag = stix_packets.get('NIXD0167')
        self.idpu_identifier = stix_packets.get('NIXD0004')
        self.active_spw_link = stix_packets.get('NIXD0005')
        self.overruns_for_tasks = stix_packets.get('NIXD0168')
        self.watchdog_state = stix_packets.get('NIXD0169')
        self.received_spw_packets = stix_packets.get('NIXD0079')
        self.rejected_spw_packets = stix_packets.get('NIXD0079')
        self.hk_dpu_1v5_v = stix_packets.get('NIXD0035')
        self.hk_ref_2v5_v = stix_packets.get('NIXD0036')
        self.hk_dpu_2v9_v = stix_packets.get('NIXD0037')
        self.hk_psu_temp_t = stix_packets.get('NIXD0024')
        self.fdir_status = stix_packets.get('NIX00085')
        self.fdir_status_mask_of_hk_temperature = stix_packets.get('NIX00161')
        self.fdir_status_mask_of_hk_voltage = stix_packets.get('NIX00162')
        self.hk_selftest_status_flag = stix_packets.get('NIXD0163')
        self.memory_status_flag = stix_packets.get('NIXD0164')
        self.fdir_status_mask_of_hk_current = stix_packets.get('NIXD0165')
        self.number_executed_tc = stix_packets.get('NIX00166')
        self.number_sent_tm = stix_packets.get('NIX00167')
        self.number_failed_tm_gen = stix_packets.get('NIX00168')
Exemplo n.º 2
0
 def __init__(self, stix_packet):
     # Header
     self.scet_coarse = stix_packet['NIX00445'][0]
     self.scet_fine = stix_packet['NIX00446'][0]
     self.obs_utc = scet_to_datetime(f'{self.scet_coarse}:{self.scet_fine}')
     self.obs_beg = self.obs_utc
     self.integration_time = (stix_packet['NIX00405'][0] +
                              1) * 0.1  # Seconds
     self.obs_end = self.obs_beg + timedelta(seconds=self.integration_time)
     self.obs_avg = self.obs_beg + (self.obs_end - self.obs_beg) / 2
Exemplo n.º 3
0
    def __init__(self, stix_packets):
        # Header
        self.ubsd_counter = stix_packets.get('NIX00285')[0]
        self.pald_counter = stix_packets.get('NIX00286')[0]
        self.num_flares = stix_packets.get('NIX00286')[0]

        # DATA
        self.start_scet_coarse = stix_packets.get('NIX00287')

        self.end_scet_coarse = stix_packets.get('NIX00287')
        self.obs_utc = scet_to_datetime(f'{self.start_scet_coarse:self.0}')
        self.highest_flareflag = stix_packets.get('NIX00289')[0]
        self.tm_byte_volume = stix_packets.get('NIX00290')[0]
        self.average_z_loc = stix_packets.get('NIX00291')[0]
        self.average_y_loc = stix_packets.get('NIX00292')[0]
        self.processing_mask = stix_packets.get('NIX00293')[0]
Exemplo n.º 4
0
    def __init__(self, stix_packet):
        # Header
        self.scet_coarse = stix_packet['NIX00445'][0]
        self.scet_fine = 0
        self.obs_utc = scet_to_datetime(f'{self.scet_coarse}:{self.scet_fine}')
        self.duration = stix_packet['NIX00122'][0]
        self.obs_beg = self.obs_utc
        self.obs_end = self.obs_beg + timedelta(seconds=self.duration)
        self.obs_avg = self.obs_beg + (self.obs_end - self.obs_beg) / 2

        # Control
        self.quiet_time = stix_packet.get('NIX00123')[0]
        self.live_time = stix_packet.get('NIX00124')[0]
        self.average_temperature = stix_packet.get('NIX00125')[0]
        self.detector_mask = stix_packet.get('NIX00407')[0]
        self.pixel_mask = stix_packet.get('NIXD0407')[0]
        self.subspectrum_mask = stix_packet.get('NIX00160')[0]
        self.compression_scheme_counts = (stix_packet.get('NIXD0126')[0],
                                          stix_packet.get('NIXD0127')[0],
                                          stix_packet.get('NIXD0128')[0])
        self.subspec_data = {}
        j = 129
        for subspec, i in enumerate(range(300, 308)):
            self.subspec_data[subspec + 1] = {
                'num_points': stix_packet.get(f'NIXD0{j}')[0],
                'num_summed_channel': stix_packet.get(f'NIXD0{j + 1}')[0],
                'lowest_channel': stix_packet.get(f'NIXD0{j + 2}')[0]
            }
            j += 3

        # Data
        self.num_structures = sum(stix_packet.get('NIX00159'))
        self.detector_id = stix_packet.get('NIXD0155')
        self.pixel_id = stix_packet.get('NIXD0156')
        self.subspec_id = stix_packet.get('NIXD0157')
        self.num_spec_points = stix_packet.get('NIX00146')

        flat_counts = stix_packet.get('NIX00158')
        pos = 0
        counts = []
        for sp in self.num_spec_points:
            counts.append(flat_counts[pos:pos + sp])
            pos += sp

        self.spectra = counts
Exemplo n.º 5
0
    def __init__(self, stix_packets):

        # Control
        self.tc_packet_id_ref = stix_packets.get('NIX00001')[0]
        self.tc_packet_seq_control = stix_packets.get('NIX00002')[0]
        self.request_id = stix_packets.get('NIX00037')[0]
        self.compression_scheme_counts = (stix_packets['NIXD0007'][0],
                                          stix_packets['NIXD0008'][0],
                                          stix_packets['NIXD0009'][0])
        self.compression_scheme_trig = (stix_packets['NIXD0010'][0],
                                        stix_packets['NIXD0011'][0],
                                        stix_packets['NIXD0011'][0])
        self.time_stamp = stix_packets.get('NIX00402')[0]
        self.num_structures = stix_packets.get('NIX00403')[0]
        self.start_time = stix_packets.get('NIX00404')[0]
        self.rcr = stix_packets.get('NIX00401')[0]
        self.integration_duration = stix_packets.get('NIX00405')[0]
        self.pixel_mask = stix_packets.get('NIXD0407')[0]
        self.detector_mask = stix_packets.get('NIXD0407')[0]
        for i, num in enumerate(range(408, 424)):
            setattr(self, f'triggers_{i}', stix_packets.get(f'NIX00{num}')[0])

        # TODO seems off
        fine, coarse = modf(self.time_stamp)
        self.scet_coarse = int(coarse)
        self.scet_fine = int(fine * 2**16)

        self.obs_utc = scet_to_datetime(f'{self.scet_coarse}:{self.scet_fine}')
        self.obs_beg = self.obs_utc
        self.obs_end = self.obs_beg + timedelta(seconds=self.integration_duration * 0.1)
        self.obs_avg = self.obs_beg + (self.obs_end - self.obs_beg) / 2

        # Data
        self.num_samples = stix_packets.get('NIX00406')[0]
        self.pixel_id = stix_packets.get('NIXD0158')
        self.detector_id = stix_packets.get('NIXD0153')
        self.channel = stix_packets.get('NIXD0154')
        self.continuation_bits = stix_packets.get('NIXD0159')
        self.counts = stix_packets.get('NIX00065')
Exemplo n.º 6
0
    def __init__(self, stix_packets):
        self.num_samples = len(stix_packets['coarse_time'])
        # Header
        self.scet_coarse = stix_packets['coarse_time'][0]
        self.scet_fine = stix_packets['fine_time'][0]
        self.obs_utc = scet_to_datetime(f'{self.scet_coarse}:{self.scet_fine}')
        self.obs_beg = self.obs_utc
        self.obs_end = scet_to_datetime(
            f"{stix_packets['coarse_time'][-1]}:{stix_packets['fine_time'][-1]}"
        )
        self.obs_avg = self.obs_beg + (self.obs_end - self.obs_beg) / 2.0

        # Data
        self.sw_running = stix_packets.get('NIXD0021')
        self.instrument_number = stix_packets.get('NIXD0022')
        self.instrument_modem = stix_packets.get('NIXD0023')
        self.hk_dpu_pcb_t = stix_packets.get('NIXD0025')
        self.hk_dpu_fpga_t = stix_packets.get('NIXD0026')
        self.hk_dpu_3v3_c = stix_packets.get('NIXD0027')
        self.hk_dpu_2v5_c = stix_packets.get('NIXD0028')
        self.hk_dpu_1v5_c = stix_packets.get('NIXD0029')
        self.hk_dpu_spw_c = stix_packets.get('NIXD0030')
        self.hk_dpu_spw0_v = stix_packets.get('NIXD0031')
        self.hk_dpu_spw1_v = stix_packets.get('NIXD0032')
        self.hk_asp_ref_2v5a_v = stix_packets.get('NIXD0038')
        self.hk_asp_ref_2v5b_v = stix_packets.get('NIXD0039')
        self.hk_asp_tim01_t = stix_packets.get('NIXD0040')
        self.hk_asp_tim02_t = stix_packets.get('NIXD0041')
        self.hk_asp_tim03_t = stix_packets.get('NIXD0042')
        self.hk_asp_tim04_t = stix_packets.get('NIXD0043')
        self.hk_asp_tim05_t = stix_packets.get('NIXD0044')
        self.hk_asp_tim06_t = stix_packets.get('NIXD0045')
        self.hk_asp_tim07_t = stix_packets.get('NIXD0046')
        self.hk_asp_tim08_t = stix_packets.get('NIXD0047')
        self.hk_asp_vsensa_v = stix_packets.get('NIXD0048')
        self.hk_asp_vsensb_v = stix_packets.get('NIXD0049')
        self.hk_att_v = stix_packets.get('NIXD0050')
        self.hk_att_t = stix_packets.get('NIXD0051')
        self.hk_hv_01_16_v = stix_packets.get('NIXD0052')
        self.hk_hv_17_32_v = stix_packets.get('NIXD0053')
        self.det_q1_t = stix_packets.get('NIXD0054')
        self.det_q2_t = stix_packets.get('NIXD0055')
        self.det_q3_t = stix_packets.get('NIXD0056')
        self.det_q4_t = stix_packets.get('NIXD0057')
        self.hk_dpu_1v5_v = stix_packets.get('NIXD0035')
        self.hk_ref_2v5_v = stix_packets.get('NIXD0036')
        self.hk_dpu_2v9_v = stix_packets.get('NIXD0037')
        self.hk_psu_temp_t = stix_packets.get('NIXD0024')
        self.sw_version = stix_packets.get('NIXD0001')
        self.cpu_load = stix_packets.get('NIXD0002')
        self.archive_memory_usage = stix_packets.get('NIXD0003')
        self.autonomous_asw_boot_stat = stix_packets.get('NIXD0166')
        self.memory_load_ena_flag = stix_packets.get('NIXD0167')
        self.idpu_identifier = stix_packets.get('NIXD0004')
        self.active_spw_link = stix_packets.get('NIXD0005')
        self.overruns_for_tasks = stix_packets.get('NIXD0168')
        self.watchdog_state = stix_packets.get('NIXD0169')
        self.received_spw_packets = stix_packets.get('NIXD0079')
        self.rejected_spw_packets = stix_packets.get('NIXD0078')
        self.endis_detector_status = stix_packets.get('NIXD0070')
        self.spw1_power_status = stix_packets.get('NIXD0080')
        self.spw0_power_status = stix_packets.get('NIXD0081')
        self.q4_power_status = stix_packets.get('NIXD0082')
        self.q3_power_status = stix_packets.get('NIXD0083')
        self.q2_power_status = stix_packets.get('NIXD0084')
        self.q1_power_status = stix_packets.get('NIXD0085')
        self.aspect_b_power_status = stix_packets.get('NIXD0086')
        self.aspect_a_power_status = stix_packets.get('NIXD0087')
        self.att_m2_moving = stix_packets.get('NIXD0088')
        self.att_m1_moving = stix_packets.get('NIXD0089')
        self.hv17_32_enabled_status = stix_packets.get('NIXD0090')
        self.hv01_16_enabled_status = stix_packets.get('NIXD0091')
        self.lv_enabled_status = stix_packets.get('NIXD0092')
        self.hv1_depolar_in_progress = stix_packets.get('NIXD0066')
        self.hv2_depolar_in_progress = stix_packets.get('NIXD0067')
        self.att_ab_flag_open = stix_packets.get('NIXD0068')
        self.att_bc_flag_closed = stix_packets.get('NIXD0069')
        self.med_value_trg_acc = stix_packets.get('NIX00072')
        self.max_value_of_trig_acc = stix_packets.get('NIX00073')
        self.hv_regulators_mask = stix_packets.get('NIXD0074')
        self.tc_20_128_seq_cnt = stix_packets.get('NIXD0077')
        self.attenuator_motions = stix_packets.get('NIX00076')
        self.hk_asp_photoa0_v = stix_packets.get('NIX00078')
        self.hk_asp_photoa1_v = stix_packets.get('NIX00079')
        self.hk_asp_photob0_v = stix_packets.get('NIX00080')
        self.hk_asp_photob1_v = stix_packets.get('NIX00081')
        self.attenuator_currents = stix_packets.get('NIXD0075')
        self.hk_att_c = stix_packets.get('NIXD0075')
        self.hk_det_c = stix_packets.get('NIXD0058')
        self.fdir_function_status = stix_packets.get('NIX00085')