Tool: bin_packets
Description
This tool does a first cut at binning Swift packets by
observation. It first divides packets into 4 general types, depending on
their APID. Each type is binned in a different way.
- HEAD3 packets contain the target/obs ID in their tertiary header
- HEAD2 packets contain no target/obs ID, so we much use a timeline to
determine this info
- UVOT packets are segmented and have one tertiary header per group.
We must therefore recombine the segments before extracting the
target/obs ID.
- LDP packets similarly contain one tertiary header per "large data product".
However, we cannot merge them on the fly as we do UVOT packets.
Therefore LDPs are binned by product number and time. The resulting files
require further processing to get them into the correct observation bin.
In all cases, different APIDs are segregated into different files. Bins
are represented by directories.
Option Summary
Option | Argument Type | Default Value |
---|
-apid_list |
String |
apids.list |
-chunk_time |
Real |
3600 |
-digits |
Integer |
5 |
-errors |
String |
errors |
-first_bat_apid |
Integer |
289 |
-gap |
Real |
100. |
-head2_timeline |
String |
timeline |
-highest_apid |
Integer |
2045 |
-infile |
String |
- |
-last_bat_apid |
Integer |
571 |
-last_crack_time |
Real |
0.0 |
-ldp_dir |
String |
ldp |
-ldp_time |
|
86400 |
-max_time |
Real |
1.0e99 |
-min_time |
Real |
0.0 |
-obs_dir |
String |
obs |
-pushback |
String |
pushback |
-sdc_timeline |
String |
timeline |
-time_chunk_dir |
String |
daily |
-trash |
String |
trash |
-uvot_used |
String |
uvot_used |
Only the initial unique characters of each option are
significant. Each option must be followed by an argument
of the given type. Boolean "true" and "false" are indicated
with "y" and "n" respectively. A boolean option without a
value is assumed to be "true".
For filename arguments, "-" means either stdin or stdout
as appropriate.
Each option is described in detail below.
Parameters
- apid_list String (default = apids.list)
- SwiftTypedPacketReader configuration file, listing packet types
by APID.
- chunk_time Real (default = 3600)
- digits Integer (default = 5)
- errors String (default = errors)
- File to which will be appended packets which cannot
be classified, even with possible future information. Under normal
conditions nothing will be written to this file.
- first_bat_apid Integer (default = 289)
- gap Real (default = 100.)
- Size of the largest gap which will be automatically filled in the
sdc_timeline in seconds. Only gaps between adjacent intervals with the
same ID will be filled.
- head2_timeline String (default = timeline)
- File containing a timeline to use to sort HEAD2 packets
by observation.
- highest_apid Integer (default = 2045)
- infile String (default = -)
- The file containing packets to be sorted.
- last_bat_apid Integer (default = 571)
- last_crack_time Real (default = 0.0)
- ldp_dir String (default = ldp)
- Directory where LDP packets will be written.
- ldp_time (default = 86400)
- max_time Real (default = 1.0e99)
- min_time Real (default = 0.0)
- obs_dir String (default = obs)
- Directory where non-LDP packets will be written.
- pushback String (default = pushback)
- File to which will be appended packets which cannot
be sorted now, but may be sortable in the future. These include
HEAD2 packets not covered by the current timeline and UVOT science
packets which are not part of complete groups.
- sdc_timeline String (default = timeline)
- File containing a timeline which will be updated by the
information in the telemetry. Currently only the ACS packets are used to
update the timeline. This parameter is not used to bin HEAD2 packets,
unless sdc_timeline and head2_timeline have the same value. In that case
the packets will be binned using the timeline as it was when this
tool was started. In other words the updates are not applied until this
tool exits sucessfully.
- time_chunk_dir String (default = daily)
- trash String (default = trash)
- File to which will be appended discarded packets, such
as duplicate UVOT packets.
- uvot_used String (default = uvot_used)
- File to which will be apppended UVOT science
packets which have been sucessfully merged. Note these are the original
unmerged packets.