Sesar 2010 RR Lyrae (Stripe 82)¶
The primary dataset available is the 483 RR Lyrae from Sesar 2010. This dataset contains observations of 483 RR Lyrae stars in Stripe 82 over approximately a decade, along with observational metadata, derived metadata, and templates derived from the code.
Observed Light Curves¶
The photometric light curves for these stars can be downloaded and accessed
fetch_rrlyrae() function. For example:
In : from gatspy.datasets import fetch_rrlyrae In : rrlyrae = fetch_rrlyrae() In : len(rrlyrae.ids) Out: 483
As you can see, the result of the download is an object which contains the data
for all 483 lightcurves. You can fetch an individual lightcurve using the
get_lightcurve method, which takes a lightcurve id as an argument:
In : lcid = rrlyrae.ids In : t, mag, dmag, filts = rrlyrae.get_lightcurve(lcid)
Let’s use matplotlib to visualize this data, and get a feel for what is there:
This gives a nice visual indication of what the data look like.
RR Lyrae Metadata¶
Along with the main lightcurve observations, the dataset tools give access to
two sets of metadata associated with the lightcurves. There is the observational
metadata available from the
get_obsmeta() method, and the fit metadata
available in the
The observational metadata includes quantities like RA, Dec, extinction, etc. Details are in Table 3 of Sesar (2010).
In : obsmeta = rrlyrae.get_obsmeta(lcid) In : print(obsmeta.dtype.names) ('id', 'RA', 'DEC', 'rExt', 'd', 'RGC', 'u', 'g', 'r', 'i', 'z', 'V', 'ugmin', 'ugmin_err', 'grmin', 'grmin_err')
The fit metadata includes quantities like the period, type of RR Lyrae, etc. Details are in Table 2 of Sesar (2010).
In : metadata = rrlyrae.get_metadata(lcid) In : print(metadata.dtype.names) ('id', 'type', 'P', 'uA', 'u0', 'uE', 'uT', 'gA', 'g0', 'gE', 'gT', 'rA', 'r0', 'rE', 'rT', 'iA', 'i0', 'iE', 'iT', 'zA', 'z0', 'zE', 'zT')
For example, we can use the period from the metadata to phase the lightcurve as follows:
In : period = metadata['P'] In : phase = (t / period) % 1
Using this, we can plot the phased lightcurve, which lets us more easily see the structure across the observations:
These periods were determined within Sesar 2010 via a template fitting approach.
RR Lyrae Templates¶
gatspy also provides a loader for the empirical RR Lyrae templates derived
in Sesar 2010. These are available via the
In : from gatspy.datasets import fetch_rrlyrae_templates In : templates = fetch_rrlyrae_templates() In : len(templates.ids) Out: 98
There are 98 templates spread among the five bands, which can be referenced by their id:
In : templates.ids[:10] Out: ['0g', '0i', '0r', '0u', '0z', '100g', '100i', '100r', '100u', '100z']
Each of these templates is normalized from 0 to 1 in phase, and from 0 to 1 in
magnitude. For example, plotting template
'100' we see:
For more information on these templates, see the discussion in Sesar (2010).
Using the RR Lyrae templates, it is possible to simulate observations of RR
gatspy provides the
class as an interface for this.
In order to make the observations as realistic as possible, these lightcurves
are based on one of the 483 Stripe 82 RR Lyrae compiled by Sesar (2010):
In : from gatspy.datasets import fetch_rrlyrae, RRLyraeGenerated In : rrlyrae = fetch_rrlyrae() In : lcid = rrlyrae.ids In : gen = RRLyraeGenerated(lcid, random_state=0) In : mag = gen.generated('g', [51080.0, 51080.5], err=0.3) In : mag.round(2) Out: array([ 17.74, 17.04])
This will create observations drawn from the best-fit template with the given magnitude error. Here let’s use the observed times and errors to compare a realization of the generated light curve to the true observed data:
Here the observed data are the faint circles, while the generated data are the small points with errorbars. With this tool, it is easy to mimic observations of fainter RR Lyrae which follow the properties of the RR Lyrae observed in Stripe 82.