BatseTriggerFinder¶
- class gdt.missions.cgro.batse.finders.BatseTriggerFinder(*args, protocol='HTTPS', **kwargs)[source]¶
Bases:
BatseFinderA class that interfaces with the HEASARC FTP trigger directories. An instance of this class will represent the available files associated with a single trigger.
An instance can be created without a trigger number, however a trigger number will need to be set by
cd(tnum)to query and download files. An instance can also be changed from one trigger number to another without having to create a new instance. If multiple instances are created and exist simultaneously, they will all use a single FTP connection.- Parameters:
tnum (str, optional) – A valid trigger number
- num_files¶
Number of files in the current directory
- Type:
int
- files¶
The list of files in the current directory
- Type:
list of str
Attributes Summary
The list of files in the current directory
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.
get_cont(download_dir[, dets])Download the CONT files for the trigger.
get_discsc(download_dir[, dets])Download the combined LAD discriminator data for the trigger.
get_discsp(download_dir[, dets])Download the spectroscopy detector discriminator data for the trigger.
get_drm(download_dir[, drm_type, dets])Download the detector response matrices for different data types.
get_dsherb(download_dir[, dets])Download the spectroscopy high energy resolution data for the trigger.
get_her(download_dir[, dets])Download the high energy resolution LAD data for the trigger.
get_herb(download_dir[, dets])Download the high energy resolution LAD data for the trigger.
get_ibdb(download_dir[, ibdb_type])Download the IBDB (Individual Burst DataBase) files for different data types.
get_lightcurves(download_dir, **kwargs)Download the lightcurve image files.
get_mer(download_dir, **kwargs)Download the medium energy resolution data for the trigger.
get_sdisc(download_dir[, dets])Download the spectroscopy detector discriminator data for the trigger.
get_sher(download_dir[, dets])Download the high energy resolution SD data for the trigger.
get_sherb(download_dir[, dets])Download the high energy resolution SD burst data for the trigger.
get_tte(download_dir, **kwargs)Download the time-tagged event data for the trigger.
get_tts(download_dir[, dets])Download the time-to-spill data for the trigger.
ls(*args[, fullpath])List the contents of a directory
ls_cont()List the continuous data for the trigger.
List the combined LAD discriminator data for the trigger.
List the spectroscopy detector discriminator data for the trigger.
ls_drm()List the TTS data for the trigger.
List the spectroscopy high energy resolution data for the trigger.
ls_her()List the high energy resolution LAD data for the trigger.
ls_herb()List the high energy resolution LAD data for the trigger.
ls_ibdb()List the IBDB (Individual Burst DataBase) files for the trigger.
List all lightcurve plots for the trigger.
ls_mer()List the medium energy resolution data for the trigger.
ls_sdisc()List the spectroscopy detector discriminator data for the trigger.
ls_sher()List the high energy resolution SD data for the trigger.
ls_sherb()List the SHERB data for the trigger.
ls_tte()List the time-tagged event data for the trigger.
ls_tts()List the time-to-spill data 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(*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)
- get_cont(download_dir, dets=None, **kwargs)[source]¶
Download the CONT 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) – The filenames of the downloaded files
- get_discsc(download_dir, dets=None, **kwargs)[source]¶
Download the combined LAD discriminator data 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) – The filenames of the downloaded files
- get_discsp(download_dir, dets=None, **kwargs)[source]¶
Download the spectroscopy detector discriminator data 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) – The filenames of the downloaded files
- get_drm(download_dir, drm_type='all', dets=None, **kwargs)[source]¶
Download the detector response matrices for different data types. The valid data types, to be passed via drm_type are:
‘cont’, ‘discsc’, ‘discsp’, ‘dsherb’, ‘her’, ‘herb’, ‘mer’, ‘sher’, ‘sherb’, ‘stte’, ‘tte_list’
- Parameters:
download_dir (str) – The download directory
drm_type (str or list of str) – The type(s) of DRMs to download. Default is ‘all’, which downloads all DRMs.
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) – The filenames of the downloaded files
- get_dsherb(download_dir, dets=None, **kwargs)[source]¶
Download the spectroscopy high energy resolution data 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) – The filenames of the downloaded files
- get_her(download_dir, dets=None, **kwargs)[source]¶
Download the high energy resolution LAD data 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) – The filenames of the downloaded files
- get_herb(download_dir, dets=None, **kwargs)[source]¶
Download the high energy resolution LAD data 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) – The filenames of the downloaded files
- get_ibdb(download_dir, ibdb_type='all', **kwargs)[source]¶
Download the IBDB (Individual Burst DataBase) files for different data types. The valid data types, to be passed via ibdb_type are:
‘continuous’, ‘discla’, ‘discsc’, ‘discsp’, ‘her_cor’, ‘her’, ‘herb’, ‘info*’, ‘mer’, ‘preb’, ‘sher_cor’, ‘sher’, ‘sherb’, ‘stte’, ‘tte’, ‘tts’
- Parameters:
download_dir (str) – The download directory
ibdb_type (str or list of str) – The type(s) of IBDBs to download. Default is ‘all’, which downloads all IBDBs for the trigger.
verbose (bool, optional) – If True, will output the download status. Default is True.
- Returns:
(list) – The filenames of the downloaded files
- get_lightcurves(download_dir, **kwargs)[source]¶
Download the lightcurve image files.
- Parameters:
download_dir (str) –
The download directory verbose (bool, optional): If True, will output the download status.
Default is True.
- Returns:
(list) – The filenames of the downloaded files
- get_mer(download_dir, **kwargs)[source]¶
Download the medium energy resolution data 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) – The filenames of the downloaded files
- get_sdisc(download_dir, dets=None, **kwargs)[source]¶
Download the spectroscopy detector discriminator data 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) – The filenames of the downloaded files
- get_sher(download_dir, dets=None, **kwargs)[source]¶
Download the high energy resolution SD data 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) – The filenames of the downloaded files
- get_sherb(download_dir, dets=None, **kwargs)[source]¶
Download the high energy resolution SD burst data 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) – The filenames of the downloaded files
- get_tte(download_dir, **kwargs)[source]¶
Download the time-tagged event data 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) – The filenames of the downloaded files
- get_tts(download_dir, dets=None, **kwargs)[source]¶
Download the time-to-spill data 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) – The filenames of the downloaded files
- 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_discsc()[source]¶
List the combined LAD discriminator data for the trigger.
- Returns:
(list of str)
- ls_discsp()[source]¶
List the spectroscopy detector discriminator data for the trigger.
- Returns:
(list of str)
- ls_dsherb()[source]¶
List the spectroscopy high energy resolution data for the trigger.
- Returns:
(list of str)
- ls_ibdb()[source]¶
List the IBDB (Individual Burst DataBase) files for the trigger.
- Returns:
(list of str)