Level0 Handling
From Tauwiki
[edit] UVS_ingest_data
The ingest data searches for
- Sync word, and
- Log
Sync word
The first byte of sync word is searched for in each byte. When it is matched with science sync this is written out including next (128-sync) bytes. At the same time it is searching for the sync in this data itself ?.
Log
When log is found in a data file, the data is split at that point. The logic is as follows.
The Structure of data:
Bytes1 ....
Log1 ....
Bytes2 ...
Log2 ....
Bytes3 ...
Log3 ....
Bytes1
Bytes1 can be Fillers or data or nothing.
This data in Bytes1 can be due to missing log, or second part of observation, or few starting negligible bytes. So this cannot be discarded blindly.
If this is data, search for the next log. If there is log, mark it as part2 or no_startlog.
If no log is found in the remaining file, then search for file marked as no_log{n}. If it is there mark this as no_log{n+1}.
Else if these are fillers, then it can be discarded. Print # to # bytes of fillers
Or, If it is not there, means the file starts with Log1.Then it is given in next section.
Log1
There is a log.
If Bytes2 is present and it is data, then this can be its startlog. but time continuity (and other possible parameters) should be verified before deciding it.
If Bytes2 is not present before Log2, then Log1 is not start log of any data, so move on to next.
Bytes2
If this is data, write out till endlog, or end of file. If endlog is missing then it is part1, if the Log1 belongs to this data as startlog. If there is no start log for this then mark it as no_log{n+1}, as in the case of 'Bytes1'.
Discard filler bytes. If Log2 is present, continue the logic
[edit] UVS_Combine_Data
Case 1:
Combine part1 and part2 if it satisfies the two conditions:
- There is no log in between, and
- If the difference in time of the data is less than a parameter value.
So, check if log is there in between and read the time from the two sections and compare them to see that they are comparable.
If any of these conditions are not met then, print error message and exit. The script should not proceed without user intervention.
Case 2:
Check if the data in the above case is only time frames, or fillers.
If time frames only, then combine them but print error message and exit after writing the file.
If fillers only, then print error message and exit.
