Basic Usage#

Setup#

This tutorial notebook will walk you through the basic usage of the OTTER API. First make sure you followed the installation structions to install otter and the data. First the imports we will need for the notebook

[1]:
import os
import otter

from astropy.coordinates import SkyCoord
from astropy import units as u

import matplotlib.pyplot as plt
import numpy as np

We can initiate the otter database object and then get metadata of all of the data. From there, we can easily get the default redshift for each object and histogram them.

Note: When calling get_meta it does not return the photometry. This is to make metadata queries much quicker. See below for also accessing the photometry along with metadata.

[2]:
db = otter.Otter()
meta = db.get_meta(save=False)
redshifts = np.array([t.get_redshift() for t in meta if "distance" in t and len(t["distance"]) > 0])
fig, ax = plt.subplots()
ax.hist(redshifts.astype(float), bins=20)
ax.set_ylabel("N")
ax.set_xlabel("z")
Attempting to login to https://otter.idies.jhu.edu/api with the following credentials:
username: user-guest
password: test
[2]:
Text(0.5, 0, 'z')
../_images/examples_basic_usage_3_2.png

Querying the OTTER Catalog#

Now that we have the catalog read in an initiated, we can query it for the data we want. Say we want to get all of the data associated with the TDE Sw J1644+57, we can use

[3]:
swj1644_list = db.query(names='Sw J1644+57')
swj1644_list
[3]:
[Transient(
        Name: Sw J1644+57,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'coordinate', 'filter_alias', 'photometry', 'reference_alias', 'distance', 'host', 'date_reference', 'schema_version'])
 )]

Which you can see is a list of otter Transient objects. You can essentially treat this like a python dictionary with some benefits:

  • It has additional helpful methods to access and clean the data

  • You can use the HDF5 slash-syntax. Ex.) swj1644['name/alias'] will give you all of the aliases from the alias subkey in the name key

[4]:
swj1644 = swj1644_list[0] # just to get rid of the list

swj1644['name/alias']
[4]:
[{'value': 'GRB 110328A', 'reference': ['2011Sci...333..203B']},
 {'value': 'Swift J1644+57',
  'reference': ['2017ApJ...838..149A',
   '2011Sci...333..203B',
   '2023PASP..135c4101G']},
 {'value': 'Sw J1644+57', 'reference': ['Swift', '2011Natur.476..425Z']},
 {'value': 'Swift J164449.3+573451', 'reference': ['2011Sci...333..203B']},
 {'value': 'SwJ1644+57',
  'reference': ['2011Natur.476..425Z', '2011Natur.476..425Z']}]

So this TDE has multiple aliases associated with it! Let’s try to query by a different one

[5]:
db.query(names='GRB 110328A')[0]
[5]:
Transient(
        Name: Sw J1644+57,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'coordinate', 'filter_alias', 'photometry', 'reference_alias', 'distance', 'host', 'date_reference', 'schema_version'])
)

And look at that, it gives us the same answer! We can also query by a list of names which will give us a list of transient objects back:

[6]:
db.query(names=['Sw J1644+57', '2018hyz', '2018zr'])
[6]:
[Transient(
        Name: Sw J1644+57,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'coordinate', 'filter_alias', 'photometry', 'reference_alias', 'distance', 'host', 'date_reference', 'schema_version'])
 ),
 Transient(
        Name: 2018hyz,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'schema_version', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2018zr,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'host', 'schema_version', 'filter_alias', 'photometry'])
 )]

We can also search OTTER for anything within a certain redshift range, let’s look for everything between \(0.1 < z <0.2\):

