TriggerFtp

class gdt.missions.fermi.gbm.finders.TriggerFtp(*args, **kwargs)[source]

Bases: TriggerFinder

Class providing backwards compatibility for code written prior to v2.0.5 where the TriggerFtp handled interactions with triggered data.

Parameters:
  • args – The set of parameters needed to define the data path

  • **kwargs – Options passed to TriggerFinder class

Attributes Summary

cwd

files

The list of files in the current directory

num_files

Number of files in the current directory

Methods Summary

cd(tnum)

Change directory to new trigger.

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.

get_cat_files(download_dir, **kwargs)

Download all catalog files for the trigger.

get_cspec(download_dir[, dets])

Download the CSPEC files for the trigger.

get_ctime(download_dir[, dets])

Download the CTIME files for the trigger.

get_healpix(download_dir, **kwargs)

Download the healpix localization file for the trigger.

get_lightcurve(download_dir, **kwargs)

Download the lightcurve plots for the trigger.

get_localization(download_dir, **kwargs)

Download all localization files for the trigger.

get_rsp(download_dir[, ctime, cspec, dets])

Download the response Type-I files for the trigger.

get_rsp2(download_dir[, ctime, cspec, dets])

Download the response Type-I files for the trigger.

get_trigdat(download_dir, **kwargs)

Download the trigger data (trigdat) file for the trigger.

get_tte(download_dir[, dets])

Download the TTE files for the trigger.

ls(*args[, fullpath])

List the contents of a directory

ls_cat_files()

List all catalog files for the trigger.

ls_cspec()

List all CSPEC files for the trigger.

ls_ctime()

List all CTIME files for the trigger.

ls_lightcurve()

List all lightcurve plots for the trigger.

ls_localization()

List all localization files for the trigger.

ls_rsp([ctime, cspec])

List all response Type-I files for the trigger.

ls_rsp2([ctime, cspec])

List all response Type-II files for the trigger.

ls_trigdat()

List the trigger data (trigdat) file for the trigger.

ls_tte()

List all TTE files for the trigger.

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(tnum)

Change directory to new trigger.

Parameters:

tnum (str) – The trigger number

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)

get_cat_files(download_dir, **kwargs)

Download all catalog files for the trigger.

Parameters:
  • download_dir (str) – The download directory

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

Returns:

(list of Path)

get_cspec(download_dir, dets=None, **kwargs)

Download the CSPEC files for the trigger.

Parameters:
  • download_dir (str) – The download directory

  • dets (list, optional) – The detectors’ data to download. If omitted, will download all.

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

Returns:

(list of Path)

get_ctime(download_dir, dets=None, **kwargs)

Download the CTIME files for the trigger.

Parameters:
  • download_dir (str) – The download directory

  • dets (list, optional) – The detectors’ data to download. If omitted, will download all.

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

Returns:

(list of Path)

get_healpix(download_dir, **kwargs)

Download the healpix localization file for the trigger.

Parameters:
  • download_dir (str) – The download directory

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

Returns:

(list of Path)

get_lightcurve(download_dir, **kwargs)

Download the lightcurve plots for the trigger.

Parameters:
  • download_dir (str) – The download directory

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

Returns:

(list of Path)

get_localization(download_dir, **kwargs)

Download all localization files for the trigger.

Parameters:
  • download_dir (str) – The download directory

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

Returns:

(list of Path)

get_rsp(download_dir, ctime=True, cspec=True, dets=None, **kwargs)

Download the response Type-I files for the trigger.

Parameters:
  • download_dir (str) – The download directory

  • ctime (bool, optional) – If True, download the ctime responses. Default is True.

  • cspec (bool, optional) – If True, download the cspec responses. Default is True.

  • dets (list, optional) – The detectors’ data to download. If omitted, will download all.

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

Returns:

(list of Path)

get_rsp2(download_dir, ctime=True, cspec=True, dets=None, **kwargs)

Download the response Type-I files for the trigger.

Parameters:
  • download_dir (str) – The download directory

  • ctime (bool, optional) – If True, download the ctime responses. Default is True.

  • cspec (bool, optional) – If True, download the cspec responses. Default is True.

  • dets (list, optional) – The detectors’ data to download. If omitted, will download all.

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

Returns:

(list of Path)

get_trigdat(download_dir, **kwargs)

Download the trigger data (trigdat) file for the trigger.

Parameters:
  • download_dir (str) – The download directory

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

Returns:

(list of Path)

get_tte(download_dir, dets=None, **kwargs)

Download the TTE files for the trigger.

Parameters:
  • download_dir (str) – The download directory

  • dets (list, optional) – The detectors’ data to download. If omitted, will download all.

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

Returns:

(list of Path)

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.

ls_cat_files()

List all catalog files for the trigger.

Returns:

(list of str)

ls_cspec()

List all CSPEC files for the trigger.

Returns:

(list of str)

ls_ctime()

List all CTIME files for the trigger.

Returns:

(list of str)

ls_lightcurve()

List all lightcurve plots for the trigger.

Returns:

(list of str)

ls_localization()

List all localization files for the trigger.

Returns:

(list of str)

ls_rsp(ctime=True, cspec=True)

List all response Type-I files for the trigger.

Parameters:
  • ctime (bool, optional) – If True, list the ctime responses. Default is True.

  • cspec (bool, optional) – If True, list the cspec responses. Default is True.

Returns:

(list of str)

ls_rsp2(ctime=True, cspec=True)

List all response Type-II files for the trigger.

Parameters:
  • ctime (bool, optional) – If True, list the ctime responses. Default is True.

  • cspec (bool, optional) – If True, list the cspec responses. Default is True.

Returns:

(list of str)

ls_trigdat()

List the trigger data (trigdat) file for the trigger.

Returns:

(list of str)

ls_tte()

List all TTE files for the trigger.

Returns:

(list of str)