Skip to content

Commit

Permalink
Update portal-intro.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Madejski authored Nov 21, 2024
1 parent 70a7b07 commit 00c7f7f
Showing 1 changed file with 9 additions and 30 deletions.
39 changes: 9 additions & 30 deletions data-access-analysis-tools/portal-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Only the spatial constraints need to be entered on the left, with the 67.4579, -
For the "Output Column Selection" only the ``diaObjectId`` needs to be checked.
Pressing the "search" button will return only one ``diaObjectId`` - it is 1252220598734556212.

The ``ForcedSourceOnDiaObject`` contains the fluxes of individual objects, it does not contain the observation epochs, but the table ``CcdVisit`` does.
This will require joining two tables - specifically ``ForcedSourceOnDiaObject`` and ``CcdVisit`` on the common meta entry of ``ccdVisitId``.
The ``ForcedSourceOnDiaObject`` contains fluxes of individual objects, but it does not contain the observation epochs; however, the table ``CcdVisit`` does.
Obtaining the visit epochs will require joining two tables - specifically ``ForcedSourceOnDiaObject`` and ``CcdVisit`` on the common meta entry of ``ccdVisitId``.
Such table joins are effectively performed using the Astronomical Data Query Language, ADQL.
Entering an ADQL query requires clicking on the "Edit ADQL" button on the upper right.

A query given below will retrieve the coordinates, DIA object identifier, CCD visit identifier, band, and forced difference-image flux
and its error for all rows of the ``ForcedSourceOnDiaObjects`` table which are associated with the ``diaObject`` of interest,
Expand All @@ -49,7 +50,7 @@ Again, the exposure time midpoint modified julian date for all visits is extract
SELECT fsodo.coord_ra, fsodo.coord_dec,
fsodo.diaObjectId, fsodo.ccdVisitId, fsodo.band,
fsodo.psfDiffFlux, fsodo.psfDiffFluxErr,
fsodo.psfDiffFlux, fsodo.psFlux, fsodo.psfDiffFluxErr,
cv.expMidptMJD
FROM dp02_dc2_catalogs.ForcedSourceOnDiaObject as fsodo
JOIN dp02_dc2_catalogs.CcdVisit as cv
Expand All @@ -58,6 +59,7 @@ Again, the exposure time midpoint modified julian date for all visits is extract
AND fsodo.band = 'i'
**Note:** The ``ForcedSourceOnDiaObject`` table contains forced photometry on both the difference image, ``psfDiffFlux``, and the processed visit image (PVI; "direct" image), ``psfFlux``.
Both are extracted via the quwry above.
This example is using a supernova it uses the ``psfDiffFlux``, which is the forced photometry on the difference image, in which the static-sky component (the host galaxy) has been subtracted.
However, the ``psfFlux`` would be more appropriate for generating the lightcurve of a variable star, as there is no need to subtract the static component (in this case, the variable star's average flux).

Expand All @@ -71,35 +73,12 @@ forced photometry is negative
(e.g., rare cases where the source is faint or gone *and* in a region of slightly oversubtracted sky background).
It is only ever fully safe to use this function when using ``SNR > 5`` *detections* in PVIs.

**1.4.** Click "Search".

**1.5.** Set the view of the "Results" panel by clicking on the "hamburger" icon (three horizontal lines on the top left).
Click on the double-arrow in the "Results Layout" box, and click on the "Coverage Charts Tables" box.
In the results view, see that the query has returned forced flux measurements in the table (right hand side of the figure below), and the "coverage" panel on the left-hand side.

.. figure:: /_static/portal_tut05_step01b.png
:name: portal_tut05_step01b
:alt: A screenshot of the default results view that is returned for the query.

Figure 2: Screenshot illustrating the results of the query, with the selection of "coverage" on the left, and "table" on the right.

**1.6.** To plot the lightcurve instead of the "coverage" image (default), click on the "Active Chart" tab.
The defalt plot will be the dec vs. RA (the plotting chart defaults to plot the data in the two leftmost columns of the table).
To change the plot, open the plot parameters pop-up window by clicking on
the settings icon (a single gear above the plot window).


**1.7.** Update the plot parameters as shown in the figure below.
Note that the grid line in the y-axis is selected.
Click "Apply".
Note how the grid lines in the y-axis illustrate that "off-peak" (non-detection) forced fluxes can be negative.

.. figure:: /_static/portal_tut05_step01c.png
:width: 300
:name: portal_tut05_step01c
:alt: A screenshot of the plot parameters pop-up window, with the parameters set to display the i-band lightcurve.
The plot can be changed by opening the plot parameters pop-up window which will appear by clicking on the settings icon (a single gear above the plot window).
The example below uses ``psfDiffFlux`` - note that for some of the pointings, the plotted flux is negative.
This is because ``psfDiffFlux`` is a result of the subtraction of some fiducial value (obtained by averaging previous observations) from the data in the PVI on hand.
This, on some occassions can result in a negative value.

Figure 3: Plot parameters selection in the pop-up window, set to display the i-band lightcurve.

.. figure:: /_static/portal_tut05_step01d.png
:name: portal_tut05_step01d
Expand Down

0 comments on commit 00c7f7f

Please sign in to comment.