catalogs.load_trexolists

catalogs.load_trexolists(grouped=False, trexo_file=None)

Extract the JWST programs’ data from a trexolists.csv file. Note that trexolists know targets by their host star, not by individual planets in a given system.

Parameters

Name Type Description Default
grouped - If False, return a single 1D list with observations. - If True, return a nested list of the observations per target. False
trexo_file If None, extract data from default Gen TSO location. Otherwise, a path to a trexolists.csv file. None

Returns

Name Type Description
observations 1D or 2D list of dictionaries A list of all JWST observations, where each item is a dictionary containing the observation’s details. If grouped is True, the output is a nested list, where the observations are grouped per target (host).

Examples

>>> import gen_tso.catalogs as cat
>>>
>>> # Get data as lists of individual programs:
>>> observations = cat.load_trexolists()
>>> # Show one of them:
>>> observations[98]
{'category': 'ERS',
 'pi': 'Batalha',
 'pid': '1366',
 'proprietary_period': 0,
 'target': 'WASP-39',
 'target_in_program': 'WASP-39',
 'observation': '3',
 'visit': '1',
 'status': 'Archived',
 'ra': '14:29:18.3955',
 'dec': '-03:26:40.20',
 'event': 'transit',
 'instrument': 'NIRSPEC',
 'mode': 'BOTS',
 'disperser': 'G395H',
 'filter': 'F290LP',
 'subarray': 'SUB2048',
 'readout': 'NRSRAPID',
 'groups': 70,
 'phase_start': 0.95248,
 'phase_end': 0.96275,
 'duration': 10.56,
 'plan_window': None,
 'date_start': datetime.datetime(2022, 7, 30, 20, 46, 32),
 'date_end': datetime.datetime(2022, 7, 31, 6, 21, 30),
 'planets': ['b']}
>>> # Get data grouped per target (host):
>>> observations = cat.load_trexolists(grouped=True)
>>> for obs in observations[27]:
>>>     print(f"{obs['pid']}  {obs['pi']}  {obs['instrument']} {obs['event']} ")
1366  Batalha  NIRISS transit
1366  Batalha  NIRCAM transit
1366  Batalha  NIRSPEC transit
1366  Batalha  NIRSPEC transit
2783  Powell  MIRI transit
5634  Baeyens  NIRSPEC see_phase
Back to top