GscEventsFinder¶
- class gdt.missions.maxi.gsc.finders.GscEventsFinder(*args, protocol='HTTPS', **kwargs)[source]¶
Bases:
MaxiEventsFinderThe finder for GSC event files stored on HEASARC.
Attributes Summary
The list of files in the current directory
Number of files in the current directory
Methods Summary
cd(time, bitrate)Set the time.
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_event(download_dir[, pixels])Download the MAXI GSC event files for the day.
ls(*args[, fullpath])List the contents of a directory
ls_event()List the MAXI GSC event files for the day.
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(time, bitrate)[source]¶
Set the time. If the object was previously associated with a different time, this will effectively change the working directory to that of the new time. If the time is invalid, an exception will be raised, and no directory change will be made.
- Parameters:
time (astropy.time.Time, optional) – The time object
bitrate (str) – Either ‘low’ or ‘med’ for low and medium bitrates, respectively.
- 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: 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_event(download_dir, pixels=None, **kwargs)[source]¶
Download the MAXI GSC event files for the day.
- Parameters:
download_dir (str) – The download directory
pixels – The file associated with the HEALPixel(s) to download (0-767). If omitted, downloads all available files.
- 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.