PAS Burst mode issues
=====================

== Problem #1: Burst mode events

===  Description

Some events can be triggered at the end of PAS burst mode period

==== 2021/06/11 22:06

----
==============================================
SWA EVENTS for 2021-06-11 : Low/Med/High without HIS ones
==============================================
APID ( 99, 7) TM (  5,  2) SEQ (05632,3) Size =     6  2021-06-11T22:06:06.454 : SID 43533 : SWA_E_PAS_MISS_HEAD_SCI_PKT
APID ( 99, 7) TM (  5,  2) SEQ (05633,3) Size =     6  2021-06-11T22:06:10.173 : SID 43563 : SWA_E_EXOS_LL_EVENT
APID ( 99, 7) TM (  5,  2) SEQ (05634,3) Size =     4  2021-06-11T22:06:14.451 : SID 43529 : SWA_E_PAS_WR_SCI_HEAD
----

See http://solarorbiter.irap.omp.eu/tests/aux/20210611/SWA_EVENT.txt

.Corresponding plot
image:documents/BURST/20210611.burst-event.png[width="100%"]



== Problem #2: Missing FS during burst mode sequences

=== __2021/06/21__ Problem identified

The problem was identified!

It seems there is a problem onboard during compression process, and the corresponding data packets are not complete.

When uncompressing some full-sampling data (burst-mode or snapshots) with 80 energies x 7 elevation x 9 CEM,
it should produce an uncompressed data buffer of 80 x 7 x 9 (int_16) = 12320 bytes

Obviously, in some cases, we got only 12288 bytes.

These packet were identified as "Uncomplete data: compressed_size < expected_size" and rejected by data processing software,
that leads to such "Missing FS"

A complete PAS Burst-mode sequence has a duration of 300 samples of 1s each.

Each 1s sample could be:

- full-sampling, with maximum energy, elevation and azimuth resolution
- composed of K=4 sub-sampling per second, with lower resolution
 
In a complete PAS BM sequence, we must find 15 full-sampling, one each 20s.

=== Exemple of a complete burst-mode sequence

Each Burst mode sequence is composed of :

- leading full-sampling
- 19 partial sub-sampling (x K = 4 sub-sampling per seconds)
- full-sampling
- 19 partial sub-samplings (x K = 4 sub-samplings)
- full-sampling
- etc...

The scheme is repeated 15 times => 15 * 20 = 300 seconds

We should find a full-sampling for samples #1, 21, 41, 61, ..., 281

CAUTION: there is no full-sampling at then end of the sequence

=== Example 2021/05/31 04:39

The Full_3D pannel indicates such full-sampling samples.

There can be also detected in NB_ENERGY or NB_ELEVATION pannels

image:documents/BURST/20210531_0439_0446.burst.png[width="100%"]

=== Burst mode configuration

The parameters N=15 , L=19, and K=4 are specified in PAS configuration

----
include::../documents/BURST/20210531.burst.conf[]
----

=== Full-sampling statistics

==== 2021/05/31

Burst mode are select each 1/4H (62 times from 04 to 22:30)

We can find the expected number of FS (62/62)

----
include::../documents/BURST/20210531.burst.FS.stat[]
----

==== 2021/06/01

Here also, burst mode each 1/4H, starting at 16:00

But a DPU reboot occurs at 18:29

However, we could find the expected number of FS (6/6 = 100%)

----
include::../documents/BURST/20210601.burst.FS.stat[]
----

=== Uncomplete burst-mode sequence 

After the latest DPU reboot, PAS configuration parameters for Burst mode sequence were modified.

The following parameters were updated:

- FirstEnergy: from 4 to 14
- EnegyNums: from 90 to 80
- FirstElev: from 0 to 1
- ElevNum: from 9 to 7

Burst mode was also no more selected than 2 times per day.

----
include::../documents/BURST/20210610.burst.conf[]
----

==== 2021/06/10

We can see here missing FS during the first BM sequence.

We should have 15 FS (one each 20s), but there are only 8 FS available in PAS telemetry.

.First BM 14:27
image:documents/BURST/20210610_1427.burst.png[width="100%"]

Same problem during the second sequence, only 9/15 FS.

We received also some events (see problem #1).

.Second BM 22:00
image:documents/BURST/20210610_2200.burst.png[width="100%"]

==== Statistics

[red]#Uncomplete FS (50%) for samples 1, 41, 61, 81, 141, 161#

----
include::../documents/BURST/20210610.burst.FS.stat[]
----

==== 2021/06/11

.First BM 14:27
image:documents/BURST/20210611_1427.burst.png[width="100%"]

.Second BM 22:00
image:documents/BURST/20210611_2200.burst.png[width="100%"]

[red]#Uncomplete FS (50%) but for different samples#

----
include::../documents/BURST/20210611.burst.FS.stat[]
----

==== 2021/06/12

.First BM 14:27
image:documents/BURST/20210612_1427.burst.png[width="100%"]

.Second BM 22:00
image:documents/BURST/20210612_2200.burst.png[width="100%"]


[red]#Uncomplete FS (50%) but for different samples#

----
include::../documents/BURST/20210612.burst.FS.stat[]
----