[7]:
db.query(minz=0.1, maxz=0.2)
[7]:
[Transient(
        Name: 2021ack,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: iPTF16axa,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'coordinate', 'filter_alias', 'date_reference', 'distance', 'host', 'schema_version'])
 ),
 Transient(
        Name: J141036,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2021utq,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: Dougie,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2021lo,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: J030257,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2024qab,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: J113527,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2021qxv,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'host', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2021jjm,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2022czy,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'classification', 'name', 'reference_alias', 'photometry', 'filter_alias', 'distance', 'date_reference'])
 ),
 Transient(
        Name: SRGE J135514.8+311605,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: SRGE J071310.6+725627,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: J145851,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2021crk,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2021axu,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: eRASSt J234403-352640,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'classification', 'date_reference', 'photometry', 'filter_alias', 'reference_alias'])
 ),
 Transient(
        Name: 2019meg,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: DES14C1kia,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'coordinate', 'filter_alias', 'date_reference', 'distance', 'host', 'schema_version'])
 ),
 Transient(
        Name: SRGE J091747.6+524821,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: SRGE J133053.3+734824,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: PTF10nuj,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: J155223,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2020ddv,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: SRGE J161001.2+330121,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: PTF09djl,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 3XMM J150052.0+015452,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'schema_version', 'name', 'reference_alias', 'date_reference', 'host'])
 ),
 Transient(
        Name: J133837,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: PS1-10jh,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: RX J1420+53,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2017bcc,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'host', 'schema_version', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2020abri,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'coordinate', 'distance', 'name', 'date_reference', 'classification', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2022hvp,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2019bhf,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2022agi,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'host', 'schema_version', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: CSS100217,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: J094608,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'schema_version', 'name', 'reference_alias', 'host'])
 ),
 Transient(
        Name: 2019lwu,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2019mha,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: 2020opy,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'host', 'schema_version', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: SDSSJ1311,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: SRGE J013204.6+122236,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: TDE1,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: D23H-1,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: J091225,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2017eqx,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'host', 'schema_version', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: 2021uvz,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2018lni,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: J233454,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'schema_version', 'name', 'reference_alias', 'host'])
 ),
 Transient(
        Name: 2022rz,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: PTF09axc,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: 2021uqv,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 2019cho,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: 2021jsg,
        Keys: dict_keys(['_key', '_id', '_rev', 'reference_alias', 'classification', 'coordinate', 'distance', 'name', 'date_reference', 'filter_alias', 'photometry'])
 ),
 Transient(
        Name: 3XMM J152130.7+074916,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: SRGE J144738.4+671821,
        Keys: dict_keys(['_key', '_id', '_rev', 'schema_version', 'name', 'classification', 'distance', 'coordinate', 'date_reference', 'host', 'reference_alias'])
 ),
 Transient(
        Name: OGLE17aaj,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'host'])
 ),
 Transient(
        Name: OGLE16aaa,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'date_reference', 'schema_version', 'name', 'reference_alias', 'filter_alias', 'photometry', 'host'])
 ),
 Transient(
        Name: 2XMM J123103.2+110648,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'distance', 'schema_version', 'name', 'reference_alias', 'date_reference', 'host'])
 ),
 Transient(
        Name: SDSSJ1201,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: 2022csn,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'classification', 'date_reference', 'schema_version', 'reference_alias'])
 ),
 Transient(
        Name: 2023ugy,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'classification', 'date_reference', 'schema_version', 'reference_alias'])
 ),
 Transient(
        Name: 2023kvy,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'classification', 'date_reference', 'schema_version', 'reference_alias'])
 )]

WOW! That’s a lot of TDEs. But that’s expected since many of them are discovered nearby. What if we look for everything with a redshift over 1?

[8]:
db.query(minz=1)
[8]:
[Transient(
        Name: Swift J2058.4+0516,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'date_reference', 'distance', 'filter_alias', 'host', 'name', 'photometry', 'reference_alias', 'schema_version'])
 ),
 Transient(
        Name: 2022cmc,
        Keys: dict_keys(['_key', '_id', '_rev', 'coordinate', 'name', 'reference_alias', 'date_reference', 'classification', 'schema_version', 'filter_alias', 'photometry', 'distance'])
 ),
 Transient(
        Name: CXOU J0332,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'coordinate', 'date_reference', 'schema_version', 'name', 'reference_alias', 'distance', 'host'])
 )]

Ah makes sense, it is just those super bright jetted TDEs!

Cone Searches#

Moving on from general querys, we can perform cone searches on the catalog using the otter.Otter.cone_search method. Let’s do this for objects within 15 degrees of the ecliptic pole.

[9]:
# first construct a SkyCoord
coord = SkyCoord('18h00m00.0s', '+66d33m38.84s', unit=(u.hourangle, u.deg))
radius = (15*u.deg).to(u.arcsec).value # must just provide it as a float

db.cone_search(coord, radius=radius)
[9]:
[Transient(
        Name: RX J1624+75,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'reference_alias', 'photometry', 'distance', 'coordinate', 'filter_alias', 'date_reference', 'host', 'schema_version'])
 ),
 Transient(
        Name: WTP14adeqka,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'date_reference', 'classification', 'photometry', 'filter_alias', 'reference_alias'])
 ),
 Transient(
        Name: VT J1752,
        Keys: dict_keys(['_key', '_id', '_rev', 'name', 'coordinate', 'distance', 'classification', 'schema_version', 'reference_alias'])
 ),
 Transient(
        Name: Sw J1644+57,
        Keys: dict_keys(['_key', '_id', '_rev', 'classification', 'name', 'coordinate', 'filter_alias', 'photometry', 'reference_alias', 'distance', 'host', 'date_reference', 'schema_version'])
 )]

