response_tools.io package

Subpackages

Submodules

response_tools.io.fetch_response_data module

Script to download data from FOXSI server.

class response_tools.io.fetch_response_data.DownloadPrompt[source]

Bases: object

class response_tools.io.fetch_response_data.DownloadType(*values)[source]

Bases: Enum

component = 3
file = 5
historical = 2
latest = 1
telescope = 4
response_tools.io.fetch_response_data.foxsi4_download_required(replace_existing=False, verbose=False)[source]

Download all response component files specified in response-information/info.yaml.

Download data products from a remote server to the local filesystem. Retrieves server URL and all local paths for saving data from a config file: response-tools/response-information/info.yaml. All downloaded response data will be saved under response-tools/response-information.

Parameters:
  • replace_existing (bool) – Whether to replace local files with newer versions, if newer versions are downloaded. Currently throws NotImplementedError.

  • verbose (bool) – Toggle for printing verbosely. If True, download progress indicators and filenames are displayed. If False, nothing is printed at all.

Returns:

A dict of downloaded data. Keys are the same file identifiers from the YAML source. Values are the absolute paths on the local filesystem to the downloaded file. Files which were already existed in the local filesystem (required no downloaded) are not included in the return value.

Return type:

downloaded

response_tools.io.fetch_response_data.green_str(text: str)[source]
response_tools.io.fetch_response_data.print_green(txt: str)[source]
response_tools.io.fetch_response_data.print_red(txt: str)[source]

response_tools.io.load_yaml module

Module containing methods to load in specific or general YAML files.

response_tools.io.load_yaml.load_response_context()[source]

Function to load in the context information from file.

response_tools.io.load_yaml.load_yaml(filename)[source]

Function to load in a general YAML file.

Module contents