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',
 'GalCtr_p2',
 'VAST_2118-06A',
 'combined',
 'dwf-jan-2024',
 'dwf_O12',
 'dwf_sep2021_final',
 'equatorial-feb-2024',
 'extragalactic-postprocessed-no-forced',
 'full_survey_tiles',
 'full_survey_tiles_processed',
 'galactic-postprocessed',
 'galactic-postprocessed-no-forced',
 'galactic-postprocessed-test',
 'galctr_p1_test',
 'gw190814_10_epochs',
 'mc_p1_test',
 'racs-low-tiles-bane',
 'racs_comparison',
 'racs_comparison_no_force',
 'smc-low',
 'test_ui_1',
 'tiles-low-corrected',
 'tiles-mid-corrected',
 'tiles_corrected',
 'vpp_test_may2024',
 'workshop-2023-run']
run_name = 'workshop-2023-run'
run = pipe.load_run(run_name)
/home/ddobie/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
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
25214 1 9318 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1753-18.SB54901.cont.taylor.0.res... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... 2023-11-18 05:16:50+00:00 2.460267e+06 ... 0.003111 80.75 0.280685 0.192204 4.882906 268.364367 -18.864008 4.454773 887.0 0.0
25215 1 9319 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1806-12.SB54902.cont.taylor.0.res... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... 2023-11-18 05:29:46.400000+00:00 2.460267e+06 ... 0.003139 79.97 0.260544 0.173010 20.285364 271.579657 -12.586381 4.454763 887.0 0.0
25216 1 9320 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1806-25.SB54909.cont.taylor.0.res... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... 2023-11-18 07:03:39.900000+00:00 2.460267e+06 ... 0.003056 71.97 0.314540 0.194073 19.611053 271.698880 -25.131178 4.454773 887.0 0.0
25217 1 9321 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1819-18.SB54903.cont.taylor.0.res... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... 2023-11-18 05:42:52.700000+00:00 2.460267e+06 ... 0.003111 80.57 0.351413 0.199187 240.601242 274.909821 -18.864008 4.454773 887.0 0.0
25218 1 9322 /data/vast-pipeline/vast-pipeline/pipeline-run... I image.i.VAST_1831-12.SB54904.cont.taylor.0.res... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... 2023-11-18 05:56:09+00:00 2.460267e+06 ... 0.003139 79.44 0.347697 0.202735 19.222761 277.895445 -12.586381 4.454763 887.0 0.0

