arcanumpy.get_files_from_web module
- class arcanumpy.get_files_from_web.get_files_from_web[source]
Bases:
object
A class that contains methods to download files from the CDAweb website.
- download_files_from_cdaweb(time_range, CDA_LINK, filename, file_version, verbose, data_dir)[source]
Download files from the CDAweb website within a given time range and save them to a specified directory.
Examples
# Example usage >>> from arcanumpy.get_files_from_web import get_files_from_web >>> import pandas as pd >>> input_dict = {
“time_range”: [pd.Timestamp(“2001-01-01 00:00”), pd.Timestamp(“2001-01-03 12:00”)], “CDA_LINK”: “https://cdaweb.gsfc.nasa.gov/pub/data/ulysses/plasma/swics_cdaweb/scs_m1/”, “filename”: “uy_m1_scs_”, “file_version”: “_v02.cdf”, “verbose”: True, “data_dir”: None,
} >>> get_files_from_web().download_files_from_cdaweb(**input_dict)
- download_files_from_cdaweb(time_range=None, CDA_LINK='https://cdaweb.gsfc.nasa.gov/pub/data/ulysses/plasma/swics_cdaweb/scs_m1/', filename='uy_m1_scs_', file_version='_v02.cdf', verbose=True, data_dir=None)[source]
Download files from the CDAweb website within a given time range and save them to a specified directory.
- Parameters:
time_range (list) – A list of two pandas.Timestamp objects that specify the start and stop times of the time range of interest. The default is None.
CDA_LINK (str) – A string that specifies the link to the CDAweb website from which the files are downloaded. The default is “https://cdaweb.gsfc.nasa.gov/pub/data/ulysses/plasma/swics_cdaweb/scs_m1/”.
filename (str) – A string that specifies the name of the file to be downloaded. The default is “uy_m1_scs_”.
file_version (str) – A string that specifies the version of the file to be downloaded. The default is “_v02.cdf”.
verbose (bool) – A boolean that specifies whether to print out messages. The default is True.
data_dir (str) – A string that specifies the directory where the files are saved. The default is None.
- Return type:
None
Examples
# Example usage >>> from arcanumpy.get_files_from_web import get_files_from_web >>> import pandas as pd >>> input_dict = {
“time_range”: [pd.Timestamp(“2001-01-01 00:00”), pd.Timestamp(“2001-01-03 12:00”)], “CDA_LINK”: “https://cdaweb.gsfc.nasa.gov/pub/data/ulysses/plasma/swics_cdaweb/scs_m1/”, “filename”: “uy_m1_scs_”, “file_version”: “_v02.cdf”, “verbose”: True, “data_dir”: None,
} >>> get_files_from_web().download_files_from_cdaweb(**input_dict)
- __dict__ = mappingproxy({'__module__': 'arcanumpy.get_files_from_web', '__doc__': '\n A class that contains methods to download files from the CDAweb website.\n\n Methods\n -------\n download_files_from_cdaweb(time_range, CDA_LINK, filename, file_version, verbose, data_dir)\n Download files from the CDAweb website within a given time range and save them to a specified\n directory.\n\n Examples\n --------\n # Example usage\n >>> from arcanumpy.get_files_from_web import get_files_from_web\n >>> import pandas as pd\n >>> input_dict = {\n "time_range": [pd.Timestamp("2001-01-01 00:00"), pd.Timestamp("2001-01-03 12:00")],\n "CDA_LINK": "https://cdaweb.gsfc.nasa.gov/pub/data/ulysses/plasma/swics_cdaweb/scs_m1/",\n "filename": "uy_m1_scs_",\n "file_version": "_v02.cdf",\n "verbose": True,\n "data_dir": None,\n }\n >>> get_files_from_web().download_files_from_cdaweb(**input_dict)\n ', '__init__': <function get_files_from_web.__init__>, 'download_files_from_cdaweb': <function get_files_from_web.download_files_from_cdaweb>, '__dict__': <attribute '__dict__' of 'get_files_from_web' objects>, '__weakref__': <attribute '__weakref__' of 'get_files_from_web' objects>, '__annotations__': {}})
- __module__ = 'arcanumpy.get_files_from_web'