{ "cells": [ { "cell_type": "markdown", "id": "a13b8653", "metadata": {}, "source": [ "# Observations within the XXL-North region" ] }, { "cell_type": "markdown", "id": "2453f437", "metadata": {}, "source": [ "This case study demonstrates how we can use a DAXA filtering method to identify all observations whose coordinate falls within a rectangular region - we apply this to the task of selecting all the XMM and Chandra observations within the XXL-North (XXL is a project utilising the largest contiguous region observed by XMM, one in the north and one in the south). \n", "\n", "The filtering method we demonstrate here could just as easily be applied to other wide regions of interest (the Lockman hole for example), and will work with any DAXA mission, not just XMM and Chandra." ] }, { "cell_type": "markdown", "id": "5e2a28b1", "metadata": {}, "source": [ "## Import Statements" ] }, { "cell_type": "code", "execution_count": 1, "id": "aa9f16e8", "metadata": {}, "outputs": [], "source": [ "from astropy.coordinates import SkyCoord\n", "from astropy.units import hourangle\n", "\n", "from daxa.mission import XMMPointed, Chandra" ] }, { "cell_type": "markdown", "id": "fa824356", "metadata": {}, "source": [ "## Other Tutorials" ] }, { "cell_type": "markdown", "id": "cc8b77fc", "metadata": {}, "source": [ "These case studies are meant to be highly specific examples of how you might acquire data for a particular science case, they do not provide general instruction on how to use DAXA missions or archives. We instead direct you to:\n", "\n", "* [Using DAXA missions](../missions.html) - Here we explain what DAXA mission classes are and how to use them to select only the data you need.\n", "* [Creating a DAXA archive](../archives.html) - This explains how to create an archive, load an existing archive, and the various properties and features of DAXA archives.\n", "* [Processing telescope data](../../../tutorials.process.html) - The processing tutorials for different missions are presented here, though there may not yet be processing support for all missions.\n", "\n", "Reading through these should give you a good understanding of how DAXA can be used to acquire, organise, and process multi-mission X-ray datasets for your specific use case." ] }, { "cell_type": "markdown", "id": "cda7ed3b", "metadata": {}, "source": [ "## Defining missions" ] }, { "cell_type": "markdown", "id": "1db78091", "metadata": {}, "source": [ "The XXL project used XMM, so we knows there will be plenty of observations of the XXL region with XMM, but we will also search for any Chandra observations that fall within the same region:" ] }, { "cell_type": "code", "execution_count": 2, "id": "032436b4", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/dt237/code/DAXA/daxa/mission/xmm.py:83: UserWarning: 140 of the 17697 observations located for this mission have been removed due to NaN RA or Dec values\n", " self._fetch_obs_info()\n" ] } ], "source": [ "xm = XMMPointed()\n", "ch = Chandra()" ] }, { "cell_type": "markdown", "id": "c7dda794", "metadata": {}, "source": [ "## Searching for observations" ] }, { "cell_type": "markdown", "id": "df78c594", "metadata": {}, "source": [ "We are going to use a DAXA filtering method that allows for the selection of all observations whose central coordinate falls within a rectangle - for that search we need to define the lower-left and upper-right coordinates of the rectangular region. We define these coordinates with convention that RA increases from right-to-left (i.e. the upper-right RA is greater than the lower-left RA), but the search method can also handle rectangles that have RA increasing from left-to-right.\n", "\n", "The coordinates we've created broadly cover the XXL-North region:" ] }, { "cell_type": "code", "execution_count": 3, "id": "2e622e5a", "metadata": {}, "outputs": [], "source": [ "ll = SkyCoord(\"2h36m0s\", -8., unit=(hourangle, 'deg'))\n", "ur = SkyCoord(\"2h00m0s\", -2., unit=(hourangle, 'deg'))" ] }, { "cell_type": "markdown", "id": "0ecb9ffb", "metadata": {}, "source": [ "The `filter_on_rect_region` method is used, and we simply need to pass the corner coordinates we have already defined:" ] }, { "cell_type": "code", "execution_count": 4, "id": "667e923c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/dt237/code/DAXA/daxa/mission/base.py:107: UserWarning: The passed corner coordinates are defined with RA increasing from right to left (upper-right RA is less than lower-left; we reversed this.\n", " any_ret = change_func(*args, **kwargs)\n" ] } ], "source": [ "xm.filter_on_rect_region(ll, ur)\n", "ch.filter_on_rect_region(ll, ur)" ] }, { "cell_type": "markdown", "id": "0a686f93", "metadata": {}, "source": [ "## Examining the available observations" ] }, { "cell_type": "markdown", "id": "510a2b94", "metadata": {}, "source": [ "As expected, we have selected many XMM observations - and there is also a not-insignificant number of Chandra observations." ] }, { "cell_type": "code", "execution_count": 5, "id": "f408e3e4", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | ra | \n", "dec | \n", "ObsID | \n", "start | \n", "science_usable | \n", "duration | \n", "proprietary_end_date | \n", "revolution | \n", "proprietary_usable | \n", "end | \n", "
|---|---|---|---|---|---|---|---|---|---|---|
| 234 | \n", "35.666670 | \n", "-3.833333 | \n", "0037980101 | \n", "2002-01-11 04:21:02 | \n", "True | \n", "0 days 04:12:52 | \n", "2003-02-13 | \n", "383 | \n", "True | \n", "2002-01-11 08:33:54 | \n", "
| 235 | \n", "36.000000 | \n", "-3.833333 | \n", "0037980201 | \n", "2002-01-11 14:20:11 | \n", "True | \n", "0 days 03:52:55 | \n", "2003-02-13 | \n", "383 | \n", "True | \n", "2002-01-11 18:13:06 | \n", "
| 236 | \n", "36.333330 | \n", "-3.833333 | \n", "0037980301 | \n", "2002-01-11 23:37:59 | \n", "True | \n", "0 days 03:54:31 | \n", "2003-02-08 | \n", "383 | \n", "True | \n", "2002-01-12 03:32:30 | \n", "
| 237 | \n", "36.666660 | \n", "-3.833333 | \n", "0037980401 | \n", "2002-01-26 02:24:12 | \n", "True | \n", "0 days 04:23:51 | \n", "2003-02-08 | \n", "390 | \n", "True | \n", "2002-01-26 06:48:03 | \n", "
| 238 | \n", "37.000005 | \n", "-3.833333 | \n", "0037980501 | \n", "2002-01-25 20:51:08 | \n", "True | \n", "0 days 04:53:35 | \n", "2003-02-08 | \n", "390 | \n", "True | \n", "2002-01-26 01:44:43 | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 14759 | \n", "31.332917 | \n", "-2.551611 | \n", "0870850101 | \n", "2020-07-04 21:25:41 | \n", "True | \n", "0 days 10:06:40 | \n", "2021-07-27 | \n", "3767 | \n", "True | \n", "2020-07-05 07:32:21 | \n", "
| 14778 | \n", "38.402083 | \n", "-5.507694 | \n", "0862670101 | \n", "2020-07-10 03:03:35 | \n", "True | \n", "1 days 04:03:20 | \n", "2021-09-17 | \n", "3770 | \n", "True | \n", "2020-07-11 07:06:55 | \n", "
| 14846 | \n", "38.402083 | \n", "-5.507722 | \n", "0862670201 | \n", "2020-08-16 15:57:07 | \n", "True | \n", "1 days 00:03:19 | \n", "2021-09-17 | \n", "3789 | \n", "True | \n", "2020-08-17 16:00:26 | \n", "
| 14847 | \n", "38.402083 | \n", "-5.507722 | \n", "0862670401 | \n", "2020-08-16 13:39:53 | \n", "True | \n", "0 days 02:17:14 | \n", "2021-09-17 | \n", "3789 | \n", "True | \n", "2020-08-16 15:57:07 | \n", "
| 17409 | \n", "36.930375 | \n", "-6.091694 | \n", "0920220301 | \n", "2024-01-25 15:58:15 | \n", "True | \n", "0 days 06:23:20 | \n", "2025-02-08 | \n", "4419 | \n", "False | \n", "2024-01-25 22:21:35 | \n", "
422 rows × 10 columns
\n", "| \n", " | ra | \n", "dec | \n", "ObsID | \n", "science_usable | \n", "proprietary_usable | \n", "start | \n", "end | \n", "duration | \n", "proprietary_end_date | \n", "target_category | \n", "instrument | \n", "grating | \n", "data_mode | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 77 | \n", "31.18436 | \n", "-5.09273 | \n", "4129 | \n", "True | \n", "True | \n", "2003-06-13 01:01:52.000003 | \n", "2003-06-14 22:01:52.000003 | \n", "1 days 21:00:00 | \n", "2004-06-27 | \n", "AGN | \n", "ACIS-I | \n", "NONE | \n", "TE_002AC | \n", "
| 711 | \n", "34.58875 | \n", "-5.17417 | \n", "12882 | \n", "True | \n", "True | \n", "2010-09-27 04:39:01.999996 | \n", "2010-09-28 04:25:31.999996 | \n", "0 days 23:46:30 | \n", "2011-09-29 | \n", "GCL | \n", "ACIS-S | \n", "NONE | \n", "TE_0046E | \n", "
| 886 | \n", "35.04167 | \n", "-6.04167 | \n", "14972 | \n", "True | \n", "True | \n", "2013-09-26 12:25:33.000004 | \n", "2013-09-27 09:50:03.000004 | \n", "0 days 21:24:30 | \n", "2014-10-02 | \n", "AGN | \n", "ACIS-S | \n", "NONE | \n", "TE_00AD8 | \n", "
| 891 | \n", "35.02417 | \n", "-5.14100 | \n", "13374 | \n", "True | \n", "True | \n", "2011-10-07 05:41:46.000003 | \n", "2011-10-08 02:59:26.000003 | \n", "0 days 21:17:40 | \n", "2012-10-11 | \n", "GCL | \n", "ACIS-I | \n", "NONE | \n", "TE_00AB4 | \n", "
| 913 | \n", "36.68333 | \n", "-4.69583 | \n", "9368 | \n", "True | \n", "True | \n", "2007-11-23 16:55:21.999996 | \n", "2007-11-24 14:01:11.999996 | \n", "0 days 21:05:50 | \n", "2008-11-26 | \n", "GCL | \n", "ACIS-S | \n", "NONE | \n", "TE_0046E | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 17733 | \n", "33.34208 | \n", "-6.09800 | \n", "16574 | \n", "True | \n", "True | \n", "2015-08-05 17:22:51.000001 | \n", "2015-08-05 18:47:21.000001 | \n", "0 days 01:24:30 | \n", "2016-08-06 | \n", "GCL | \n", "ACIS-S | \n", "NONE | \n", "TE_0046E | \n", "
| 17885 | \n", "31.54917 | \n", "-6.19300 | \n", "16575 | \n", "True | \n", "True | \n", "2015-06-24 05:19:51.999997 | \n", "2015-06-24 06:44:01.999997 | \n", "0 days 01:24:10 | \n", "2016-06-25 | \n", "GCL | \n", "ACIS-S | \n", "NONE | \n", "TE_0046E | \n", "
| 18900 | \n", "37.90667 | \n", "-7.48181 | \n", "3030 | \n", "True | \n", "True | \n", "2002-09-27 23:17:28.000003 | \n", "2002-09-28 00:28:18.000003 | \n", "0 days 01:10:50 | \n", "2003-10-03 | \n", "AGN | \n", "ACIS-S | \n", "NONE | \n", "TE_002A2 | \n", "
| 19149 | \n", "33.62208 | \n", "-5.29569 | \n", "4767 | \n", "True | \n", "True | \n", "2003-11-26 16:45:20.999998 | \n", "2003-11-26 17:53:30.999998 | \n", "0 days 01:08:10 | \n", "2004-12-01 | \n", "AGN | \n", "ACIS-S | \n", "NONE | \n", "TE_002A2 | \n", "
| 20831 | \n", "35.27350 | \n", "-4.68375 | \n", "23741 | \n", "True | \n", "True | \n", "2020-12-06 12:06:00.000003 | \n", "2020-12-06 12:40:20.000003 | \n", "0 days 00:34:20 | \n", "2021-12-07 | \n", "AGN | \n", "ACIS-S | \n", "NONE | \n", "TE_004A6 | \n", "
84 rows × 13 columns
\n", "