threeML.utils.data_download.Fermi_LAT package
Submodules
threeML.utils.data_download.Fermi_LAT.download_LAT_data module
- class threeML.utils.data_download.Fermi_LAT.download_LAT_data.DivParser(desiredDivName)[source]
Bases:
HTMLParser
Extract data from a <div></div> tag
- threeML.utils.data_download.Fermi_LAT.download_LAT_data.download_LAT_data(ra: float, dec: float, radius: float, tstart: float, tstop: float, time_type: str, data_type: str = 'Photon', destination_directory: str = '.', Emin: float = 30.0, Emax: float = 1000000.0) Path [source]
Download data from the public LAT data server (of course you need a working internet connection). Data are selected in a circular Region of Interest (cone) centered on the provided coordinates.
Example:
` > download_LAT_data(195.6, -35.4, 12.0, '2008-09-16 01:00:23', '2008-09-18 01:00:23', time_type='Gregorian', destination_directory='my_new_data') `
- Parameters:
ra – R.A. (J2000) of the center of the ROI
dec – Dec. (J2000) of the center of the ROI
radius – radius (in degree) of the center of the ROI (use a larger radius than what you will need in the
analysis) :param tstart: start time for the data :param tstop: stop time for the data :param time_type: type of the time input (one of MET, Gregorian or MJD) :param data_type: type of data to download. Use Photon if you use Source or cleaner classes, Extended otherwise. Default is Photon. :param destination_directory: directory where you want to save the data (default: current directory) :param Emin: minimum photon energy (in MeV) to download (default: 30 MeV, must be between 30 and 1e6 MeV) :param Emax: maximum photon energy (in MeV) to download (default: 1e6 MeV, must be betwen 30 and 1e6 MeV ) :return: the path to the downloaded FT1 and FT2 file
threeML.utils.data_download.Fermi_LAT.download_LLE_data module
- threeML.utils.data_download.Fermi_LAT.download_LLE_data.cleanup_downloaded_LLE_data(detector_information_dict)[source]
deletes data downloaded with download_LLE_trigger_data. :param detector_information_dict: the return dictionary from download_LLE_trigger_data
- threeML.utils.data_download.Fermi_LAT.download_LLE_data.download_LLE_trigger_data(trigger_name, destination_directory='.')[source]
Download the latest Fermi LAT LLE and RSP files from the HEASARC server. Will get the latest file versions. If the files already exist in your destination directory, they will be skipped in the download process. The output dictionary can be used as input to the FermiLATLLELike class.
example usage: download_LLE_trigger_data(‘080916009’, destination_directory=’.’)
- Parameters:
trigger_name – trigger number (str) with no leading letter e.g. ‘080916009’
destination_directory – download directory
- Returns:
a dictionary with information about the download