Sample Selection#

Given that OTTER includes many transients that are only classified based on photometric information, we provide numerous flags for selecting a subsamble of events based on your scientific goals:

  1. spec_classed is True if the event is spectroscopically classified

  2. unambiguous is True if the community unambiguously agrees on this classification

  3. class_confidence_threshold let’s you set a minimum for the “confidence” flag C

As an example, to select all of the events that are spectroscopically classified as TDEs you would do

[10]:
spec_classed_tdes = db.query(classification="TDE", spec_classed=True)

len(spec_classed_tdes)
[10]:
144

Or, to get all events that unambiguously spectrocsopically classified as TDEs:

[11]:
gold_spec_classed = db.query(classification="TDE", spec_classed=True, unambiguous=True)
len(gold_spec_classed)
[11]:
141

We can then see the TDE candidates that have classification spectra but their true nature is still up for debate:

[12]:
set(t.default_name for t in spec_classed_tdes) - set(t.default_name for t in gold_spec_classed)
[12]:
{'2017bcc', '2018dyk', '2018gn'}

Photometry#

Finally, we can also get the cleaned up photometry associated with the transients. Let’s use ['Sw J1644+57', '2018hyz', 'ASASSN-14li'] and get all of the associated photometry. This is not the fastest method but is worth the wait because you get out an astropy Table that you can then filter yourself!

