Planet Searching
VAST Pilot Planet Hunting¶
This notebook gives an example of how to use vast-tools in a notebook environment to find planets in a VAST Pipeline run or the VAST Pilot Survey.
Planet searching does not have to be done separately and can be included in any query, but is done separate for the purposes of this example. Keep in mind that not all planets are visible in the VAST images even if they are in the field, search for Emil's posts in Slack for more information.
VAST Pipeline Planet Hunting¶
Checking for planets in a pipeline run can be useful to compare against potential transient candidates.
A pipeline run can be checked for planets by following the following process.
Firstly the Pipeline instance is imported along with some astropy components that will be used in the notebook.
from astropy.coordinates import SkyCoord, Angle
import astropy.units as u
from vasttools.pipeline import Pipeline
%matplotlib inline
And the pipeline run is loaded, in this example the pilot survey epochs 0 - 13 is loaded. Please refer to the pipeline example notebook for more information on using the pipeline component.
pipe = Pipeline()
pilot_survey = pipe.load_run('tiles_corrected')
Now, with the pipeline loaded, the method to use is check_for_planets
. This function will take all the observations in the pipeline run and calculate whether a planet is present in the image footprint. A dataframe is returned that contains the information of the planets that are found to be present at the time of the observation. If no planets are found then the dataframe will be empty.
planets = pilot_survey.check_for_planets()
planets # to show the result
Now that we know the coordinates of the planets we can check if any sources were detected at these locations using the pipeline sources.
# create a skycoord from the planet results.
planet_skycoord = SkyCoord(planets['ra'], planets['dec'], unit=(u.deg, u.deg))
# we use the pilot_survey.sources_skycoord to do the matching.
idx, d2d, _ = planet_skycoord.match_to_catalog_sky(pilot_survey.sources_skycoord)
# obtain matches less than 20 arcsec
mask = d2d < 20 * u.arcsec
# show the planets with a source match
planets[mask]
Now lets fetch the sources that the above planet positions are matched to:
# get the sources that have a planet match, using the masked idx from the crossmatch.
planet_matches = pilot_survey.sources.iloc[idx[mask]].copy()
# Assign the planet name to a column
planet_matches['planet'] = planets[mask]['planet'].to_numpy()
planet_matches
So this list above would be a list to check against potential transient sources, as it's likely they are a planet!
Remember that in the pipeline a planet is only likely to have one detection per source as the pipeline does not track a planet's position by itself. Using a Query from vast tools will give a more complete picture for the pilot survey (see the next section). But by combining the sources that we know are planets a lightcurve could be constructed.
Using the source ids above it is now possible to fetch them and see what they look like.
jupiter = pilot_survey.get_source(3361168)
jupiter.show_all_png_cutouts(size=3*u.arcmin, force=True, no_selavy=True);
venus = pilot_survey.get_source(3677191)
venus.show_all_png_cutouts(columns=5, force=True, size=2*u.arcmin, figsize=(12,6));
neptune = pilot_survey.get_source(3264633)
neptune.show_all_png_cutouts(columns=5, force=True, size=2*u.arcmin, figsize=(12,6));
VAST Tools Query Planet Hunting¶
If you want to build up a complete picture of a planet in the VAST Survey it can be more useful to use a Query in VAST Tools. This will track the planet across a single source so you can easily build a lightcurve or postage stamps.
Below are the imports required for the Query example. The main import required from vast-tools is the Query class.
from vasttools.query import Query
import matplotlib.pyplot as plt
In this example we will search for the Moon, Jupiter and Venus in the first 12 epochs of the VAST survey.
Planet searching is done through the normal query method as below. It's recommended to use the TILE
images for planet searching.
The allowed 'planets' are all the solar system planets, in addition to moon
and sun
.
planets_query = Query(
epochs="0,1,2,3,4,5,6,7,8,9,10,11,12",
planets=['jupiter', 'venus', 'moon'],
crossmatch_radius=10.,
use_tiles=True,
post_processed_data=False,
)
Note: we provide the argument post_processed_data=False
to avoid using the post-processed data, which does not currently exist for the pilot survey. The default for the full survey is to use the post-processed tiles data - your query settings should only differ from the default with good reason!
Find the fields first.
planets_query.find_fields()
Looking at the fields_df below we see the fields for which Jupiter and Venus appear in. If you have RACS you'll also see the Moon. We'll go ahead and run find_sources()
.
planets_query.fields_df
planets_query.find_sources()
planets_query.results
With the results in hand we can now take a look at the results:
jupiter = planets_query.results['Jupiter']
venus = planets_query.results['Venus']
jupiter.show_all_png_cutouts(figsize=(20,8), zscale=True, contrast=0.1, force=True)
venus.show_all_png_cutouts(figsize=(20,8))
If you have the RACS data available, the following code will let you view the Moon.
# moon = planets_query.results['Moon']
# moon.show_all_png_cutouts(figsize=(20,8), size=Angle(35. * u.arcmin), zscale=True, contrast=0.4, no_selavy=True)
Created: August 5, 2020