IntegralClass

class astroquery.esa.integral.IntegralClass(auth_session=None)[source]

Bases: BaseVOQuery, BaseQuery

Class to init ESA Integral Module and communicate with isla

Attributes Summary

tap

Methods Summary

download_science_windows(*[, ...])

Method to download science windows associated to one of these parameters: science_windows, observation_id, revolution or proposal

get_bands()

Get the bands available in ISLA

get_epochs(*[, target_name, instrument, band])

Retrieve the INTEGRAL epochs associated to a target and an instrument or a band

get_instrument_band_map()

Maps the bands and instruments included in ISLA

get_instruments()

Get the instruments available in ISLA

get_job(jobid)

Returns the job corresponding to an ID.

get_job_list(*[, phases, after, last, ...])

Returns all the asynchronous jobs

get_long_term_timeseries(target_name, *[, ...])

Method to download long term timeseries associated to an epoch and instrument or band

get_mosaic(epoch[, instrument, band, path, ...])

Method to download mosaics associated to an epoch and instrument or band

get_observations(*[, target_name, ...])

Retrieve the INTEGRAL observations associated to target name, time range and/or revolution

get_short_term_timeseries(target_name, epoch)

Method to download short term timeseries associated to an epoch and instrument or band

get_source_metadata(target_name)

Retrieve the metadata associated to an INTEGRAL target

get_sources(target_name, *[, async_job, ...])

Retrieve the coordinates of an INTEGRAL source

get_spectra(target_name, epoch[, ...])

Method to download mosaics associated to an epoch and instrument or band

get_table(table)

Gets the specified table from ISLA TAP

get_tables(*[, only_names])

Gets all public tables within ISLA TAP

get_timeline(coordinates, *[, radius])

Retrieve the INTEGRAL timeline associated to coordinates and radius

login(*[, user, password])

Performs a login.

logout()

Performs a logout.

query_tap(query, *[, async_job, ...])

Launches a synchronous or asynchronous job to query the ISLA tap

Attributes Documentation

tap

Methods Documentation

download_science_windows(*, science_windows=None, observation_id=None, revolution=None, proposal=None, output_file=None, cache=False, read_fits=True)[source]

Method to download science windows associated to one of these parameters: science_windows, observation_id, revolution or proposal

Parameters:
science_windowslist of str, optional

Science Windows to download

observation_id: str, optional

Observation ID associated to science windows

revolution: str, optional

Revolution associated to science windows

proposal: str, optional

Proposal ID associated to science windows

output_file: str, optional

File name and path for the downloaded file

cache: bool, optional, default False

Flag to determine if the file is stored in the cache or not

read_fits: bool, optional, default True

Open the downloaded file and parse the existing FITS files

Returns:
If read_fits=True, a list with objects containing filename, path and FITS file opened with the
science windows. If read_fits=False, the path of the downloaded file
get_bands()[source]

Get the bands available in ISLA

get_epochs(*, target_name=None, instrument=None, band=None)[source]

Retrieve the INTEGRAL epochs associated to a target and an instrument or a band

Parameters:
target_namestr, optional

target name to be requested, mandatory

instrumentstr, optional

Possible values are in isla.instruments object

bandstr, optional

Possible values are in isla.bandsobject

Returns:
An astropy.table object containing the available epochs
get_instrument_band_map()[source]

Maps the bands and instruments included in ISLA

get_instruments()[source]

Get the instruments available in ISLA

get_job(jobid)[source]

Returns the job corresponding to an ID. Note that the caller must be able to see the job in the current security context.

Parameters:
jobidstr, mandatory

ID of the job to view

Returns:
JobSummary corresponding to the job ID
get_job_list(*, phases=None, after=None, last=None, short_description=True)[source]

Returns all the asynchronous jobs

Parameters:
phaseslist of str

Union of job phases to filter the results by.

afterdatetime

Return only jobs created after this datetime

lastint

Return only the most recent number of jobs

short_descriptionflag - True or False

If True, the jobs in the list will contain only the information corresponding to the TAP ShortJobDescription object (job ID, phase, run ID, owner ID and creation ID) whereas if False, a separate GET call to each job is performed for the complete job description

Returns:
A list of Job objects
get_long_term_timeseries(target_name, *, instrument=None, band=None, path='', filename=None, cache=False, read_fits=True)[source]

Method to download long term timeseries associated to an epoch and instrument or band

Parameters:
target_namestr, mandatory

target name to be requested, mandatory

instrumentstr

Possible values are in isla.instruments object

bandstr

Possible values are in isla.bandsobject

path: str, optional

Path for the downloaded file

filename: str, optional

Filename for the downloaded file

cache: bool, optional, default False

Flag to determine if the file is stored in the cache or not

read_fits: bool, optional, default True

Open the downloaded file and parse the existing FITS files

Returns:
If read_fits=True, a list with objects containing filename, path and FITS file opened with long
term timeseries. If read_fits=False, the path of the downloaded file
get_mosaic(epoch, instrument=None, band=None, *, path='', filename=None, cache=False, read_fits=True)[source]

Method to download mosaics associated to an epoch and instrument or band

Parameters:
epochstr, mandatory

reference epoch for the short term timeseries

instrumentstr

Possible values are in isla.instruments object

