@@ -738,21 +738,22 @@ We can type the following::
738
738
2.6. Cross match
739
739
^^^^^^^^^^^^^^^^
740
740
741
- It is possible to run a geometric cross-match between the RA/Dec coordinates of two tables
742
- using the crossmatch function provided by the archive. In order to do so the user must be
743
- logged in. This is required because the cross match operation will generate a join table
744
- in the user private area. That table contains the identifiers of both tables and the separation,
745
- in degrees, between RA/Dec coordinates of each source in the first table and its associated
746
- source in the second table.
741
+ It is possible to run a geometric cross-match between the RA/Dec coordinates of two tables using the crossmatch function
742
+ provided by the archive. To do so, the user must be logged in. This is necessary as the cross-match process will create
743
+ a join table within the user's private space. That table includes the identifiers from both tables and the angular
744
+ separation, in degrees, between the RA/Dec coordinates of each source in the first table and its corresponding source
745
+ in the second table.
747
746
748
747
The cross-match requires 3 steps:
749
748
750
- # Update the user table metadata to flag the positional RA/Dec columns using the dedicated method
751
- `~astroquery.utils.tap.core.TapPlus.update_user_table `, since both tables must have defined RA and Dec columns. See
752
- previous section to know how to assign those flags;
753
- # Launch the built-in cross-match method `~astroquery.gaia.GaiaClass.cross_match `, the makes a table in the user's
749
+ 1. Update the user table metadata to flag the positional RA/Dec columns using the dedicated method
750
+ `~astroquery.utils.tap.core.TapPlus.update_user_table `, as both tables must have defined RA and Dec columns. See
751
+ previous section to learn how to assign those flags;
752
+
753
+ 2. Launch the built-in cross-match method `~astroquery.gaia.GaiaClass.cross_match `, which creates a table in the user's
754
754
private area;
755
- # Later, this table can be used to obtain the actual data from both tables, launching an ADQL query using the
755
+
756
+ 3. Subsequently, this table can be employed to retrieve the data from both tables, launching an ADQL query with the
756
757
"launch_job" or "launch_job_async" method.
757
758
758
759
The following example uploads a table and then, the table is used in a cross match::
@@ -771,7 +772,7 @@ The following example uploads a table and then, the table is used in a cross mat
771
772
772
773
The cross-match launches an asynchronous query that saves the results at the user's private area, so it depends on the
773
774
user files quota. This table only contains 3 columns: first table column id, second table column id and the angular
774
- separation (ded ) between each source. Once you have your cross match finished, you can access to this table::
775
+ separation (degrees ) between each source. Once you have your cross match finished, you can access to this table::
775
776
776
777
>>> xmatch_table = 'user_<your_login_name>.' + xmatch_table_name
777
778
>>> query = (f"SELECT c.separation*3600 AS separation_arcsec, a.*, b.* FROM gaiadr3.gaia_source AS a, "
@@ -796,10 +797,10 @@ The previous 3-step cross-match can be executed in one step by the following met
796
797
Output file: 1611860482314O-result.vot.gz
797
798
Results: None
798
799
799
- This method updates all the user table metadata to flag the positional RA/Dec columns, launches the positional
800
- cross-match as an asynchronous query. The returned job provides information for all the columns in both input tables
801
- plus the angular distance (deg) between each cross- matched source. Unlike the previous 3-step method, the output table
802
- contains all the columns from each table, so that size of the cross-match output could be pretty large.
800
+ This method updates the user table metadata to flag the positional RA/Dec columns and launches the positional
801
+ cross-match as an asynchronous query. Unlike the previous 3-step cross-match method, the returned job provides direct
802
+ access to the output of the cross-match information: for each matched source, all the columns from the input tables plus
803
+ the angular distance (degrees). Therefore, the size of the output can be quite large.
803
804
804
805
805
806
2.7. Tables sharing
0 commit comments