avalentino / s1isp

Sentinel-1 Instrument Source Packets decoder
Apache License 2.0
5 stars 1 forks source link

Potential Wrong range_decimation decoding #7

Closed sirbastiano closed 4 months ago

sirbastiano commented 4 months ago

The output of a generic record: packet_version_number 0 packet_type 0 secondary_header_flag True pid 65 pcat 12 sequence_flags 3 packet_sequence_count 1442 packet_data_length 16065 coarse_time 1400621785 fine_time 5757 sync_marker 892270675 data_take_id 220361376 ecc_num s3_no_ical test_mode default rx_channel_id rxv instrument_configuration_id 7 data_word_index 35 space_packet_count 1442 pri_count 5461 error_flag False baq_mode FDBAQ_MODE_0 baq_block_length 31 range_decimation x4_on_9 rx_gain 12 tx_ramp_rate 34770

The range_decimation should be an integer value according to the package of richall.

avalentino commented 4 months ago

In s1isp it used an integer enum defined in https://github.com/avalentino/s1isp/blob/7743f07a06d379b88156094fadf5e3b81c265020/s1isp/enums.py#L87-L100

For visualization purposed the s1isp.decoder.decoded_stream_to_dict function has an optional parameter (enum_value) that can control whenever the integer value of the enumeration name should be included in the returned dictionary.

sirbastiano commented 4 months ago

Worked like a charm!