Created
March 24, 2026 18:05
-
-
Save Cadair/542425b8228f57f49378cb6b81c4b446 to your computer and use it in GitHub Desktop.
A quick hack to transfer only ASDF files with globus.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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