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: html.parser.HTMLParser

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

handle_data(data)[source]
handle_endtag(tag)[source]
handle_starttag(tag, attributes)[source]
threeML.utils.data_download.Fermi_LAT.download_LAT_data.download_LAT_data(ra, dec, radius, tstart, tstop, time_type, data_type='Photon', destination_directory='.')[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) :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='.', outfile='ft1_merged.fits')[source]

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

Module contents