load

heliopy.data.helper.load(filename, local_dir, remote_url, guessversion=False, try_download=True)

Try to load a file from local_dir.

If file doesn’t exist locally, try to download from remtote_url instead.

Parameters:
  • filename (string) – Name of file
  • local_dir (string) – Local location of file
  • remote_url (string) – Remote location of file
  • guessversion (bool) – If True, try to guess the version number in the filename. Only works for cdf files. Default is False.
  • try_download (bool) – If a file isn’t available locally, try to downloaded it. Default is True.
Returns:

file – If filename ends in .cdf the CDF file will be opened and returned.

Otherwise it is assumed that the file is an ascii file, and filename will be opened using python’s open() method.

Return type:

CDF or open file