llama.dev.data.i3 package

Tools for fetching remote archival neutrino data from IceCube’s servers. You will need IceCube login credentials to be able to run these scripts.

llama.dev.data.i3.available_versions(root: str = '/data/ana/analyses/gfu/')

Get a list of available GFU archival neutrino versions from the IceCube servers.

Parameters

root (str, optonal) – The root directory in which to search for neutrino archive versions.

Returns

version_dirs – A list of relative subdirectories to root on the remote IceCube server. If you picked root correctly, this should be a list of neutrino archive version snapshots in ascending temporal order.

Return type

List[str]

Raises

ValueError – If I3_USERNAME is None (probably happened because you didn’t set the I3_USERNAME to your IceCube server username).

Examples

You should be able to get archival neutrinos used in the early-o3 era:

>>> 'version-002-p04' in available_versions()
True
llama.dev.data.i3.fetch_archival_neutrinos(version_dir: str, dest: str, root: str = '/data/ana/analyses/gfu/')

Same as secure_transfer_to_s3, but store the files in the dest directory instead of uploading them to S3. Mainly used as an implementation tool for secure_transfer_to_s3. Raises a FileNotFoundError if dest is not an existing directory.

llama.dev.data.i3.secure_transfer_to_s3(version_dir: str, root: str = '/data/ana/analyses/gfu/')

Fetch data files containing archival IceCube neutrino track events from IceCube servers and upload it to non-public AWS S3/DigitalOcean Spaces storage. Returns information on the file locations that can be used for automatic authenticated data retrieval.

Parameters
  • version_dir (str) – The name of the directory (as a relative path from root) in which the archival neutrinos you want are stored as .npy or .root files. Should be one of the return values of available_versions(root=root).

  • root (str, optonal) – The root directory in which to search for neutrino archive versions on the IceCube server.

Returns

private_file_cachers – A code string that’s a dict of llama.com.s3.PrivateFileCacher declarations pointing to the relevant files; you should paste this file into the llama.files.i3.json.ARCHIVAL_NEUTRINOS dictionary to enable access to these files.

Return type

str