Skip to content

GetAFTData

This part of the project documentation focuses on getAFTdata project code.

AFTdownload(root_url='https://data.boulder.swri.edu/lisa/')

A class for downloading AFT map files from a specified URL.

Attributes:

Name Type Description
ncpu int

Number of CPU cores to utilize for downloading files. Defaults to cpu_count() - 1.

root_url `str`

The root URL from where AFT map files will be downloaded.

urls list

List of URLs of AFT map files.

times list

List of timestamps corresponding to the AFT map files.

counts int

Total count of AFT map files.

datafile str

File path to store the list of files in CSV format.

datalist DataFrame

DataFrame containing the list of files and corresponding timestamps.

Methods:

Name Description
get_list

Gets a list of AFT map files within a specified time range.

reload_files

Reloads the list of AFT map files from the root URL.

download

Downloads AFT map files listed in the DataFrame.

get_list(t0=None, t1=None, cadence=1)

Gets a list of AFT map files within a specified time range.

Parameters:

Name Type Description Default
t0 datetime

Start time of the AFT map files to be downloaded.

None
t1 datetime

End time of the AFT map files to be downloaded.

None
cadence int

Cadence of the AFT map files to be downloaded.

1

Returns:

Name Type Description
data DataFrame

Pandas DataFrame containing the list of files within the specified time range.

reload_files(url=None, filetype='h5')

Reloads the list of AFT map files from the root URL.

Parameters:

Name Type Description Default
url str

The URL to reload the list of files from. Defaults to None.

None
filetype str

The file extension of AFT map files. Defaults to "h5".

'h5'

Returns:

Name Type Description
True bool

True if the list of files is successfully reloaded.

download(dataframe, rootpath=None, ncpu=None)

Downloads AFT map files listed in the DataFrame.

Parameters:

Name Type Description Default
dataframe DataFrame

DataFrame containing the list of files to download.

required
rootpath str

Root directory path to save the downloaded files. Defaults to None.

None
ncpu int

Number of CPU cores to utilize for downloading files. Defaults to cpu_count() - 1.

None

options: