Last modified: 18 January 2024

How can I query for uniquely associated sources and their data products?


Each CSC source can be associated with multiple detections. In particular, if a source has been detected in multiple Chandra observations, the observation level data products (e.g. spectra, light curves, PSF, etc.) for each of the detections will appear in CSCview as associated to that source. That is the reason why may see multiple files for a source: each file corresponds to a different detection of the source.

Detections are not always uniquely associated with a single source. For example, because the PSF of Chandra becomes larger with off-axis angle, a given observation-level detection can be associated with more than one source, because for large off-axis angles, multiple sources can be blended in the PSF of that particular observation. That is why we do not include the name of the source in the observation-level data products, since in some cases, the detection can be associated with a single source. However, in the majority of cases detections are uniquely associated with a single source. In order to only retrieve an uniquely associated source, the user should include the 'a.match_type = u' condition in the search criteria window in CSCview.

By going to ViewQueryShow Language in CSCview, the user can also enter ADQL queries. For example, the following query results in a list of 1000 entries with CSC 2.0 sources, with the corresponding ObsIDs and region IDs of the detections that are uniquely associated to them. It uses the association table to search for the match type:

	      SELECT DISTINCT top 1000 m.name,o.obsid,o.region_id,m.ra,m.dec,m.err_ellipse_r0,m.err_ellipse_r1,m.err_ellipse_ang,m.significance,m.likelihood_class,m.conf_flag,m.sat_src_flag,m.streak_src_flag,m.flux_aper_b,m.flux_aper_lolim_b,m.flux_aper_hilim_b,m.flux_aper_w,m.flux_aper_lolim_w,m.flux_aper_hilim_w,m.flux_aper_avg_b,m.flux_aper_avg_lolim_b,m.flux_aper_avg_hilim_b,m.flux_aper_avg_w,m.flux_aper_avg_lolim_w,m.flux_aper_avg_hilim_w FROM master_source m , master_stack_assoc a , observation_source o , stack_observation_assoc b , stack_source s WHERE ((a.match_type = 'u')) AND (m.name = a.name) AND (s.detect_stack_id = a.detect_stack_id and s.region_id = a.region_id) AND (s.detect_stack_id = b.detect_stack_id and s.region_id = b.region_id) AND (o.obsid = b.obsid and o.obi = b.obi and o.region_id = b.region_id)ORDER BY name ASC
	    

Finally, if you would like to download the data products through Python, the "Accessing release 2.0 of the Chandra Source Catalog with PyVO and CIAO tools, with basic science applications using AstroPy and scikit-learn" Jupyter notebook includes a demonstration of accessing the data products.