BatHousekeepingFinder

class gdt.missions.swift.bat.finders.BatHousekeepingFinder(*args, protocol='HTTPS', **kwargs)[source]

Bases: SwiftObsFinder

This class finds Swift BAT housekeeping data based on date and observation ID.

Parameters:
  • date (astropy.Time, optional) – A time for the observation

  • obsid (str, optional) – A valid observation ID number

Attributes Summary

cwd

files

The list of files in the current directory

num_files

Number of files in the current directory

Methods Summary

cd(*args)

Change directory

filter(filetype, extension)

Filters the directory for the requested filetype and extension

get(download_dir, files[, verbose])

Downloads a list of files from the current FTP directory.

ls(*args[, fullpath])

List the contents of a directory

Attributes Documentation

cwd
files

The list of files in the current directory

Type:

(list of str)

num_files

Number of files in the current directory

Type:

(int)

Methods Documentation

cd(*args)

Change directory

Parameters:

args (tuple) – The arguments needed to construct the remote path

filter(filetype, extension)

Filters the directory for the requested filetype and extension

Parameters:
  • filetype (str) – The type of file, e.g. ‘cspec’

  • extension (str) – The file extension, e.g. ‘.pha’

Returns:

(list)

get(download_dir: Union[str, Path], files: List[str], verbose: bool = True) List[Path]

Downloads a list of files from the current FTP directory. This function also returns a list of the downloaded file paths.

Parameters:
  • download_dir (str, Path) – The download directory location

  • files (list of str) – The list of files to download

  • verbose (bool, optional) – If True, will output the download status. Default is True.

Returns:

(list)

ls(*args, fullpath: bool = False)

List the contents of a directory

Parameters:
  • args (tuple) – The arguments needed to construct the remote path

  • fullpath (bool, optional) – If True, will list all files in the current with their full path.