Skip to main content

PyPI GitHub release (latest by date including pre-releases) Versions PyPI - License GitHub issues GitHub pull requests

skywriter

Upstream Tools for SkyDriver & the Skymap Scanner.

I3 to JSON converter

The main tool provided by skywriter is the i3_to_json converter function and script. The function reads a (list of) I3 file(s), processes them using the the realtime alert followup code (AlertEventFollowup module) and writes the events out as JSON files.

As SkyMap Scanner is designed to process the SplitUncleanedInIcePulses pulse series, the converter generates it by running the I3TriggerSplitter module on the original DAQ (Q) frame, hence creating one or more new Physics (P) frames (one for each "subevent" in the data). If already present, the SplitUncleanedInIcePulses object is deleted beforehand. In case of multiple subevents, only the subevent-id corresponding matching the original P-frame is processed.

The AlertEventFollowup module expects the Physics I3Frame to have a given set of keys. Such set of keys is currently hardcoded in the converter code. If the keys are present in the original P-frame, the corresponding objects are copied over to the output JSON. If not, they are filled with dummy values. If you plan to use these keys in your own Skymap Scanner reconstruction module make sure they have meaningful values.

Extra I3Particle objects, typically corresponding to reconstruction outputs, can be "extracted" through the --extra option. This means that the equatorial coordinates are calculated and written out in a JSON branch.

GCD

In order to produce lightweight payloads, the AlertEventFollowup code uses the so called "GCD diff" functionality (sometimes called "GCD compress"). The input GCD is compared against a given "base GCD" and only the difference is stored in the JSON-encoded GCD, along with the filename of the base GCD.

Skymap Scanner will look up a matching filename of the base GCD file in a pre-defined set of locations. In principle, it should not matter much which base GCD is used as long as Skymap Scanner can retrieve it. If you use a custom base GCD you should make sure it is made available to Skymap Scanner.

Example usage

Assuming you have set up your environment and loaded an IceTray shell, you can run the converter as (for example):

python skywriter/i3_to_json.py --extra "OnlineL2_SplineMPE" /data/ana/realtime/alert_catalog_v2/input_files/Level2pass2_IC86.2011_data_Run00118435_Subrun00000000_00000144_event58198553.i3

this will use the default base GCD.

Known limitations

  • The converter always writes out JSON files and does not allow to simply obtain JSON-encoded string corresponding to the input event. Yet you may treat output files as ephemeral, and delete them after the scan.
  • The converter supports the reading of a sequence of I3 files, but it is mostly tested with a single input file. If you encounter problems with converting multiple files, please file an issue. More in general, rather than producing sets of JSON files for archival, it could be better to do any conversion on-the-fly and track the conversion options in the user code.
  • It is not possible to copy an arbitrary key/object from the input P-frame to the output P-frame. There is also no warranty that a particle extracted with the --extra option will have a corresponding object in the output P-frame. If you need such a feature, or you want to improve this behavior, feel free to file a pull request!
  • Events in the input frame(s) are currently identified by run_id, event_id, subevent_id, which in turn are used to name the output JSON files. There is no warranty that these are unique in simulation events. Note that while Skymap Scanner does not care about the event being scanned having a unique id, SkyDriver currently identifies events by run_id and event_id only (although in principle, you could still scan different events with identical run_id and event_id, it is just a matter of bookkeeping and information retrieval). The best approach would be to ensure that sets of simulated events processed with SkyDriver are assigned unique (run_id, event_id).

Metadata

Release files for icecube-skywriter 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for icecube-skywriter 1.0.1
File Size Uploaded Provenance
icecube_skywriter-1.0.1.tar.gz 13.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for icecube-skywriter 1.0.1
File Interpreter ABI Platform
icecube_skywriter-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / icecube_skywriter-1.0.1.tar.gz

Download URL icecube_skywriter-1.0.1.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8c8f6629e38e2574e39abcf5f4f2cebf35dd36e4ab7845b04882cb8597fad74d
BLAKE2b-256 checksum
How to use checksums
bbb24fa1237cc8aadca8831171735b26785abce3001174af808d37a96c5696a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / icecube_skywriter-1.0.1-py3-none-any.whl

Download URL icecube_skywriter-1.0.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
231192ceb998617c6a90b02ccfd45a468df6d5ef0d1ad361c741ff7942c88ee0
BLAKE2b-256 checksum
How to use checksums
caf9a97e71c9fed407e0779b766cc2a31723dc2298d9fef3808a132b600ad8bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for icecube-skywriter 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page