download_hdf5_data

class eispac.download.download_hdf5_data(filename=None, source='nrl', local_top='data_eis', datetree=False, nodata=False, nohead=False, overwrite=False, headonly=False, max_conn=2)[source]

Bases: object

An object for downloading EIS HDF5 level1 files

input is parsed to construct the remote and local filenames, curl is spawned to download the files (what if it doesn’t exist?), if files exist locally they are skipped.

Parameters:
  • filename (str or list) – An EIS filename. Such as, eis_l0_20200311_213413.fits, eis_l1_20200311_213413.fits.gz, /some_path/eis_l0_20200311_213413.fits. Can be a single path or a list of paths

  • datetree (bool) – Create a local path organized by date (YYYY/MM/DD)

  • local_top (str) – Top of the local path (e.g., data_eis)

  • nodata (bool) – Don’t download data files

  • nohead (bool) – Don’t download head files

  • overwrite (bool) – Download even if file exists locally

  • headonly (bool) – Equivalent to nodata + overwrite

  • max_conn (int) – Max number of download connections that parfive will use

Methods Summary

check_local_dir(local_file)

check if local dir exits.

construct_filenames(input_filename)

convert input into remote and local filenames

download()

download data and head files, unless told not to

download_file(remote_filepath, local_dir, ...)

Use parfive to download the file

parse_input_filename(input_filename)

convert an eis fits filename into an hdf5 filename; extract year, month, day

process_input(this_input)

input can be a filename or a list of filenames

Methods Documentation

check_local_dir(local_file)[source]

check if local dir exits. If not, create it

construct_filenames(input_filename)[source]

convert input into remote and local filenames

download()[source]

download data and head files, unless told not to

download_file(remote_filepath, local_dir, local_name)[source]

Use parfive to download the file

parse_input_filename(input_filename)[source]

convert an eis fits filename into an hdf5 filename; extract year, month, day

process_input(this_input)[source]

input can be a filename or a list of filenames