1593 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.139999389648440.00104108790401369333.450000047683716 3.170000076293945326.540000915527344True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a2681.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.139999389648440.00104108790401369333.450000047683716 3.170000076293945326.540000915527344True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a2681.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.139999389648440.00104108790401369333.450000047683716 3.170000076293945326.540000915527344True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a2681.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.139999389648440.00104108790401369333.450000047683716 3.170000076293945326.540000915527344True 5391.97802734375 -0.009999999776482582True False 23896 2022-11-14 03:18:35.400000VAST_1600-50A_SB45535_component_2a2681.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.059997558593750.00131803750991821293.48000001907348633.200000047683716 42.72999954223633 True 5720.62890625 -0.009999999776482582True False 23897 2022-11-14 03:48:27 VAST_1600-50A_SB45536_component_2a2280.8740234375 1.06558823585510250.000277777784503996370.000277777784503996371.2074182222931995e-060.0002777804038487375 0.0002777804038487375 12959755.0 12959755.0 False 1.0 1.0 236412363
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
14,105,42035902552SB50447_island_12562SB50447_component_12562a0.20543844997882843252.1146240234375 2.7777778086601757e-06-38.2888755798339842.7777778086601757e-060.6398051977157593 0.205438449978828430.6398051977157593 0.2054384499788284311.8000001907348630.0 11.6999998092651370.0 -20.1200008392334 0.0 11.80000019073486311.699999809265137-20.1200008392334 False 262.0259704589844 0.0 False False 24419 2023-06-12 15:06:34.800000SB50447_component_12562a_f_run064 3.114340305328369 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 253779994
14,105,42135902552SB50645_island_12482SB50645_component_12482a0.19271238148212433252.1146240234375 2.7777778086601757e-06-38.2888755798339842.7777778086601757e-060.7506024241447449 0.192712381482124330.7506024241447449 0.1927123814821243312.6000003814697270.0 11.8000001907348630.0 -67.680000305175780.0 12.60000038146972711.800000190734863-67.68000030517578False 302.3309631347656 0.0 False False 24493 2023-06-21 13:51:10.700000SB50645_component_12482a_f_run064 3.8949360847473145 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 253780584
14,105,42235902552SB50696_island_12499SB50696_component_12499a0.19923138618469238252.1146240234375 2.7777778086601757e-06-38.2888755798339842.7777778086601757e-06-0.034266568720340730.19923138618469238-0.034266568720340730.1992313861846923812.3999996185302730.0 11.3999996185302730.0 47.90999984741211 0.0 12.39999961853027311.39999961853027347.90999984741211 False 188.137710571289060.0 False False 24494 2023-06-22 15:26:39.400000SB50696_component_12499a_f_run064 -0.171993821859359741.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 253781171
14,105,42335902552SB51101_island_12451SB51101_component_12451a0.20067891478538513252.1146240234375 2.7777778086601757e-06-38.2888755798339842.7777778086601757e-060.49483880400657654 0.200678914785385130.49483880400657654 0.2006789147853851312.3000001907348630.0 11.6999998092651370.0 -77.919998168945310.0 12.30000019073486311.699999809265137-77.91999816894531False 259.2095031738281 0.0 False False 24904 2023-07-04 13:06:27.700000SB51101_component_12451a_f_run064 2.4658234119415283 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 253781758
14,105,42435902552SB51527_island_12495SB51527_component_12495a0.18647950887680054252.1146240234375 2.7777778086601757e-06-38.2888755798339842.7777778086601757e-060.7396038770675659 0.186479508876800540.7396038770675659 0.1864795088768005412.1999998092651370.0 11.5 0.0 41.66999816894531 0.0 12.19999980926513711.5 41.66999816894531 False 220.589981079101560.0 False False 25026 2023-07-21 13:10:55.100000SB51527_component_12495a_f_run064 3.966140031814575 1.0 0.000277777784503996370.000277777784503996370.0 0.000277791667031124230.0002777916670311242312958704.0 12958704.0 True 1.0 1.0 253782343
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
34126488 235.304934 -50.929660 1.073665 73.754721 147.232421 0.000052 0.000052 185.123184 181.912632 2311.652506 ... 1.971324e+06 2.371766e+06 False 0.000000 0.000084 29 27 2 27 1
34126498 241.517934 -49.764222 1.059014 122.555870 339.596620 0.000052 0.000052 84.226517 79.449586 85.165001 ... 1.921033e+02 4.445944e+02 False 0.000000 0.000040 29 29 0 6 1
34126530 243.053857 -51.397508 1.179295 5.240477 6.377414 0.000062 0.000062 18.824238 17.168962 21.318001 ... 5.482851e-01 3.851015e-01 False 0.000000 0.033314 29 14 15 0 0
34126538 237.681250 -49.044970 1.087859 53.292253 72.576743 0.000052 0.000052 16.648069 15.303759 15.868000 ... 9.197355e-01 1.520540e+00 False 0.000000 0.055672 29 29 0 0 0
34126549 241.157086 -49.350385 1.312707 30.268222 46.556910 0.000053 0.000053 14.617207 11.140724 11.823000 ... 1.066362e+00 2.524573e+00 False 0.000000 0.003261 29 29 0 2 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
35913538 255.582887 -39.362392 0.780446 5.316109 5.316109 0.000054 0.000054 0.994881 1.009103 2.566718 ... 3.614592e+00 3.861933e+00 True 2.530846 0.006004 27 1 26 0 0
35913539 254.702066 -38.767132 0.745752 6.135135 6.135135 0.000054 0.000054 0.595439 0.610401 1.589000 ... 1.403463e+00 1.968079e+00 True 5.152269 0.006505 27 1 26 0 0
35913540 251.427264 -38.596671 0.508260 4.454546 4.454546 0.000054 0.000054 4.306362 4.325103 16.090272 ... 1.308322e+02 1.315195e+02 True 3.285353 0.003161 27 1 26 1 0
35913541 249.564684 -35.304856 0.735697 5.128099 5.128099 0.000054 0.000054 -0.074651 -0.062503 1.241000 ... 1.477250e+00 2.464737e+00 True 4.324670 0.057520 27 1 26 0 0
35913542 253.956076 -37.787410 0.765209 5.057692 5.057692 0.000054 0.000054 -0.027302 -0.018154 1.052000 ... 1.140372e+00 2.040344e+00 True 4.283592 0.027273 27 1 26 0 0