bandstr

Possible values are in isla.bandsobject

cache: bool, optional, default False

Flag to determine if the file is stored in the cache or not

path: str, optional

Path for the downloaded file

filename: str, optional

Filename for the downloaded file

read_fits: bool, optional, default True

Open the downloaded file and parse the existing FITS files

Returns:
If read_fits=True, a list with objects containing filename, path and FITS file opened with mosaics.
If read_fits=False, a list of paths of the downloaded files
get_observations(*, target_name=None, coordinates=None, radius=14.0, start_time=None, end_time=None, start_revno=None, end_revno=None, async_job=False, output_file=None, output_format=None, verbose=False)[source]

Retrieve the INTEGRAL observations associated to target name, time range and/or revolution

Parameters:
target_name: str, optional

target name to be requested

coordinates: str or SkyCoord, optional

coordinates of the center in the cone search

radius: float or quantity, optional, default value 14 degrees

radius in degrees (int, float) or quantity of the cone_search

start_time: str in UTC or datetime, optional

start time of the observation

end_time: str in UTC or datetime, optional

end time of the observation

start_revno: string, optional

start revolution number, as a four-digit string with leading zeros e.g. 0352

end_revno: string, optional

end revolution number, as a four-digit string with leading zeros e.g. 0353

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

output_filestr, optional, default None

file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

output_formatstr, optional, default ‘votable’

results format

verbosebool, optional, default ‘False’

flag to display information about the process

Returns:
An astropy.table object containing the results
get_short_term_timeseries(target_name, epoch, instrument=None, band=None, path='', filename=None, cache=False, read_fits=True)[source]

Method to download short term timeseries associated to an epoch and instrument or band

Parameters:
target_namestr, mandatory

target name to be requested, mandatory

epochstr, mandatory

reference epoch for the short term timeseries

instrumentstr, optional

Possible values are in isla.instruments object

bandstr, optional

Possible values are in isla.bandsobject

path: str, optional

Path for the downloaded file

filename: str, optional

Filename for the downloaded file

cache: bool, optional, default False

Flag to determine if the file is stored in the cache or not

read_fits: bool, optional, default True

Open the downloaded file and parse the existing FITS files

Returns:
If read_fits=True, a list with objects containing filename, path and FITS file opened with short
term timeseries. If read_fits=False, the path of the downloaded file
get_source_metadata(target_name)[source]

Retrieve the metadata associated to an INTEGRAL target

Parameters:
target_namestr, mandatory

target name to be requested, mandatory

Returns:
An object containing te metadata from the target
get_sources(target_name, *, async_job=False, output_file=None, output_format=None)[source]

Retrieve the coordinates of an INTEGRAL source

Parameters:
target_namestr, mandatory

target name to be requested, mandatory

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

output_filestr, optional, default None

file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

output_formatstr, optional, default ‘votable’

results format

Returns:
An astropy.table object containing the results
get_spectra(target_name, epoch, instrument=None, band=None, *, path='', filename=None, cache=False, read_fits=True)[source]

Method to download mosaics associated to an epoch and instrument or band

Parameters:
target_namestr, mandatory

target name to be requested, mandatory

epochstr, mandatory

reference epoch for the short term timeseries

instrumentstr

Possible values are in isla.instruments object

bandstr

Possible values are in isla.bandsobject

path: str, optional

Path for the downloaded file

filename: str, optional

Filename for the downloaded file

cache: bool, optional, default False

Flag to determine if the file is stored in the cache or not

read_fits: bool, optional, default True

Open the downloaded file and parse the existing FITS files

Returns:
If read_fits=True, a list with objects containing filename, path and FITS file opened with spectra.
If read_fits=False, a list of paths of the downloaded files
get_table(table)[source]

Gets the specified table from ISLA TAP

Parameters:
tablestr, mandatory

full qualified table name (i.e. schema name + table name)

Returns:
A table object
get_tables(*, only_names=False)[source]

Gets all public tables within ISLA TAP

Parameters:
only_namesbool, optional, default False

True to load table names only

Returns:
A list of table objects
get_timeline(coordinates, *, radius=14)[source]

Retrieve the INTEGRAL timeline associated to coordinates and radius

Parameters:
coordinates: str or SkyCoord, mandatory

RA and Dec of the source

radius: float or quantity, optional, default value 14 degrees

radius in degrees (int, float) or quantity of the cone_search

Returns:
An object containing:

totalItems: a counter for the number of items retrieved fraFC: totEffExpo: timeline: An astropy.table object containing the results for scwExpo, scwRevs, scwTimes and scwOffAxis

login(*, user=None, password=None)[source]

Performs a login. TAP+ only User and password shall be used

Parameters:
userstr, mandatory, default None

Username. If no value is provided, a prompt to type it will appear

passwordstr, mandatory, default None

User password. If no value is provided, a prompt to type it will appear

logout()[source]

Performs a logout. TAP+ only

query_tap(query, *, async_job=False, output_file=None, output_format='votable')[source]

Launches a synchronous or asynchronous job to query the ISLA tap

Parameters:
querystr, mandatory

query (adql) to be executed

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

output_filestr, optional, default None

file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

output_formatstr, optional, default ‘votable’

results format

Returns:
An astropy.table object containing the results