A Hubble Source Catalog (HSC) Use Case

Example #2: Using CASJOBS to Query the HSC

(Globular Clusters in M87 and a CMD for the LMC)



CasJobs is an online tool used to query large databases. Originally created for the SDSS catalog, it has now been adapted for use of selected MAST archival datasets - namely GALEX, Kepler and the HSC. While the MAST Discovery Portal is the primary tool for using the HSC, CasJobs provides a powerful tool for looking at larger datasets and making more detailed queries. The HSC Homepage is also available for some specific queries (e.g., Use Case #5).

GOAL: This tutorial provides a first look into how to use CasJobs to query the Hubble Source Catalog. For a more detailed tutorial on the syntax behind the queries the SDSS SQL Tutorial is recommended.

SCIENCE CASES: The science cases are: 1. slightly extended objects (i.e., globular clusters in M87) and 2. large datasets (i.e., a CMD for the LMC).

Step 1 - Enter the HST CasJobs webpage http://mastweb.stsci.edu/mcasjobs/ and create an account using the button in the top menu bar. Go ahead and login. *** UPDATE image when available ***
Step 2 - Inspect the HSC databases and functions. Click MyDB in the top menu bar. This displays all the tables and functions you create in "MyDB" (My Database). Now change the "context" (the database used to run your query) from MyDB to HSC, using the dropdown menu on the top left. This shows the available views, tables, functions and procedures related to the HSC database.

For example, click Tables, and then select SumMagAper2Cat (i.e., the HSC Summary Form using magaper2 magnitudes). Scroll across to see the fields located in this table, such as Match ID, the instrument and filter used (i.e., A_F814W is the magnitude using the Advanced Camera for Surveys image and the F814W filter). A description of the table and some of the columns are provided.

The color of the ellipses correspond to the order that the highlighted area is mentioned in the text. Blue is the first item followed by green , orange and yellow in that order.


Step 3 - Query the database. Click Query. Change the context from MyDB to HSC (if necessary). Copy and paste the text from below into the blank query text box, as shown further below. Click Quick in the upper right to submit the job.



This query is designed to find globular clusters in the galaxy M87, with concentration index (CI) between 1.05 and 1.5, and V-I color between 0.0 and 1.0. The HSC Function SearchSumAper2Catalog is used to make a search around the position RA = 187.706, Dec = 12.391, with a radius of 500 arcsec. The columns to list in the output table are defined by the SELECT command, and are defined to be in order of matchID. The number of images in a match is defined to be greater than 50, as discussed in more detail in Step 4.



Since this is a Quick submission, the table is not saved to MyDB. If you want to save the table, as we do for Step 7, the "INTO M87_v2" command should be added to the query. Then click on Quick. Try it !

Another option is to hit the Submit button instead. This is generally used for longer queries. The table is then saved using the name in the box under "Table(optional)", in this case MyTable.

The table can also be downloaded to your computer using the Save As botton at the bottom of the page.





Step 4 - Examine an image. It is a good idea to look at the HSC overlayed on an image, to check for artifacts and uniformity. Copy the MatchRA and MatchDec values of the first source from your table. Open the HLA and paste those values into the search box. Click Search.

Note: The HLA displays your search coordinates in both decimal degrees and sexidecimal format. This is useful if you want to find a specific object in the Interactive Display.

In the Detector field enter *acs/wfc* to select just the ACS Wide Field Camera images. Click on the Display button for the F814W image (or click on the Images button if you would like to look at previews of all the images)



Step 5 - Determine value of NumImages to use. Click advanced contrast controls, Apply astrometric shift, Require NumImages > 10, and then the HSC button to overlay the HSC on this particular image. We find that NumImages > 10 leaves a number of artifacts in the inner region. If you click on a few of the real objects you find they all have more than NumImages = 50. Some have over 120 !.

Go back and change to Require NumImages > 50 to remove essentially all of the artifacts. DETERMINING THE BEST VALUE OF NUMIMAGES IS OFTEN ONE OF THE MOST IMPORTANT DECISIONS YOU WILL HAVE WHEN USING THE HSC !





Step 6 - You can also use the MAST Discovery Portal to make the same query, since this is a relatively small dataset. Here is the screen you will see, and a pointer to a use case that describes the Discovery Portal in more detail ***TBD***. The Discovery Portal can also be used to make plots (like in Step 7) and to reach the HLA Interactive Display (like in Step 5).

In this example we center on the coordinates of the first object in the list from the CasJobs search in Step 3 to find the object with matchID = 3498807. Also note that M87 has been visited 98 times and observed with 13 filters !


Step 7 - Make a plot using CasJobs. Click on MyDB in two places, then find the table M87_v3 (made in Step 3) and click on that. You can then click on Sample to see the data, and Plot to make a plot. Designate the X and Y columns on the right and click Plot at the bottom.

You will be directed to the output tab in the menu bar, where you will see the plot is pending. The queue gets refreshed every 30 seconds; you can hit the refresh icon in your browser to check more frequently. Click Download when it is ready.




Step 8 - Now lets try something a little bigger by making a Color Magnitude Diagram (CMD) for the Large Magellanic Clouds (LMC) using the WFPC2 data. Following similar steps to those described above, cut and paste the following text into a query box, and hit the submit button (since this is a longer query). The table lmc_v5 should appear in MyDb.



Next make the plot of V-I vs V shown in the bottom right. There are 83011 datapoints in this figure using dozens of WFPC2 fields, as shown in the HLA footprint image below. The entire exercise should only take a few minutes. Similar plots can be made for ACS and WFC3. Detailed Use Case ***TBD*** shows how to add the data for all three instruments together.



A follow up tutorial with examples of more advanced queries can be found here... Example Hubble Source Catalog (HSC) Queries.