Skip to content

Working with Observation Sources

mpyat2 edited this page Nov 11, 2023 · 9 revisions

3. Observation Sources recipes


Loading ZTF data with Flexible Text Format Plug-in

This manual is partially obsolete. You can use the ZTF plug-in

Currently (Jan 2021), VStar does not have a ZTF (https://www.ztf.caltech.edu/) plug-in. However, it is possible to load ZTF data using Flexible Text Format plug-in.

To access ZTF light curves, go to https://irsa.ipac.caltech.edu/cgi-bin/Gator/nph-scan?submit=Select&projshort=ZTF, select a catalog, and press [SELECT] button:

ZTF cataloc selection

Enter object’s coordinates then click [Run Query]:

ZTF object by coordinates

Identify the object in the table, select desired filter(s) and click [To Time Series Tool]:

ZTF table of objects

Click an object id (oid):

ZTF list of sources with light curves

Now, you should see a screen with a data table and a light curve.

ZTF light curve screen

Press “Save” button above the data table, then (in the new dialog window) select “Comma-separated values (.csv)” format and press [Save]:

ZTF save light curve dialog

By default, a name of the file is too long (like https___irsa_ipac_caltech_edu_cgi-bin_g2p_nph-g2p dataid=oid&projectshort=ztf&ws=_89_c2_7a1d905b264e0450cd88b3b1e8b0_g2p_6674&id=806104400011333.csv) so change it to more convenient, let’s say, “ZTF_zg.csv”. Open the file in a plain-text editor (under Windows, Notepad, or, for example, Notepad++) and add the following lines at the top:

#FIELDS=,,TIME,,MAG,MAGERR

#TIME=HJD

It is also recommended to put the # sign at the beginning of a line with field names to suppress warning while loading data into VStar:

ZTF light curve in plain text editor

The first directive (#FIELDS) describes the format of the file (time information is in the 3rd column, magnitude is in the 5th, and uncertainty in the 6th).

The second directive (#TIME=HJD) tells Flexible Text Format plug-in that time values are Heliocentric Julian Dates.

Save the file, launch VStar and open the data file with Flexible Text Format plug-in:

ZTF light curve in VStar

The light curve is for a star 2MASS J00101695+5840460. It is a variable of BY type with a period of 2.6891 d:

ZTF phase plot

Now, the data are displayed as "Unspecified". You can improve the representation by adding additional directives at the top of the light curve file:

#FILTER=zg

#DEFINESERIES=zg,zg,#00AA00

ZTF light curve in plain text editor 2

The directive #FILTER=zg specifies a photometric filter of the data series (actually, a name of the series). As far as the name of the filter (zg) is unknown to VStar, the next directive (#DEFINESERIES) defines this filter and the color of data marks (see Flexible Text Format plug-in documentation for details). Here is the result:

ZTF phase plot 2

Accessing Gaia DR3 epoch photometry

This manual is partially obsolete. You can use Gaia DR2/DR3 plug-in

With the Gaia Data Release 3, an extensive light curves database (epoch photometry) became available. Currently, VStar does not have a plug-in to access the Gaia DR3 epoch photometry directly. Yet it is possible with several extra steps with the help of a Python script.

[Note on 2023-03-13: In fact, VStar has Gaia DR2 plug-in, it seems it CAN access the same data.]

Note: You have to have Python installed. The Python script used in this recipe can be downloaded from here: https://github.com/AAVSO/VStar/blob/master/script/GaiaDR3.py . The author tested the script against Python 3.9.13.

The steps:

  1. Find the Gaia DR3 identifier (source ID) for the object of interest (i.e., via https://vizier.cds.unistra.fr/viz-bin/VizieR ). For example, for RR Lyr, it is 2125982599343482624.

  2. Go to https://gaia.aip.de/query/

  3. Enter a query specifying the source ID of the target:

select * from gaiadr3.epoch_photometry
where source_id = 2125982599343482624

Gaia DR3 photometry query

  1. After submitting the query, wait until the execution is complete (it takes a few seconds or less). Check if there is a result on the [Results Table] tab:

Check for the result

Then go to the [Download] tab and download the result as 'Comma separated Values':

Download the query result

Save it as GaiaDR3.csv in the directory where the GaiaDR3.py script is placed.

  1. Run the Python script GaiaDR3.py. The data in the VStar Flexible Table Format should be in the resulting GaiaDR3.txt file:

Photometry file

  1. Now you can open the file in VStar via the Flexible Text Format plug-in:

VStar Open File dialog

Here is a phase plot of the data:

VStar Open File dialog