Skip to content

Commit 3323d7d

Browse files
NXSAPCR-1091: Added documentation for downloading proprietary data.
1 parent 045469f commit 3323d7d

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

docs/esa/xmm_newton.rst

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,37 @@ it will store them in a tar called 'result0505720401.tar'. The parameters availa
3636
For more details of the parameters check the section 3.4 at:
3737
'http://nxsa.esac.esa.int/nxsa-web/#aio'
3838

39+
------------------------------
40+
2. Getting XMM-Newton proprietary data
41+
------------------------------
42+
To access proprietary data an extra variable is needed in the XMMNewton.download_data method. This variabe is prop which
43+
can be True or False. If True a username and password is needed. A username and password can be passed by adding another
44+
variable to the XMMNewton.download_data method called credentials_file. This variable is a string with the path to a
45+
config.ini file with the desired username and password, e.g. credentials_file = "users/joe.bloggs/config.ini"
46+
47+
Example config.ini file,
48+
49+
.. code-block::
50+
51+
[user]
52+
username = test
53+
password = test
54+
55+
If the credentials_file variable is not provided the method will ask for the username and password to be added manually
56+
from the commandline
57+
58+
.. code-block:: python
59+
60+
>>> from astroquery.esa.xmm_newton import XMMNewton
61+
>>>
62+
>>> XMMNewton.download_data('0505720401',level="PPS",extension="PDF",instname="M1",filename="result0505720401.tar",prop=True)
63+
INFO: File result0505720401.tar downloaded to current directory [astroquery.esa.xmm_newton.core]
64+
65+
This will download all PPS files for the observation '0505720401' and instrument MOS1, with 'PDF' extension and any
66+
proprietary data. It will store them in a tar called 'result0505720401.tar'.
67+
3968
-------------------------------
40-
2. Getting XMM-Newton postcards
69+
3. Getting XMM-Newton postcards
4170
-------------------------------
4271

4372
.. code-block:: python
@@ -52,7 +81,7 @@ This will download the EPIC postcard for the observation '0505720401' and it wil
5281
'P0505720401EPX000OIMAGE8000.PNG'.
5382

5483
------------------------------------------
55-
3. Getting XMM-Newton metadata through TAP
84+
4. Getting XMM-Newton metadata through TAP
5685
------------------------------------------
5786

5887
This function provides access to the XMM-Newton Science Archive database using the Table Access Protocol (TAP) and via the Astronomical Data
@@ -81,7 +110,7 @@ This will execute an ADQL query to download the first 10 observations in the XMM
81110
stored in the file 'results10.csv'. The result of this query can be printed by doing print(result).
82111

83112
-----------------------------------
84-
4. Getting table details of XSA TAP
113+
5. Getting table details of XSA TAP
85114
-----------------------------------
86115

87116
.. code-block:: python
@@ -104,7 +133,7 @@ stored in the file 'results10.csv'. The result of this query can be printed by d
104133
This will show the available tables in XSA TAP service in the XMM-Newton Science Archive.
105134

106135
-------------------------------------
107-
5. Getting columns details of XSA TAP
136+
6. Getting columns details of XSA TAP
108137
-------------------------------------
109138

110139
.. code-block:: python
@@ -123,7 +152,7 @@ This will show the available tables in XSA TAP service in the XMM-Newton Science
123152
This will show the column details of the table 'v_all_observations' in XSA TAP service in the XMM-Newton Science Archive.
124153

125154
--------------------------------------------
126-
6. Getting EPIC images from a given TAR file
155+
7. Getting EPIC images from a given TAR file
127156
--------------------------------------------
128157

129158
.. code-block:: python
@@ -139,7 +168,7 @@ This will show the column details of the table 'v_all_observations' in XSA TAP s
139168
This will extract the European Photon Imaging Camera (EPIC) images within the specified TAR file, bands, and instruments. It will also return a dictionary containing the paths to the extracted files.
140169

141170
------------------------------------------------------------------------------
142-
7. Getting the European Photon Imaging Camera (EPIC) metadata from the XSA TAP
171+
8. Getting the European Photon Imaging Camera (EPIC) metadata from the XSA TAP
143172
------------------------------------------------------------------------------
144173

145174
This function retrieves the EPIC metadata from a given target.

0 commit comments

Comments
 (0)