1787057 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
34126488 1.073665 73.754721 147.232421 181.912632 2311.652506 36.606998 2.852090 2.371766e+06 0.000084 29 27 2
34126498 1.059014 122.555870 339.596620 79.449586 85.165001 42.771999 0.091012 4.445944e+02 0.000040 29 29 0
34126530 1.179295 5.240477 6.377414 17.168962 21.318001 12.748669 0.139303 3.851015e-01 0.033314 29 14 15
34126538 1.087859 53.292253 72.576743 15.303759 15.868000 14.490000 0.019823 1.520540e+00 0.055672 29 29 0
34126549 1.312707 30.268222 46.556910 11.140724 11.823000 10.033000 0.041163 2.524573e+00 0.003261 29 29 0
... ... ... ... ... ... ... ... ... ... ... ... ...
35913538 0.780446 5.316109 5.316109 1.009103 2.566718 -0.067172 0.667635 3.861933e+00 0.006004 27 1 26
35913539 0.745752 6.135135 6.135135 0.610401 1.589000 -0.211949 0.581332 1.968079e+00 0.006505 27 1 26
35913540 0.508260 4.454546 4.454546 4.325103 16.090272 1.029000 0.709703 1.315195e+02 0.003161 27 1 26
35913541 0.735697 5.128099 5.128099 -0.062503 1.241000 -0.651349 -5.867430 2.464737e+00 0.057520 27 1 26
35913542 0.765209 5.057692 5.057692 -0.018154 1.052000 -0.418536 -15.713054 2.040344e+00 0.027273 27 1 26

1787057 rows × 12 columns

run.sources_skycoord
<SkyCoord (ICRS): (ra, dec) in deg
    [(235.30493386, -50.92965971), (241.51793441, -49.76422214),
     (243.05385731, -51.39750831), ..., (251.427264  , -38.596671  ),
     (249.564684  , -35.304856  ), (253.956076  , -37.78741   )]>

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.000057 0.000057 1.686887 1.656012 25.120001 ... 40.271944 112.746520 True 53.775164 0.041538 24 1 23 0 0
34710644 263.516906 -34.753628 1.151416 30.627292 30.627292 0.000054 0.000054 0.702689 0.618355 15.038000 ... 12.957861 33.392207 True 26.702201 0.065099 27 1 26 0 0
35670866 175.723304 -64.952444 0.990379 25.710528 25.710528 0.000054 0.000054 0.114991 0.116731 4.885000 ... 9.119153 25.706488 True 17.335050 0.035966 27 1 26 0 0
35302624 122.955231 -44.899964 1.139066 15.562189 15.562189 0.000055 0.000055 0.309232 0.292502 3.128000 ... 4.991724 9.842859 False 0.000000 0.030356 26 1 25 0 0
34847432 262.542260 -25.718873 1.394580 12.399194 12.399194 0.000057 0.000057 0.544544 0.392878 9.225000 ... 3.756409 7.238142 True 40.181501 0.020534 24 1 23 0 0
34945402 273.629631 -17.157413 1.164271 12.295762 12.295762 0.000056 0.000056 2.170884 2.081284 13.636000 ... 3.478091 6.227520 True 11.529048 0.053803 25 1 24 0 0
35785232 145.804384 -48.956930 1.126368 12.256098 12.256098 0.000055 0.000055 0.197858 0.183205 3.015000 ... 3.608003 7.031639 True 14.603400 0.064507 26 1 25 0 0
35199035 267.978600 -25.859781 1.179800 12.022556 12.022556 0.000057 0.000057 0.268677 0.220760 6.396000 ... 3.158683 6.736114 True 13.347927 0.046077 24 1 23 0 0
35321189 271.433583 -14.378291 1.059079 10.463637 10.463637 0.000053 0.000053 0.105508 0.100651 2.302000 ... 2.862566 5.250726 True 8.315845 0.048352 28 1 27 0 0

