threeML.utils.data_download.Fermi_LAT.download_LAT_data module

class threeML.utils.data_download.Fermi_LAT.download_LAT_data.DivParser(desiredDivName)[source]

Bases: html.parser.HTMLParser

Extract data from a <div></div> tag

handle_starttag(tag, attributes)[source]
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) pathlib.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.


` > 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') `

  • 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_LAT_data.merge_LAT_data(ft1s, destination_directory: str = '.', outfile: str = 'ft1_merged.fits', Emin: float = 30.0, Emax: float = 1000000.0) pathlib.Path[source]