icecube / skywriter

Upstream Tools for SkyDriver & the Skymap Scanner
MIT License
0 stars 0 forks source link

Allow `i3_to_json` to return a string rather than forcibly write files #11

Open mlincett opened 11 months ago

mlincett commented 11 months ago

Currently i3_to_json forcibly writes JSON files. It could be nice if the file writeout was optional and a (list of) JSON string(s) could be returned.

This could be achieved by appending the JSON string to the P-frame, and write it out using a custom writer module. Conversely, the optional I3Writer output would have to exclude such key from the output (which is perfectly supported).

Appending to a frame a JSON representation of itself is not very elegant and somewhat inception-ish, but should get the job done (?)