9 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)
/home/ddobie/user-conda-envs/vast-tools-dev/lib/python3.9/site-packages/pandas/core/arraylike.py:402: RuntimeWarning: invalid value encountered in log10
  result = getattr(ufunc, method)(*inputs, **kwargs)
Negative V encountered. Removing...

1.8809444808638816 0.11821744741051284

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
34127634 271.528180 -11.908259 1.110152 13.025891 49.935134 0.000056 0.000056 5.782393 5.257679 9.619 ... 17.399827 53.390392 False 0.0 0.056596 28 28 0 0 0
34128748 27.763016 -74.857142 1.025268 6.003610 15.550460 0.000076 0.000076 2.377583 2.337917 3.390 ... 1.638765 5.420283 False 0.0 0.022088 24 24 0 0 0
34129003 89.342592 -71.686153 1.112134 5.407895 14.818182 0.000072 0.000072 3.351115 3.053691 4.564 ... 2.498818 5.120180 False 0.0 0.083930 26 25 1 0 0
34130968 108.940856 -19.582165 1.101197 20.216312 38.923445 0.000057 0.000057 6.979231 6.345923 8.255 ... 7.077783 17.831713 False 0.0 0.058245 26 26 0 0 0
34131668 129.746775 -34.279616 1.066159 26.144068 42.657479 0.000056 0.000056 10.280192 9.634038 11.638 ... 7.847545 17.959600 False 0.0 0.019459 26 26 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
35768159 116.887441 -16.234615 1.206160 6.060241 14.261224 0.000071 0.000071 2.654962 2.261000 3.494 ... 1.402564 4.006265 False 0.0 0.052263 26 26 0 0 0
35768501 113.979784 -17.767081 1.253171 4.746178 11.559259 0.000071 0.000071 3.063370 2.574332 3.500 ... 2.098686 2.065145 False 0.0 0.054466 26 21 5 0 0
35769734 119.325038 -36.529771 1.056829 23.389141 39.423282 0.000056 0.000056 6.940462 6.583231 8.597 ... 6.694280 22.413123 False 0.0 0.026297 26 26 0 0 0
35771365 145.107796 -56.970184 1.088006 6.536885 13.569892 0.000068 0.000068 2.280577 2.098269 2.588 ... 1.050022 2.051972 False 0.0 0.027185 26 26 0 0 0
35771635 157.857964 -55.350350 1.100037 6.940298 18.314516 0.000063 0.000063 3.572577 3.252615 4.542 ... 1.773656 3.822081 False 0.0 0.017990 26 26 0 0 0

