Skip to content

Instantly share code, notes, and snippets.

@Cadair
Created March 24, 2026 18:05
Show Gist options
  • Select an option

  • Save Cadair/542425b8228f57f49378cb6b81c4b446 to your computer and use it in GitHub Desktop.

Select an option

Save Cadair/542425b8228f57f49378cb6b81c4b446 to your computer and use it in GitHub Desktop.
A quick hack to transfer only ASDF files with globus.
from pathlib import Path
import dkist.net
from dkist.net.globus import start_transfer_from_file_list, get_data_center_endpoint_id
from dkist.net.globus.endpoints import get_local_endpoint_id
from sunpy.net import Fido, attrs as a
res = Fido.search(a.dkist.Dataset("AKIYGG"))["dkist"]
start_transfer_from_file_list(
src_endpoint=get_data_center_endpoint_id(),
dst_endpoint=get_local_endpoint_id(),
dst_base_path="/~/dkist_data/",
file_list=[Path("/") / row["Storage Bucket"] / row["asdf Filename"] for row in res],
src_base_path="/" + res[0]["Storage Bucket"],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment