Skip to content
from vasttools.pipeline import Pipeline
from vasttools.query import Query
from bokeh.io import output_notebook
from bokeh.plotting import show
from astropy.coordinates import Angle, SkyCoord
from astropy import units as u
import matplotlib.pyplot as plt
import pandas as pd
import os
import numpy as np

%matplotlib inline
output_notebook()
Loading BokehJS ...

You can turn on detailed logging by uncommenting the below code

#from vasttools.utils import get_logger
#logger = get_logger(debug=True, quiet=False, logfile=None)

Accessing Pipeline data products with vast-tools

Getting set up

pipe = Pipeline()
pipe.list_piperuns()
['10s_FRB190110_FullField_DeepSubtraction',
 '10s_FRB190110_FullField_DeepSubtraction.bak',
 'BANE_no_forced_fits',
 'GalCtr_p2',
 'VAST_2118-06A',
 'combined',
 'crop-compress-comparison',
 'crop-compress-comparison-base',
 'dwf_O12',
 'dwf_sep2021_final',
 'full_survey_tiles',
 'full_survey_tiles_test',
 'galctr_p1_test',
 'gw190814_10_epochs',
 'mc_p1_test',
 'no-meas-pairs-test',
 'racs-low-tiles-bane',
 'racs-low-tiles-bane-test',
 'racs_comparison',
 'racs_comparison_no_force',
 'smc-low',
 'test_ui_1',
 'tiles-low-corrected',
 'tiles-mid-corrected',
 'tiles_corrected',
 'two_epoch_test',
 'workshop-2023-run',
 'ym_Test']
run_name = 'workshop-2023-run'
run = pipe.load_run(run_name)
/home/jovyan/vast-tools/vasttools/pipeline.py:2701: UserWarning: Measurements have been loaded with vaex.
  warnings.warn("Measurements have been loaded with vaex.")
Measurement pairs file (/data/vast-pipeline/vast-pipeline/pipeline-runs/workshop-2023-run/measurement_pairs.parquet) does not exist. You will be unable to access measurement pairs or two-epoch metrics.

run.images
band_id skyreg_id measurements_path polarisation name path noise_path background_path datetime jd ... beam_bmin beam_bpa rms_median rms_min rms_max centre_ra centre_dec xtr_radius frequency bandwidth
id
23874 1 9390 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_0127-73A.SB45555.cont.taylor.0.re... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2022-11-14 12:49:14.700000+00:00 2.459898e+06 ... 0.003639 -18.41 0.198549 0.132378 6.565116 21.812002 -73.071992 4.454763 887.0 0.0
23875 1 9391 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_0530-68A.SB45563.cont.taylor.0.re... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2022-11-14 16:44:38.400000+00:00 2.459898e+06 ... 0.003472 -20.99 0.217453 0.154000 61.209753 82.501912 -68.697878 4.454768 887.0 0.0
23876 1 9392 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_0709-12A.SB45567.cont.taylor.0.re... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2022-11-14 18:48:43.500000+00:00 2.459898e+06 ... 0.003417 8.72 0.215379 0.149857 2.229887 107.369132 -12.586381 4.454768 887.0 0.0
23877 1 9393 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_0725-18A.SB45572.cont.taylor.0.re... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2022-11-14 19:56:34.400000+00:00 2.459898e+06 ... 0.003250 14.86 0.208304 0.144672 3.531292 111.272725 -18.863314 4.454764 887.0 0.0
23878 1 9394 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_0734-12A.SB45568.cont.taylor.0.re... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2022-11-14 19:01:49.800000+00:00 2.459898e+06 ... 0.003500 6.98 0.204287 0.144626 0.801221 113.684208 -12.586381 4.454773 887.0 0.0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
25032 1 10242 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1753-18.SB51489.cont.taylor.0.res... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2023-07-18 15:43:59.800000+00:00 2.460144e+06 ... 0.003028 82.36 0.432030 0.211786 5.244236 268.364367 -18.864008 4.454778 887.0 0.0
25033 1 9354 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1806-12.SB51490.cont.taylor.0.res... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2023-07-18 15:57:40.800000+00:00 2.460144e+06 ... 0.003056 83.46 0.394638 0.192536 20.542279 271.579657 -12.586381 4.454773 887.0 0.0
25034 1 9320 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1806-25.SB51529.cont.taylor.0.res... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2023-07-21 13:37:27.600000+00:00 2.460147e+06 ... 0.003139 79.94 0.302299 0.187404 18.723287 271.698880 -25.131178 4.454773 887.0 0.0
25035 1 9876 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1819-18.SB51491.cont.taylor.0.res... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2023-07-18 16:12:15+00:00 2.460144e+06 ... 0.003028 82.80 0.430097 0.209124 247.982636 274.909821 -18.864008 4.454778 887.0 0.0
25036 1 9356 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1831-12.SB51492.cont.taylor.0.res... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... 2023-07-18 16:25:54.400000+00:00 2.460144e+06 ... 0.003028 83.79 0.456288 0.215145 19.138284 277.895445 -12.586381 4.454773 887.0 0.0

1411 rows × 29 columns

run.measurements
# source island_id component_id local_rms ra ra_err dec dec_err flux_peak flux_peak_err flux_int flux_int_err bmaj err_bmaj bmin err_bmin pa err_pa psf_bmaj psf_bmin psf_pa flag_c4 chi_squared_fit spectral_index spectral_index_from_TT has_siblings image_id time name snr compactness ew_sys_err ns_sys_err error_radius uncertainty_ew uncertainty_ns weight_ew weight_ns forced flux_int_isl_ratio flux_peak_isl_ratio id
0 34711110SB45535_island_2 SB45535_component_2a 0.609000027179718 240.9612274169922 5.765886044173385e-07 -49.0680923461914066.80719551837683e-07 1632.9739990234375 0.6177468299865723 1734.574951171875 1.1143282651901245 15.84000015258789 1.6511976355104707e-0612.2600002288818361.2986857882424374e-06157.13999938964844 0.00104108790401369333.450000047683716 3.170000076293945326.540000915527344 True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a 2681.402099609375 1.06221830844879150.000277777784503996370.000277777784503996370.0 0.000277777784503996370.0002777777845039963712960000.0 12960000.0 False 1.0 1.0 236408494
1 35076138SB45535_island_2 SB45535_component_2a 0.609000027179718 240.9612274169922 5.765886044173385e-07 -49.0680923461914066.80719551837683e-07 1632.9739990234375 0.6177468299865723 1734.574951171875 1.1143282651901245 15.84000015258789 1.6511976355104707e-0612.2600002288818361.2986857882424374e-06157.13999938964844 0.00104108790401369333.450000047683716 3.170000076293945326.540000915527344 True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a 2681.402099609375 1.06221830844879150.000277777784503996370.000277777784503996370.0 0.000277777784503996370.0002777777845039963712960000.0 12960000.0 False 1.0 1.0 236408494
2 34139985SB45535_island_2 SB45535_component_2a 0.609000027179718 240.9612274169922 5.765886044173385e-07 -49.0680923461914066.80719551837683e-07 1632.9739990234375 0.6177468299865723 1734.574951171875 1.1143282651901245 15.84000015258789 1.6511976355104707e-0612.2600002288818361.2986857882424374e-06157.13999938964844 0.00104108790401369333.450000047683716 3.170000076293945326.540000915527344 True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a 2681.402099609375 1.06221830844879150.000277777784503996370.000277777784503996370.0 0.000277777784503996370.0002777777845039963712960000.0 12960000.0 False 1.0 1.0 236408494
3 35671355SB45535_island_2 SB45535_component_2a 0.609000027179718 240.9612274169922 5.765886044173385e-07 -49.0680923461914066.80719551837683e-07 1632.9739990234375 0.6177468299865723 1734.574951171875 1.1143282651901245 15.84000015258789 1.6511976355104707e-0612.2600002288818361.2986857882424374e-06157.13999938964844 0.00104108790401369333.450000047683716 3.170000076293945326.540000915527344 True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a 2681.402099609375 1.06221830844879150.000277777784503996370.000277777784503996370.0 0.000277777784503996370.0002777777845039963712960000.0 12960000.0 False 1.0 1.0 236408494
4 34711110SB45536_island_2 SB45536_component_2a 0.7149999737739563 240.961486816406256.511651235996396e-07 -49.06822204589844 8.000050684131566e-07 1630.824951171875 0.7258985042572021 1737.7879638671875 1.3119335174560547 15.4600000381469731.8961658270200132e-0612.1800003051757811.518142767054087e-06 169.05999755859375 0.00131803750991821293.48000001907348633.200000047683716 42.72999954223633 True 5720.62890625 -0.009999999776482582True False 23897 2022-11-14 03:48:27 VAST_1600-50A_SB45536_component_2a 2280.8740234375 1.06558823585510250.000277777784503996370.000277777784503996371.2074182222931995e-060.0002777804038487375 0.0002777804038487375 12959755.0 12959755.0 False 1.0 1.0 236412363
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11,610,66035414214SB50352_island_10304SB50352_component_10304a0.18349802494049072123.450363159179692.7777778086601757e-06-44.9249496459960942.7777778086601757e-060.6319339275360107 0.183498024940490720.6319339275360107 0.1834980249404907212.6999998092651370.0 11.8999996185302730.0 -40.79999923706055 0.0 12.69999980926513711.899999618530273-40.79999923706055 False 332.096618652343750.0 False False 23763 2023-06-04 06:34:58 image_SB50352_component_10304a_f_run0000643.44381856918334961.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 249173437
11,610,66135414214SB50369_island_10321SB50369_component_10321a0.19219782948493958123.450363159179692.7777778086601757e-06-44.9249496459960942.7777778086601757e-060.5720846652984619 0.192197829484939580.5720846652984619 0.1921978294849395813.3000001907348630.0 11.3999996185302730.0 49.34000015258789 0.0 13.30000019073486311.39999961853027349.34000015258789 False 309.0154113769531 0.0 False False 23805 2023-06-05 08:45:06.900000image_SB50369_component_10321a_f_run0000642.97654056549072271.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 249177659
11,610,66235414214SB50665_island_10307SB50665_component_10307a0.17373940348625183123.450363159179692.7777778086601757e-06-44.9249496459960942.7777778086601757e-060.2542788088321686 0.173739403486251830.2542788088321686 0.1737394034862518312.6000003814697270.0 12.0 0.0 -22.3700008392334 0.0 12.60000038146972712.0 -22.3700008392334 False 236.4114532470703 0.0 False False 24452 2023-06-22 05:43:53.500000image_SB50665_component_10307a_f_run0000641.463564395904541 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 249181816
11,610,66335414214SB50788_island_10324SB50788_component_10324a0.1843719184398651 123.450363159179692.7777778086601757e-06-44.9249496459960942.7777778086601757e-060.275168150663375850.1843719184398651 0.275168150663375850.1843719184398651 13.6999998092651370.0 11.3999996185302730.0 55.22999954223633 0.0 13.69999980926513711.39999961853027355.22999954223633 False 280.2682189941406 0.0 False False 24540 2023-06-24 07:44:32.100000image_SB50788_component_10324a_f_run0000641.492462396621704 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 249185938
11,610,66435414214SB51171_island_10245SB51171_component_10245a0.1818578541278839 123.450363159179692.7777778086601757e-06-44.9249496459960942.7777778086601757e-060.6209962964057922 0.1818578541278839 0.6209962964057922 0.1818578541278839 12.3000001907348630.0 12.0 0.0 -20.6700000762939450.0 12.30000019073486312.0 -20.670000076293945False 291.7581481933594 0.0 False False 24792 2023-07-05 04:50:21.800000image_SB51171_component_10245a_f_run0000643.41473460197448731.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 249190256
run.sources
wavg_ra wavg_dec avg_compactness min_snr max_snr wavg_uncertainty_ew wavg_uncertainty_ns avg_flux_int avg_flux_peak max_flux_peak ... eta_int eta_peak new new_high_sigma n_neighbour_dist n_measurements n_selavy n_forced n_siblings n_relations
id
34126486 236.529813 -46.921929 1.042828 233.692533 1563.215444 0.000057 0.000057 859.392121 822.237792 891.859009 ... 26243.781208 6.661569e+04 False 0.000000 0.000055 24 23 1 4 4
34126487 242.582854 -52.101387 3.010033 27.855187 60.204924 0.000059 0.000059 997.661493 327.078374 366.240997 ... 102.674473 2.495691e+01 False 0.000000 0.000080 24 24 0 24 1
34126488 235.304907 -50.929669 1.071633 73.754721 147.232421 0.000057 0.000057 119.045992 115.834367 1760.365824 ... 918209.359865 1.036577e+06 False 0.000000 0.000099 24 23 1 23 1
34126489 239.110485 -47.593691 1.358169 72.784453 483.101479 0.000057 0.000057 135.826667 98.529334 195.173004 ... 6003.317001 8.161030e+03 False 0.000000 0.000118 24 24 0 22 8
34126490 236.748967 -51.036385 1.166523 168.687326 228.102281 0.000057 0.000057 70.605334 60.532000 63.761002 ... 13.511259 1.762682e+01 False 0.000000 0.006064 24 24 0 24 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
35880822 123.643006 -46.394341 1.008086 5.350962 5.350962 0.000060 0.000060 0.599473 0.599064 1.113000 ... 0.954638 1.151762e+00 True 4.546294 0.043804 22 1 21 0 0
35880823 124.117371 -45.904983 0.866171 5.407035 5.407035 0.000060 0.000060 0.472639 0.479184 1.076000 ... 0.928921 1.303998e+00 True 4.313165 0.018336 22 1 21 0 0
35880824 125.901017 -41.890530 1.165103 5.330000 5.330000 0.000060 0.000060 0.458302 0.450302 1.066000 ... 1.761136 2.005094e+00 True 4.051201 0.036845 22 1 21 0 0
35880825 123.325994 -41.770857 2.238821 5.234043 5.234043 0.000060 0.000060 0.436635 0.381226 0.984000 ... 1.523004 1.557637e+00 True 4.066667 0.048793 22 1 21 0 0
35880826 122.804452 -43.975169 1.041929 5.270718 5.270718 0.000060 0.000060 0.606728 0.604910 0.996468 ... 1.238768 1.345035e+00 True 4.190182 0.007317 22 1 21 0 0

1754341 rows × 27 columns

run.sources.columns
Index(['wavg_ra', 'wavg_dec', 'avg_compactness', 'min_snr', 'max_snr',
       'wavg_uncertainty_ew', 'wavg_uncertainty_ns', 'avg_flux_int',
       'avg_flux_peak', 'max_flux_peak', 'max_flux_int', 'min_flux_peak',
       'min_flux_int', 'min_flux_peak_isl_ratio', 'min_flux_int_isl_ratio',
       'v_int', 'v_peak', 'eta_int', 'eta_peak', 'new', 'new_high_sigma',
       'n_neighbour_dist', 'n_measurements', 'n_selavy', 'n_forced',
       'n_siblings', 'n_relations'],
      dtype='object')
run.sources[['avg_compactness', 'min_snr', 'max_snr','avg_flux_peak', 'max_flux_peak', 'min_flux_peak', 'v_peak', 'eta_peak', 'n_neighbour_dist', 'n_measurements', 'n_selavy', 'n_forced']]
avg_compactness min_snr max_snr avg_flux_peak max_flux_peak min_flux_peak v_peak eta_peak n_neighbour_dist n_measurements n_selavy n_forced
id
34126486 1.042828 233.692533 1563.215444 822.237792 891.859009 165.688004 0.202452 6.661569e+04 0.000055 24 23 1
34126487 3.010033 27.855187 60.204924 327.078374 366.240997 235.822006 0.116072 2.495691e+01 0.000080 24 24 0
34126488 1.071633 73.754721 147.232421 115.834367 1760.365824 36.606998 3.024320 1.036577e+06 0.000099 24 23 1
34126489 1.358169 72.784453 483.101479 98.529334 195.173004 41.195999 0.383845 8.161030e+03 0.000118 24 24 0
34126490 1.166523 168.687326 228.102281 60.532000 63.761002 57.185001 0.023005 1.762682e+01 0.006064 24 24 0
... ... ... ... ... ... ... ... ... ... ... ... ...
35880822 1.008086 5.350962 5.350962 0.599064 1.113000 0.133225 0.385538 1.151762e+00 0.043804 22 1 21
35880823 0.866171 5.407035 5.407035 0.479184 1.076000 0.215695 0.480764 1.303998e+00 0.018336 22 1 21
35880824 1.165103 5.330000 5.330000 0.450302 1.066000 0.022464 0.665655 2.005094e+00 0.036845 22 1 21
35880825 2.238821 5.234043 5.234043 0.381226 0.984000 -0.014445 0.665205 1.557637e+00 0.048793 22 1 21
35880826 1.041929 5.270718 5.270718 0.604910 0.996468 0.112088 0.366888 1.345035e+00 0.007317 22 1 21

1754341 rows × 12 columns

run.sources_skycoord
<SkyCoord (ICRS): (ra, dec) in deg
    [(236.52981282, -46.92192887), (242.5828542 , -52.10138671),
     (235.30490653, -50.92966946), ..., (125.901017  , -41.89053   ),
     (123.325994  , -41.770857  ), (122.804452  , -43.975169  )]>

Searching for interesting sources

single_det_query_str = (
    "n_measurements &gt;= 10" # Require at least 10 measurements
    "&amp; n_selavy == 1" # Only interested in sources that are detected once
    "&amp; n_neighbour_dist &gt; 1./60. " # nearest neighbour should be at least 1 arcmin away
    "&amp; 0.8 &lt; avg_compactness &lt; 1.4 " # Only interested in compact sources
    "&amp; n_relations == 0" # Only interested in sources that are not islands
    "&amp; max_snr &gt;= 10.0"
)
run.sources.query(single_det_query_str).sort_values('max_snr', ascending=False)
wavg_ra wavg_dec avg_compactness min_snr max_snr wavg_uncertainty_ew wavg_uncertainty_ns avg_flux_int avg_flux_peak max_flux_peak ... eta_int eta_peak new new_high_sigma n_neighbour_dist n_measurements n_selavy n_forced n_siblings n_relations
id
34260695 268.894893 -25.463949 1.029498 52.995782 52.995782 0.000062 0.000062 1.964267 1.927217 25.120001 ... 48.210524 134.550331 True 53.775164 0.041562 20 1 19 0 0
34710644 263.516906 -34.753628 1.151416 30.627292 30.627292 0.000058 0.000058 0.866372 0.767372 15.038000 ... 15.001008 38.776900 True 26.702201 0.065086 23 1 22 0 0
35670866 175.723304 -64.952444 0.990379 25.710528 25.710528 0.000058 0.000058 0.156443 0.158487 4.885000 ... 10.631861 29.980321 True 17.335050 0.035966 23 1 22 0 0
35302624 122.955231 -44.899964 1.139066 15.562189 15.562189 0.000059 0.000059 0.369862 0.350089 3.128000 ... 5.318421 10.863082 False 0.000000 0.030350 22 1 21 0 0
35880472 272.843122 -16.670335 0.969044 12.824121 12.824121 0.000061 0.000061 0.220008 0.227532 5.104000 ... 4.066510 9.480812 True 12.415610 0.030456 21 1 20 0 0
34847432 262.542260 -25.718873 1.394580 12.399194 12.399194 0.000063 0.000063 0.645720 0.463720 9.225000 ... 4.047888 8.269197 True 40.181501 0.020534 20 1 19 0 0
34945402 273.629631 -17.157413 1.164271 12.295762 12.295762 0.000061 0.000061 2.253270 2.146604 13.636000 ... 4.009831 7.314234 True 11.529048 0.053817 21 1 20 0 0
35785232 145.804384 -48.956930 1.126368 12.256098 12.256098 0.000060 0.000060 0.235416 0.218098 3.015000 ... 4.140727 8.150902 True 14.603400 0.064564 22 1 21 0 0
35199035 267.978600 -25.859781 1.179800 12.022556 12.022556 0.000063 0.000063 0.331224 0.273724 6.396000 ... 3.407202 7.711632 True 13.347927 0.046077 20 1 19 0 0
35321189 271.433583 -14.378291 1.059079 10.463637 10.463637 0.000057 0.000057 0.116292 0.110625 2.302000 ... 3.180445 5.944874 True 8.315845 0.048352 24 1 23 0 0

10 rows × 27 columns

Eta-V analysis

You can search for variables using the standard Eta-V variability metrics (https://www.vast-survey.org/vast-pipeline/v1.0.0/design/sourcestats/#v-and-metrics)

V quantifies the amplitude of the variability, while eta quantifies its statistical significance

eta_v_query_str = (
    "n_measurements &gt;= 10 " # require at least 10 measurements (selavy or forced)
    "&amp; n_selavy &gt; n_measurements / 2" # sources should be detected in at least half the observations
    "&amp; n_neighbour_dist &gt; 1./60. " # nearest neighbour should be at least 1 arcmin away
    "&amp; 0.8 &lt; avg_compactness &lt; 1.4 "
    "&amp; n_relations == 0"
    "&amp; max_snr &gt;= 10.0"
)
eta_thresh, v_thresh, eta_v_candidates, plot = run.run_eta_v_analysis(1.0, 1.0, query=eta_v_query_str)
print(eta_thresh, v_thresh)
/opt/conda/lib/python3.8/site-packages/pandas/core/arraylike.py:397: RuntimeWarning: invalid value encountered in log10
  result = getattr(ufunc, method)(*inputs, **kwargs)
Negative V encountered. Removing...

1.9640060647800266 0.11584095939174516

eta_v_candidates
wavg_ra wavg_dec avg_compactness min_snr max_snr wavg_uncertainty_ew wavg_uncertainty_ns avg_flux_int avg_flux_peak max_flux_peak ... eta_int eta_peak new new_high_sigma n_neighbour_dist n_measurements n_selavy n_forced n_siblings n_relations
id
34126559 236.249153 -53.146610 1.088225 15.361257 34.956960 0.000050 0.000050 11.373794 10.476471 13.892 ... 10.320595 30.099554 False 0.000000 0.042767 34 34 0 1 0
34127634 271.528179 -11.908252 1.116716 13.025891 49.935134 0.000060 0.000060 5.680583 5.135292 9.619 ... 19.331954 58.570683 False 0.000000 0.056589 24 24 0 0 0
34127676 271.669568 -14.352936 1.020561 11.722420 16.303030 0.000064 0.000064 3.808186 3.739478 4.486 ... 2.033466 2.532567 False 0.000000 0.018536 24 23 1 0 0
34128682 12.868557 -74.472412 1.086783 8.183487 19.385366 0.000074 0.000074 3.068333 2.837619 3.974 ... 3.550404 10.507314 False 0.000000 0.065130 21 21 0 0 0
34128683 15.533642 -70.545278 1.029913 7.947619 17.488480 0.000074 0.000074 2.858143 2.784714 3.795 ... 2.076257 6.218561 False 0.000000 0.025407 21 21 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
35773797 214.728643 -53.581018 1.077026 12.571429 22.772948 0.000065 0.000065 4.240909 3.971227 5.089 ... 1.734390 7.873348 False 0.000000 0.061289 22 22 0 0 0
35774157 229.043898 -64.416025 1.093486 7.721992 15.260869 0.000070 0.000070 3.291045 3.028227 3.844 ... 1.120984 3.705864 False 0.000000 0.030781 22 22 0 0 0
35774521 226.583861 -56.328182 1.030963 5.125490 10.550239 0.000081 0.000081 1.371971 1.330653 2.205 ... 2.342619 3.239254 False 0.000000 0.028338 22 19 3 0 0
35776493 123.609947 -41.992654 1.115781 5.165178 10.658536 0.000079 0.000079 1.740416 1.576962 2.185 ... 1.766101 2.341499 True 8.078941 0.019381 22 20 2 0 0
35777457 240.880964 -56.962536 1.069184 9.196787 15.423423 0.000070 0.000070 3.011864 2.822636 3.470 ... 0.882854 1.981664 False 0.000000 0.039035 22 22 0 0 0

1423 rows × 27 columns

show(plot)
v_peak_cut = 0.35
eta_peak_cut = 50
strong_cands = eta_v_candidates.query(f"v_peak &gt; {v_peak_cut} | eta_peak &gt; {eta_peak_cut}").sort_values("v_peak", ascending=False)
strong_cands
wavg_ra wavg_dec avg_compactness min_snr max_snr wavg_uncertainty_ew wavg_uncertainty_ns avg_flux_int avg_flux_peak max_flux_peak ... eta_int eta_peak new new_high_sigma n_neighbour_dist n_measurements n_selavy n_forced n_siblings n_relations
id
35765499 264.281904 -26.304581 1.138745 17.659630 35.193832 0.000064 0.000064 1.539665 0.584515 7.989000 ... 0.889876 2.606540 False 0.0 0.057579 20 19 1 0 0
35765512 264.498966 -26.263660 1.345301 5.414082 22.030534 0.000070 0.000070 25.998749 22.203449 332.088989 ... 1.710658 2.233469 False 0.0 0.022098 20 20 0 0 0
34947439 264.532857 -25.992005 1.141683 12.307693 24.415930 0.000066 0.000066 9.966784 9.298784 86.688689 ... 0.866511 2.088557 False 0.0 0.043676 20 19 1 0 0
34478910 263.304865 -25.672938 1.106522 6.694340 13.775785 0.000075 0.000075 4.516514 4.253964 36.702276 ... 1.485054 2.188735 False 0.0 0.049682 20 19 1 0 0
34478919 264.866500 -24.544009 1.076950 6.684932 11.691667 0.000079 0.000079 1.745685 1.617485 2.806000 ... 0.892504 2.057640 False 0.0 0.032623 20 19 1 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
34247011 120.326658 -26.178527 1.055587 132.152775 204.825148 0.000059 0.000059 32.715364 31.021318 38.389000 ... 131.559048 416.381766 False 0.0 0.118232 22 22 0 0 0
34833222 121.478222 -30.825825 1.060918 66.866910 109.116508 0.000059 0.000059 21.064455 19.858409 23.691000 ... 39.284619 113.929207 False 0.0 0.022577 22 22 0 0 0
34718948 154.637191 -54.568478 1.049732 66.786258 133.612363 0.000059 0.000059 20.481045 19.501046 23.783001 ... 54.016971 143.697542 False 0.0 0.049262 22 22 0 0 0
34715961 123.211767 -32.738833 1.047094 79.042060 117.753622 0.000059 0.000059 23.000591 21.965091 25.615000 ... 46.562869 132.968045 False 0.0 0.045808 22 22 0 0 0
35417093 105.606516 -15.678799 1.057795 35.536929 78.367213 0.000058 0.000058 22.175435 20.978565 25.184000 ... 17.796557 54.758221 False 0.0 0.066253 23 23 0 0 0

134 rows × 27 columns

fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(run.sources.query(eta_v_query_str).eta_peak, run.sources.query(eta_v_query_str).v_peak, marker='.')
ax.scatter(strong_cands.eta_peak, strong_cands.v_peak, marker='.')
#ax.axhline(v_peak_cut)
#ax.axvline(eta_peak_cut)
ax.set_xscale('log')
ax.set_yscale('log')
No description has been provided for this image
cols_to_include = ['wavg_ra', 'wavg_dec', 'avg_flux_peak', 'max_flux_peak', 'min_flux_peak', 'v_peak', 'eta_peak', 'n_neighbour_dist', 'n_measurements', 'n_selavy', 'n_forced']

strong_cands[cols_to_include].to_csv('workshop-2023-cands.csv')

Inspecting individual sources

idx = 35430820
source = run.get_source(idx)

print(f"https://dev.pipeline.vast-survey.org/sources/{idx}/")
https://dev.pipeline.vast-survey.org/sources/35430820/

source.measurements
source island_id component_id local_rms ra ra_err dec dec_err flux_peak flux_peak_err ... id image rms selavy frequency field epoch stokes skycoord detection
0 35430820 SB45582_island_12003 SB45582_component_12003a 0.218199 150.968430 0.000003 -56.189739 0.000003 0.680588 0.218199 ... 249554589 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 1 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
1 35430820 SB45739_island_12061 SB45739_component_12061a 0.206896 150.968430 0.000003 -56.189739 0.000003 0.543042 0.206896 ... 249559599 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 2 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
2 35430820 SB45966_island_11943 SB45966_component_11943a 0.247127 150.968430 0.000003 -56.189739 0.000003 1.112971 0.247127 ... 249564915 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 3 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
3 35430820 SB46789_island_12083 SB46789_component_12083a 0.194995 150.968430 0.000003 -56.189739 0.000003 0.694802 0.194995 ... 249570044 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 4 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
4 35430820 SB47045_island_3813 SB47045_component_3813a 0.255000 150.968689 0.000218 -56.189663 0.000353 1.917000 0.271076 ... 237028393 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 5 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
5 35430820 SB47221_island_4366 SB47221_component_4366a 0.227000 150.968231 0.000226 -56.189705 0.000254 1.489000 0.228351 ... 237032783 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 6 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
6 35430820 SB47597_island_4138 SB47597_component_4138a 0.200000 150.968124 0.000260 -56.189503 0.000233 1.612000 0.212649 ... 237036533 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 7 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
7 35430820 SB47665_island_4343 SB47665_component_4343a 0.229000 150.968292 0.000218 -56.190086 0.000252 1.483000 0.228905 ... 237041016 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 8 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
8 35430820 SB48230_island_3609 SB48230_component_3609a 0.237000 150.967987 0.000226 -56.189716 0.000270 1.921000 0.248657 ... 237774731 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 9 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
9 35430820 SB48512_island_4589 SB48512_component_4589a 0.241000 150.968475 0.000272 -56.190598 0.000271 1.363000 0.241041 ... 237945258 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 10 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
10 35430820 SB48834_island_4186 SB48834_component_4186a 0.272000 150.967987 0.000406 -56.189960 0.000381 1.434000 0.273071 ... 238115511 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 11 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
11 35430820 SB48997_island_2516 SB48997_component_2516a 0.207000 150.968353 0.000086 -56.189968 0.000120 3.726000 0.212435 ... 238285114 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 12 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
12 35430820 SB49129_island_1509 SB49129_component_1509a 0.278000 150.968384 0.000051 -56.189739 0.000069 7.554000 0.278416 ... 235160232 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 13 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
13 35430820 SB49575_island_1932 SB49575_component_1932a 0.221000 150.968460 0.000060 -56.189651 0.000072 5.411000 0.218041 ... 233868847 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 14 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
14 35430820 SB49898_island_2732 SB49898_component_2732a 0.237000 150.968155 0.000111 -56.189526 0.000122 3.381000 0.241283 ... 234051315 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 15 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
15 35430820 SB50128_island_1691 SB50128_component_1691a 0.211000 150.968323 0.000049 -56.189911 0.000056 6.506000 0.212192 ... 234239511 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 16 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
16 35430820 SB50341_island_1969 SB50341_component_1969a 0.190000 150.968552 0.000052 -56.189674 0.000064 5.217000 0.190121 ... 234434327 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 17 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
17 35430820 SB50403_island_2591 SB50403_component_2591a 0.205000 150.968613 0.000094 -56.189503 0.000114 3.505000 0.208885 ... 234623492 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 18 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
18 35430820 SB50672_island_1971 SB50672_component_1971a 0.218000 150.968414 0.000063 -56.189808 0.000068 5.308000 0.219149 ... 238833271 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 19 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
19 35430820 SB50818_island_1711 SB50818_component_1711a 0.201000 150.968552 0.000050 -56.189686 0.000053 6.233000 0.201942 ... 239287554 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 20 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
20 35430820 SB51081_island_2583 SB51081_component_2583a 0.216000 150.968857 0.000090 -56.189541 0.000089 3.556000 0.212126 ... 240436329 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 21 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True
21 35430820 SB51554_island_4125 SB51554_component_4125a 0.210000 150.968903 0.000214 -56.189510 0.000222 1.651000 0.215679 ... 241307039 /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-survey/VAST/vast-data/TILES/STOKESI... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 22 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True

22 rows × 51 columns

source.measurements.columns
Index(['source', 'island_id', 'component_id', 'local_rms', 'ra', 'ra_err',
       'dec', 'dec_err', 'flux_peak', 'flux_peak_err', 'flux_int',
       'flux_int_err', 'bmaj', 'err_bmaj', 'bmin', 'err_bmin', 'pa', 'err_pa',
       'psf_bmaj', 'psf_bmin', 'psf_pa', 'flag_c4', 'chi_squared_fit',
       'spectral_index', 'spectral_index_from_TT', 'has_siblings', 'image_id',
       'dateobs', 'name', 'snr', 'compactness', 'ew_sys_err', 'ns_sys_err',
       'error_radius', 'uncertainty_ew', 'uncertainty_ns', 'weight_ew',
       'weight_ns', 'forced', 'flux_int_isl_ratio', 'flux_peak_isl_ratio',
       'id', 'image', 'rms', 'selavy', 'frequency', 'field', 'epoch', 'stokes',
       'skycoord', 'detection'],
      dtype='object')
lc = source.plot_lightcurve()
No description has been provided for this image
cutouts = source.show_all_png_cutouts(columns=5, figsize=(30,30))
No description has been provided for this image
cutouts = source.show_png_cutout(13)
No description has been provided for this image
source.simbad_search()
Table length=1
MAIN_IDRADECRA_PRECDEC_PRECCOO_ERR_MAJACOO_ERR_MINACOO_ERR_ANGLECOO_QUALCOO_WAVELENGTHCOO_BIBCODERA_dDEC_dSCRIPT_NUMBER_ID
"h:m:s""d:m:s"masmasdegdegdeg
objectstr13str13int16int16float32float32int16str1str1objectfloat64float64int32
HD 8752510 03 52.5630-56 11 22.88314140.0230.02290AO2020yCat.1350....0G150.96901286-56.189689931
source.ned_search()
Table length=3
No.Object NameRADECTypeVelocityRedshiftRedshift FlagMagnitude and FilterSeparationReferencesNotesPhotometry PointsPositionsRedshift PointsDiameter PointsAssociations
degreesdegreeskm / sarcmin
int32str30float64float64objectfloat64float64objectobjectfloat64int32int32int32int32int32int32int32
1HD 087525150.96708-56.19278*----8.1 V0.1884001000
2WISEA J100352.52-561122.6150.96871-56.18964IrS----0.01100173000
32MASS J10035444-5611320150.97687-56.19223IrS----0.3180061000
contour_plot = source.skyview_contour_plot(13, 'DSS')
No description has been provided for this image

Things you can do with a Source:

  • Plot lightcurves
  • Plot cutouts and save to PNG
  • Save FITS cutouts
  • Save region files
  • Search Simbad and NED
  • Create contour plots with Skyview

Accessing general data products with vast-tools

Searching for Stokes V emission

idx = 34951897
stokes_i_source = run.get_source(idx)
stokes_i_lc = stokes_i_source.plot_lightcurve()
No description has been provided for this image
query = Query(
    coords=stokes_i_source.coord,
    source_names=[stokes_i_source.name], # doesn't have to be provided
    matches_only=False, # return all sources regardless of if they are detected
    epochs="all-vast", # Automatically query all observed VAST epochs, although not all are available on nimbus or in the form we require
    crossmatch_radius=10., # Search for matches within a 10" radius
    output_dir='example-output',
    forced_fits=False, # Do not run forced fitting - I recommend turning this off for initial explorations because it is slow due to poor I/O on nimbus
    use_tiles=True, # We only have TILES data for the full survey
    corrected_data=False, # Do not use corrected data - this is not yet available for the full survey
    stokes='V' # Search Stokes V
)

query.find_sources()
Stokes V tiles are only available for the full VAST survey. Proceed with caution!
Stokes V images unavailable for epoch 1
Stokes V catalogues unavailable for epoch 1
Stokes V RMS maps unavailable for epoch 1
Stokes V images unavailable for epoch 2
Stokes V catalogues unavailable for epoch 2
Stokes V RMS maps unavailable for epoch 2
Stokes V images unavailable for epoch 3x
Stokes V catalogues unavailable for epoch 3x
Stokes V RMS maps unavailable for epoch 3x
Stokes V images unavailable for epoch 4x
Stokes V catalogues unavailable for epoch 4x
Stokes V RMS maps unavailable for epoch 4x
Stokes V images unavailable for epoch 5x
Stokes V catalogues unavailable for epoch 5x
Stokes V RMS maps unavailable for epoch 5x
Stokes V images unavailable for epoch 6x
Stokes V catalogues unavailable for epoch 6x
Stokes V RMS maps unavailable for epoch 6x
Stokes V images unavailable for epoch 7x
Stokes V catalogues unavailable for epoch 7x
Stokes V RMS maps unavailable for epoch 7x
Stokes V images unavailable for epoch 8
Stokes V catalogues unavailable for epoch 8
Stokes V RMS maps unavailable for epoch 8
Stokes V images unavailable for epoch 9
Stokes V catalogues unavailable for epoch 9
Stokes V RMS maps unavailable for epoch 9
Stokes V images unavailable for epoch 10x
Stokes V catalogues unavailable for epoch 10x
Stokes V RMS maps unavailable for epoch 10x
Stokes V images unavailable for epoch 11x
Stokes V catalogues unavailable for epoch 11x
Stokes V RMS maps unavailable for epoch 11x
Stokes V images unavailable for epoch 12
Stokes V catalogues unavailable for epoch 12
Stokes V RMS maps unavailable for epoch 12
Stokes V images unavailable for epoch 13
Stokes V catalogues unavailable for epoch 13
Stokes V RMS maps unavailable for epoch 13
Stokes V images unavailable for epoch 17
Stokes V catalogues unavailable for epoch 17
Stokes V RMS maps unavailable for epoch 17
Stokes V images unavailable for epoch 18
Stokes V catalogues unavailable for epoch 18
Stokes V RMS maps unavailable for epoch 18
Stokes V images unavailable for epoch 19
Stokes V catalogues unavailable for epoch 19
Stokes V RMS maps unavailable for epoch 19
Stokes V images unavailable for epoch 20
Stokes V catalogues unavailable for epoch 20
Stokes V RMS maps unavailable for epoch 20
Stokes V images unavailable for epoch 21
Stokes V catalogues unavailable for epoch 21
Stokes V RMS maps unavailable for epoch 21
Not all requested data is available! See above for details.
Query will continue run, but proceed with caution.

query.results
name
VAST 082015.4-411435    <vasttools.source.Source object at 0x7f81318fa...
Name: name, dtype: object
stokes_v_source = query.results.iloc[0]
stokes_v_lc = stokes_v_source.plot_lightcurve()
No description has been provided for this image
stokes_i_lc
No description has been provided for this image
stokes_i_source.measurements['sbid'] = stokes_i_source.measurements.island_id.str.split('_').str[0].str[2:].astype(int)
full_stokes_measurements = stokes_i_source.measurements.merge(stokes_v_source.measurements, how='left', left_on='sbid', right_on='sbid', suffixes=("_I", "_V"))

full_stokes_measurements['polarisation_frac'] = np.abs(full_stokes_measurements.flux_peak_V/full_stokes_measurements.flux_peak_I)
full_stokes_measurements['polarisation_frac_err'] = full_stokes_measurements.polarisation_frac*np.sqrt((full_stokes_measurements.flux_peak_err_V/full_stokes_measurements.flux_peak_V)**2+(full_stokes_measurements.flux_peak_err_I/full_stokes_measurements.flux_peak_I)**2)
fig = plt.figure(figsize=(16,9))
ax = fig.add_subplot(111)
ax.errorbar(full_stokes_measurements.dateobs_I,
            full_stokes_measurements.polarisation_frac,
            yerr=full_stokes_measurements.polarisation_frac_err,
            marker='o',
            ls='')
ax.set_ylim(bottom=0)
/opt/conda/lib/python3.8/site-packages/numpy/core/_methods.py:44: RuntimeWarning: invalid value encountered in reduce
  return umr_minimum(a, axis, None, out, keepdims, initial, where)
/opt/conda/lib/python3.8/site-packages/numpy/core/_methods.py:40: RuntimeWarning: invalid value encountered in reduce
  return umr_maximum(a, axis, None, out, keepdims, initial, where)

(0.0, 0.10049134762957693)
No description has been provided for this image

Catalogue crossmatching

from vasttools.moc import VASTMOCS
mocs = VASTMOCS()
psrcat_vast_sources = mocs.query_vizier_vast_pilot('B/psr', max_rows=200000) # Get all PSRCat sources that are within the VAST footprint

psrcat_vast_sources
Table length=347
_RAJ2000_DEJ2000PSRJr_PSRJRAJ2000DEJ2000Plxe_Plxr_PlxP0e_P0r_P0DMe_DMr_DMS400e_S400r_S400DistDistDMr_DistDMAgeEdot
degdegmasmassspc.cm**-3pc.cm**-3mJymJykpckpcyr1e-07W
float64float64objectstr7str11str11float32float32str7float64float32str7float64float32str7float32float64str6float32float32str4float64float64
8.5909506-5.5768389J0034-0534bhl+9400 34 21.83-05 34 36.6----0.001877181884582e-16aaa+10b13.7651704e-05aaa+10b17.005.0000tbms980.980.98tc935990000000.03e+34
8.5369597-7.3648358J0034-0721lvw69a00 34 08.87-07 21 53.40.9300.080cbv+090.942950994559802e-12hlk+0410.9220000.006srb+1552.0012.0000lylg951.030.63tc9336600000.02e+31
11.3570417-70.7019722J0045-7042mfl+0600 45 25.69-70 42 07.1----0.632335800020006e-11mfl+0670.0000003.0mfl+06----59.702.43tc934020000.04e+32
11.3965000-73.3175000J0045-7319mmh+9100 45 35.16-73 19 03.0----0.926275904970003e-11kbm+96105.4000000.7kjb+941.00--mmh+9159.702.55tc933290000.02e+32
14.4333333-72.0219444J0057-7201ckm+0100 57 44.00-72 01 19.0----0.738062442600002e-10ckm+0127.0000005.0ckm+01----2.492.49tc93117000000.01e+31
15.1792917-72.1926667J0100-7211lfmp0201 00 43.03-72 11 33.6----8.020392000000009e-06mgr+05--------59.70--6760.01e+33
17.8698750-71.5296667J0111-7131mfl+0601 11 28.77-71 31 46.8----0.688541511640005e-11mfl+0676.0000003.0mfl+06----59.702.46tc931540000.09e+32
18.2962083-72.3422778J0113-7220ckm+0101 13 11.09-72 20 32.2----0.325883016130001e-11ckm+01125.4900000.03ckm+01----59.702.51tc931060000.06e+33
22.8687917-73.1692611J0131-7310mfl+0601 31 28.51-73 10 09.3----0.348124045581007e-12mfl+06205.2000000.7mfl+06----59.702.55tc933130000.02e+33
.....................................................................
326.4602561-7.8384656J2145-0750bhl+9421 45 50.46-07 50 18.51.8400.170rhc+150.016052423918094e-16rhc+158.997610--rhc+15100.0030.0000tbms980.530.50tc938540000000.03e+32
328.7558333-56.6991667J2155-5641mlt+7821 55 01.40-56 41 57.0----1.373654387000002e-09nmc8114.0000009.0nmc812.10--tml930.860.86tc935150000.06e+31
335.5248714-1.6210344J2222-0137blr+1322 22 05.97-01 37 15.73.7420.016dbl+130.032817859053073e-15kbd+143.2842000.0006kbd+14----0.270.17tc938870000000.07e+31
339.2160458-55.4635647J2236-5527bbb+1322 36 51.85-55 27 48.8----0.006907549392923e-15bbb+1320.0000000.5bbb+13----2.032.03tc9311400000000.01e+33
340.4250772-52.6100628J2241-5236kjr+1122 41 42.02-52 36 36.2----0.002186699771551e-15kjr+1111.4108503e-05kjr+11----0.680.68tc935220000000.02e+34
342.1121000-1.0300278J2248-0101mld+9622 48 26.90-01 01 48.1----0.477233119123003e-12hlk+0429.0500000.03hlk+0411.00--mld+962.282.28tc9311500000.02e+32
344.2349583-10.4095472J2256-1024hrm+1122 56 56.39-10 24 34.4----0.00229000000000--hrm+1113.800000--hrm+117.00--hrm+110.910.91tc93----
351.3137500-5.5108333J2325-0530kkl+1523 25 15.30-05 30 39.0----0.868735115025008e-12kkl+1514.9660000.007kkl+15----1.071.07tc9313400000.06e+31
354.9114167-5.5514778J2339-0533rbs+1423 39 38.74-05 33 05.3----0.002884226741552e-16pc15--------1.10--3240000000.02e+34
356.7102250-6.1665278J2346-0609mld+9623 46 50.45-06 09 59.5----1.181463382967005e-12hlk+0422.5040000.02hlk+0411.00--mld+961.961.96tc9313700000.03e+31
psrcat_pd = psrcat_vast_sources.to_pandas()
psr_scs = SkyCoord(psrcat_pd._RAJ2000, psrcat_pd._DEJ2000, unit=u.deg)

psr_names = list(psrcat_pd.PSRJ)

Crossmatch to the pipeline

This will only provide you with information on sources that are detected at least once in the pipeline run. You should do this if you only care about detections

idx, d2d, _ = psr_scs.match_to_catalog_sky(run.sources_skycoord)
radius_limit = 15 * u.arcsec
d2d_mask = d2d &lt;= radius_limit
# How many pulsars are detected?
d2d_mask.sum() 
155
# Select the crossmatches less than 15 arcsec
psrcat_crossmatch_result = psrcat_pd.loc[d2d_mask].copy()

# Append the id and distance of the VAST crossmatch to the PSRCAT sources
psrcat_crossmatch_result['vast_xmatch_id'] = run.sources.iloc[idx[d2d_mask]].index.values
psrcat_crossmatch_result['vast_xmatch_d2d_asec'] = d2d[d2d_mask].arcsec

# Join the result
psrcat_crossmatch_result = psrcat_crossmatch_result.merge(run.sources, how='left', left_on='vast_xmatch_id', right_index=True, suffixes=("_psrcat", "_vast"))
psrcat_crossmatch_result
_RAJ2000 _DEJ2000 PSRJ r_PSRJ RAJ2000 DEJ2000 Plx e_Plx r_Plx P0 ... eta_int eta_peak new new_high_sigma n_neighbour_dist n_measurements n_selavy n_forced n_siblings n_relations
0 8.590951 -5.576839 J0034-0534 bhl+94 00 34 21.83 -05 34 36.6 NaN NaN 0.001877 ... 10.305090 14.145589 False 0.000000 0.080727 2 1 1 0 0
1 8.536960 -7.364836 J0034-0721 lvw69a 00 34 08.87 -07 21 53.4 0.930 0.080 cbv+09 0.942951 ... 809.955380 2620.817874 False 0.000000 0.046545 2 2 0 0 0
7 18.296208 -72.342278 J0113-7220 ckm+01 01 13 11.09 -72 20 32.2 NaN NaN 0.325883 ... 3.615753 4.886742 True 5.127810 0.080766 21 7 14 0 0
9 23.385250 -69.958244 J0133-6957 lml+98 01 33 32.46 -69 57 29.7 NaN NaN 0.463474 ... 8.420204 13.769838 True 5.441603 0.011036 21 7 14 0 0
10 27.844587 -6.584111 J0151-0635 mlt+78 01 51 22.70 -06 35 02.8 NaN NaN 1.464665 ... 0.000000 0.000000 False 0.000000 0.032858 1 1 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
339 335.524871 -1.621034 J2222-0137 blr+13 22 22 05.97 -01 37 15.7 3.742 0.016 dbl+13 0.032818 ... 878.505527 1943.767409 False 0.000000 0.028904 2 2 0 0 0
340 339.216046 -55.463565 J2236-5527 bbb+13 22 36 51.85 -55 27 48.8 NaN NaN 0.006908 ... 3.699505 7.128673 True 7.651812 0.039470 2 1 1 0 0
341 340.425077 -52.610063 J2241-5236 kjr+11 22 41 42.02 -52 36 36.2 NaN NaN 0.002187 ... 22.747746 36.574156 False 0.000000 0.005697 2 1 1 1 0
342 342.112100 -1.030028 J2248-0101 mld+96 22 48 26.90 -01 01 48.1 NaN NaN 0.477233 ... 0.000000 0.000000 False 0.000000 0.047162 1 1 0 0 0
346 356.710225 -6.166528 J2346-0609 mld+96 23 46 50.45 -06 09 59.5 NaN NaN 1.181463 ... 5.524888 11.657630 False 0.000000 0.030879 3 3 0 0 0

155 rows × 52 columns

Use a Query

This will provide you with information on all sources regardless of whether they're detected. You should do this if a non-detection is still useful to you.

"""
psrcat_query = Query(
    coords=psr_scs,
    source_names=psr_names, 
    matches_only=False,
    epochs="all-vast",
    crossmatch_radius=10., # Search for matches within a 10" radius
    output_dir='example-output',
    forced_fits=False, # Do not run forced fitting - I recommend turning this off for initial explorations because it is slow due to poor I/O on nimbus
    use_tiles=True, # 
    corrected_data=False, # Do not use corrected data - this is not yet available for the full survey
)

psrcat_query.find_sources()
"""

Last update: July 29, 2024
Created: July 29, 2024