1508 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.281914 -26.304572 1.138409 17.659630 36.521928 0.000059 0.000059 2.755221 1.782179 8.327000 ... 1.105371 2.804124 False 0.0 0.051670 24 23 1 0 0
34947439 264.532864 -25.991999 1.142117 12.307693 24.516433 0.000060 0.000060 9.264070 8.587612 86.688689 ... 0.746505 1.957826 False 0.0 0.043667 24 23 1 0 0
35656598 174.872614 -65.397973 1.074069 5.219436 58.476417 0.000060 0.000060 2.071026 1.986470 12.397000 ... 60.388208 153.809589 False 0.0 0.037500 27 15 12 0 0
35181193 264.353115 -25.524130 1.056373 22.479593 35.110576 0.000058 0.000058 10.148296 9.763504 65.914092 ... 0.810047 2.209943 False 0.0 0.052947 24 23 1 0 0
34478919 264.866468 -24.544014 1.100501 6.684932 11.691667 0.000073 0.000073 1.859362 1.692862 2.806000 ... 0.863665 1.881567 False 0.0 0.032605 24 23 1 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
35422407 161.066846 -53.910534 1.063629 92.292495 168.246225 0.000055 0.000055 30.741692 28.913731 36.074001 ... 73.153605 218.717350 False 0.0 0.035275 26 26 0 0 0
34479316 22.556609 -74.340186 1.052080 87.817256 136.262625 0.000057 0.000057 22.612750 21.482083 26.980000 ... 70.193939 184.198174 False 0.0 0.018209 24 24 0 0 0
34484311 145.311037 -49.081732 1.064444 43.692682 74.338884 0.000055 0.000055 12.990000 12.214654 14.333000 ... 17.154013 53.416371 False 0.0 0.041521 26 26 0 0 0
34364405 115.251695 -18.415499 1.050108 61.254238 104.257278 0.000055 0.000055 19.835385 18.888769 21.896999 ... 33.699826 95.905774 False 0.0 0.066153 26 26 0 0 0
35417790 113.943692 -22.575565 1.075500 42.638816 94.337723 0.000054 0.000054 20.300778 18.874815 21.806000 ... 23.909897 66.139005 False 0.0 0.028976 27 27 0 0 0

131 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 35430820 SB51912_island_5346 SB51912_component_5346a 0.211195 150.968460 0.000003 -56.189758 0.000003 0.972484 0.211195 ... 252893731 /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 23 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
23 35430820 SB53279_island_5228 SB53279_component_5228a 0.231509 150.968460 0.000003 -56.189758 0.000003 0.630293 0.231509 ... 252899458 /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 24 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
24 35430820 SB53676_island_5322 SB53676_component_5322a 0.222686 150.968460 0.000003 -56.189758 0.000003 0.510397 0.222686 ... 252905198 /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 25 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... False
25 35430820 SB54884_island_1666 SB54884_component_1666a 0.223000 150.968674 0.000048 -56.189987 0.000056 6.728000 0.224126 ... 252137982 /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-survey/VAST/christmas-2023-postproc... /data/vast-pipeline/vast-pipeline/pipeline-run... 887.0 workshop-2023-run 26 I <SkyCoord (ICRS): (ra, dec) in deg\n (150.9... True

26 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.1874001000
2WISEA J100352.52-561122.6150.96871-56.18964IrS----0.01100173000
32MASS J10035444-5611320150.97687-56.19223IrS----0.3170061000
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
epochs = source.measurements.image.str.extract("epoch_([0-9]+)", expand=True)[0].values.astype(str)

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=list(epochs), # 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
    post_processed_data=False,
    stokes='V' # Search Stokes V
)

query.find_sources()
Using raw TILES data - this should only be selected with good reason! Otherwise, use the default!
Stokes V tiles are only available for the full VAST survey. Proceed with caution!

query.results
name
VAST 082015.4-411435    <vasttools.source.Source object at 0x7fa239696...
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)
(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() 
157
# 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.355028 4.433845 True 5.127810 0.063721 24 7 17 0 0
9 23.385250 -69.958244 J0133-6957 lml+98 01 33 32.46 -69 57 29.7 NaN NaN 0.463474 ... 7.672092 12.593266 True 5.450676 0.010898 24 8 16 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

157 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=True,
    use_tiles=True,
    corrected_data=False,
    post_processed_data=False
)

#psrcat_query.find_sources()
Using raw TILES data - this should only be selected with good reason! Otherwise, use the default!