Tool: bin_packets_by_date

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.

In all cases, different APIDs are segregated into different files. Bins are represented by directories.

Option Summary

OptionArgument TypeDefault Value
-apid_list String apids.list
-chunk_time Real 24*3600
-digits Integer 5
-errors String errors
-gap
-head2_timeline
-infile String -
-ldp_dir String ldp
-obs_dir String obs
-pushback
-sdc_timeline
-trash String trash
-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 = 24*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.

gap
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
File containing a timeline to use to sort HEAD2 packets by observation.

infile String (default = -)
The file containing packets to be sorted.

ldp_dir String (default = ldp)
Directory where LDP packets will be written.

obs_dir String (default = obs)
Directory where non-LDP packets will be written.

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
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.

trash String (default = trash)
File to which will be appended discarded packets, such as duplicate UVOT packets.

uvot_used
File to which will be apppended UVOT science packets which have been sucessfully merged. Note these are the original unmerged packets.