[13]:
phot = db.get_phot(names=['Sw J1644+57', '2018hyz', 'ASASSN-14li'])
phot
ASASSN-14li has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
Sw J1644+57 has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
Unable to apply the source mapping because '2021ApJ...908....4V'
2018hyz has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
[13]:
Table length=2301
nameconverted_fluxconverted_flux_errconverted_dateconverted_waveconverted_freqconverted_flux_unitconverted_date_unitconverted_wave_unitconverted_freq_unitfilter_nameobs_typeupperlimitreferencehuman_readable_refstelescope
str11float64float64float64float64float64str7str3str2str3str9str5boolobjectobjectstr11
ASASSN-14li15.3836495489151090.05056657459124179551505.66214137470.01.4mag(AB)MJDnmGHzLradioFalse2016Sci...351...62Vvan Velzen et al. (2016)FIRST
ASASSN-14li16.1151416192329040.1275277897658240559598.9181088769.556025361.6555000000000002mag(AB)MJDnmGHzLradioFalse2024ApJ...974..241AAnumarlapudi, Akash et al. (2024)RACS.high
ASASSN-14li15.251518780601920.0895449758386573558597.5337794318.87323940.8875mag(AB)MJDnmGHzUHFradioFalse2024ApJ...974..241AAnumarlapudi, Akash et al. (2024)RACS.low
ASASSN-14li15.4540052476296520.077073978008168959664.7337794318.87323940.8875mag(AB)MJDnmGHzUHFradioFalse2024ApJ...974..241AAnumarlapudi, Akash et al. (2024)RACS.low
ASASSN-14li15.931198197908840.1136340695243814959213.0219226660.329067621.3675000000000002mag(AB)MJDnmGHzLradioFalse2024ApJ...974..241AAnumarlapudi, Akash et al. (2024)RACS.mid
ASASSN-14li15.6638344345960140.01402589904361855357015.68915614190.52083333219.200000000000003mag(AB)MJDnmGHzKradioFalse2016ApJ...819L..25AAlexander et al. (2016)VLA
ASASSN-14li15.8628903798807530.01684818360727350557015.68912236426.85714285424.5mag(AB)MJDnmGHzKradioFalse2016ApJ...819L..25AAlexander et al. (2016)VLA
ASASSN-14li15.697416581880680.01446650320205683257028.37159958491.599999995.0mag(AB)MJDnmGHzCradioFalse2016ApJ...819L..25AAlexander et al. (2016)VLA
ASASSN-14li15.6474250108400440.00921034037197618357028.37142224289.8591549257.1mag(AB)MJDnmGHzCradioFalse2016ApJ...819L..25AAlexander et al. (2016)VLA
................................................
2018hyz19.837385163622670.00557019263046023758996.26097222231192.81554940.1348547717mag(AB)MJDnmGHzUVW2uvoirFalse['2020MNRAS.497.1925G']['2020MNRAS.497.1925G']Swift
2018hyz28.47643465563401612.91052483532805458434.87620169790.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz27.51533064911688312.80137643225810858456.37253195720.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz27.8166581206439813.82640584422370958469.56704950120.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz28.66094042649915614.74149885092366658494.47760801740.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz28.89104341978725516.36281412638298658546.52061272340.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz28.7830393212964230.4273165848568258668.11042127320.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz27.8050641743322020.058998.20421397340.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayTrue['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz28.7528551186250228.84090151652403559540.3230889630.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayFalse['2024ApJ...966..160G']['2024ApJ...966..160G']Swift
2018hyz27.223972672612650.059684.46570375580.127818761271340482345449564.8223705mag(AB)MJDnmGHz0.3 - 10xrayTrue['2024ApJ...966..160G']['2024ApJ...966..160G']Swift

We can also filter it more when we call the get_phot method by only requesting a specific observatory type from the options of radio, uvoir, or xray. So, say we just want all the radio data associated with these three objects. And, since radio data is rarely reported as AB magnitudes, lets get the flux out as a flux density in units of microjanskies. We can also request that it returns a pandas DataFrame instead of an astropy Table using the return_type='pandas' keyword.

[14]:
radiophot = db.get_phot(names=['Sw J1644+57', '2018hyz', 'ASASSN-14li'], obs_type='radio',
                        flux_unit='uJy', return_type='pandas')
radiophot
ASASSN-14li has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
Sw J1644+57 has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
2018hyz has at least one photometry point where it is unclear if a host subtraction was performed. This can be especially detrimental for UV data. Please consider filtering out UV/Optical/IR or radio rows where the corr_host column is null/None/NaN.
[14]:
name converted_flux converted_flux_err converted_date converted_wave converted_freq converted_flux_unit converted_date_unit converted_wave_unit converted_freq_unit filter_name obs_type upperlimit reference human_readable_refs telescope
0 ASASSN-14li 2550.0 140.0 51505.66 2.141375e+08 1.4000 uJy MJD nm GHz L radio False 2016Sci...351...62V van Velzen et al. (2016) FIRST
1 ASASSN-14li 1300.0 180.0 59598.90 1.810888e+08 1.6555 uJy MJD nm GHz L radio False 2024ApJ...974..241A Anumarlapudi, Akash et al. (2024) RACS.high
2 ASASSN-14li 2880.0 280.0 58597.50 3.377943e+08 0.8875 uJy MJD nm GHz UHF radio False 2024ApJ...974..241A Anumarlapudi, Akash et al. (2024) RACS.low
3 ASASSN-14li 2390.0 200.0 59664.70 3.377943e+08 0.8875 uJy MJD nm GHz UHF radio False 2024ApJ...974..241A Anumarlapudi, Akash et al. (2024) RACS.low
4 ASASSN-14li 1540.0 190.0 59213.00 2.192267e+08 1.3675 uJy MJD nm GHz L radio False 2024ApJ...974..241A Anumarlapudi, Akash et al. (2024) RACS.mid
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
123 2018hyz 1388.0 NaN 59400.64 5.995849e+07 5.0000 uJy MJD nm GHz C radio False [2022ApJ...938...28C] Cendes et al. (2022) NaN
124 2018hyz 2939.0 NaN 59554.64 5.995849e+07 5.0000 uJy MJD nm GHz C radio False [2022ApJ...938...28C] Cendes et al. (2022) NaN
125 2018hyz 4381.0 NaN 59627.64 5.995849e+07 5.0000 uJy MJD nm GHz C radio False [2022ApJ...938...28C] Cendes et al. (2022) NaN
126 2018hyz 4807.0 NaN 59679.64 5.995849e+07 5.0000 uJy MJD nm GHz C radio False [2022ApJ...938...28C] Cendes et al. (2022) NaN
127 2018hyz 7837.0 NaN 59724.64 5.450772e+07 5.5000 uJy MJD nm GHz C radio False [2022ApJ...938...28C] Cendes et al. (2022) NaN

791 rows × 16 columns

Then we can do things like plot the light curve of all of these values!

[15]:
fig, axs = plt.subplots(1,3, figsize=(18,6))

for (name, data), ax in zip(radiophot.groupby('name'), axs):

    discovery_date = db.get_meta(names=name)[0].get_discovery_date().mjd

    for (f, df) in data.groupby('filter_name'):
        fig = otter.plotter.plotter.plot_light_curve(date=df.converted_date - discovery_date,
                                             flux=df.converted_flux,
                                             flux_err=df.converted_flux_err,
                                             ax=ax,
                                             fig=fig,
                                             marker='o',
                                             linestyle='none',
                                             label=f'{name}: {f}')

    ax.legend()
    ax.set_xlim(10,4000)
    ax.set_xscale("log")
    ax.set_yscale("log")
../_images/examples_basic_usage_30_0.png

Where the colors represent the observation frequency! Obviously these are not pubblication ready but they are at least a good way to easily visualize the data while working with it.