DASCH Tutorial: RY Cnc

This slide deck will walk you through basic analysis of a DASCH lightcurve using the daschlab toolkit. It should take about 20 minutes to complete.

Navigate the slides using the buttons in the lower-right, the arrow keys on your keyboard, or swipe gestures.

Peter K. G. Williams • 2024 March

Prerequisites

We assume knowledge of astronomy and familiarity with how to use Jupyter notebooks.

In this tutorial, you only run prewritten code, so you can complete it with minimal coding knowledge. But to use daschlab for your own work, you will need to know some Python.

Format

You’re meant to follow along with these slides while working through a short daschlab notebook. (We’ll open it on the next slide!) The best setup is to have these slides and the notebook open in their own browser windows, next to each other.

Most slides have short videos showing you what to do and what to expect as you work through the notebook. There’s no audio.

To keep the tutorial focused, we barely explain the code or the science! Explore the DASCH documentation if you want to get into the details.

Starting Up

We’ll run our daschlab notebook in the cloud — no software installs needed!

Open this link in a new browser window. It will launch the sample notebook using the MyBinder service, which is free … but slow. It may take a while to start up. Time for a coffee?

(This clip and others are shortened.)

You should now have a notebook labeled “RY Cnc” open. Now is a good time to move it to its own window if you haven’t already.

With MyBinder, we have to deselect the “Simple” mode that it activates by default.

(The selection button appears in the lower left of the video, and may be covered by your browser’s video playback controls.)

Preliminaries

Run the first code cell of the notebook, in the Preliminaries section. It should work for a moment and print a message about successfully loading BokehJS.

If this doesn’t work, seek assistance from a local tech expert — something isn’t right.

Set up the session

We can run the next block of cells in the Set up the session section. These will download some basic data from the DASCH servers on-the-fly. It should only take a minute.

daschlab saves downloaded data locally, so that if you revisit a notebook, you don’t need to re-fetch everything. But on MyBinder we’re always starting from scratch.

Now let’s open up WorldWide Telescope (WWT). An easy way to do this is with JupyterLab’s “command palette”.

WWT should load up in a new JupyterLab tab with an interactive view of the galactic center. You can pan and zoom like in Google Maps.

Click and drag the “RY Cnc.ipynb” notebook tab to the middle-left of the main view. You should get a nice split screen; very convenient for data exploration!

By dragging tabs to different locations you can also split top/bottom, or set up whatever other configuration brings you joy.

Run the first Display the "refcat"... code cell, containing the await keyword. This will connect the Python notebook to the WWT app. It will zoom WWT to the location of our target, RY Cnc.

Running the next cell will print out the first few rows of DASCH’s source catalog around our target.

The cell after that will display the catalog in WWT. Zooming in and out is a quick way to check it out.

There’s an unfortunate astrometric offset of a few arcsec in WWT’s default basemap. We can change the background in WWT to PanSTARRS1 3pi, which covers this sky region, and doesn‘t have this problem.

Clicking the “Choose background” menu item a second time hides the tool again.

To get information about a “refcat” source, click on it in WWT. The WWT UI shows only limited information, but you can pull out all of the catalog columns using pywwt’s most_recent_source feature.

Display a nice sample cutout

Run the block of cells in the next notebook section. Daschlab will fetch supporting data and a cutout (it’ll take a minute), and then show the latter in WWT.

Note: The videos show an older syntax, plates(), that has been replaced with exposures(). On MyBinder there can be a long lag between show() finishing and the image actually appearing.

Check out the raw lightcurve

Run the block of cells in the next notebook section. The lightcurve figure uses a powerful plotting package called Bokeh. Lightcurves are loaded as Astropy Table objects, which give you tons of features out-of-the-box.

Plot phased with known period

Run the block of cells in the next notebook section. Our target is an eclipsing binary with a period of about 1 day. We can easily add a computed phase to the lightcurve table.

For this EB, a lot of the low points are eclipses, but some are at odd phases. The high points are all suspicious.

Filter data: standard AFLAGS

Run the block of cells in the next notebook section.

The DASCH data services return all measurements, even ones that are very likely to be bad. These cells mark as rejected points that fail some standard quality checks. If we replot the data, many of the outliers are now gone.

Filter data: astrometric offset

Run the block of cells in the next notebook section.

This section rejects lightcurve points whose fitted positions are too far from the known source position. We plot a sample cutout where the pipeline has apparently identified a noise fluctuation as our source; so it is no surprise that the position is off.

Filter data: low time accuracy

Run the block of cells in the next notebook section.

This section rejects lightcurve points whose observation times are uncertain. We get these times from transcriptions of handwritten, century-old logbooks, so occasional errors are understandable! For this source, with its 1-day period, we need times that are well-constrained.

Filter data: suspected defects

Run the block of cells in the next notebook section.

If we pull up the image of the last obvious outlier, it is another highly dubious detection. The point is flagged with the SUSPECTED_DEFECT flag. We’ll reject all points with this flag.

Download some data

We’ve reached the end of our notebook. MyBinder sessions are deleted after they finish, but you can use the JupyterLab UI to download some of the data files that were created over the course of this tutorial.

Thanks for following along!

This tutorial has skipped over a lot of scientific and technical details — head back to the DASCH site for guides that go deeper.