AstroToolkit 1.3.5__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {AstroToolkit-1.3.5/src/AstroToolkit.egg-info → astrotoolkit-1.4.1}/PKG-INFO +466 -565
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/README.md +457 -552
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/pyproject.toml +11 -15
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/data.py +0 -1
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/imaging.py +9 -8
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/lightcurves.py +2 -2
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/overlays.py +10 -12
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/reddening.py +7 -7
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/sed.py +2 -3
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/spectra.py +2 -2
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Datapages/buttons.py +2 -2
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Datapages/grid.py +0 -1
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Datapages/metadata.py +3 -4
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Examples/datapage_creation.py +16 -18
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/ProperMotionCorrection.py +0 -1
- astrotoolkit-1.4.1/src/AstroToolkit/Misc/database_queries.py +32 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/file_naming.py +10 -7
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/input_validation.py +3 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/HRD.py +33 -35
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/imaging.py +1 -2
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/lightcurves.py +2 -2
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/sed.py +3 -3
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/spectra.py +1 -3
- AstroToolkit-1.3.5/src/AstroToolkit/Timeseries/aov.cp38-win_amd64.pyd → astrotoolkit-1.4.1/src/AstroToolkit/Timeseries/aov.cp311-win_amd64.pyd +0 -0
- astrotoolkit-1.4.1/src/AstroToolkit/Tools.py +893 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1/src/AstroToolkit.egg-info}/PKG-INFO +466 -565
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit.egg-info/SOURCES.txt +2 -1
- astrotoolkit-1.4.1/src/AstroToolkit.egg-info/requires.txt +12 -0
- AstroToolkit-1.3.5/src/AstroToolkit/Tools.py +0 -916
- AstroToolkit-1.3.5/src/AstroToolkit.egg-info/requires.txt +0 -16
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/LICENSE +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/MANIFEST.in +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/setup.cfg +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/lightcurve_sigma_clip.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Data/photometry.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/coord_conversion.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/file_handling.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Misc/read_fits.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/backdrop_hrd_allmags.fits +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Plotting/powspec.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Settings/__init__.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/README - Windows.txt +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/README.txt +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/__init__.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/aov.f90 +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/aovconst.f90 +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/aovsub.f90 +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/build.sh +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/buildwin.bat +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/pyaov.pdf +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/pyaov.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit/Timeseries/ztfanalysis.py +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit.egg-info/dependency_links.txt +0 -0
- {AstroToolkit-1.3.5 → astrotoolkit-1.4.1}/src/AstroToolkit.egg-info/top_level.txt +0 -0
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: AstroToolkit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: A package for the gathering and plotting of astronomical data.
|
|
5
5
|
Author-email: Ethan Moorfield <ethan.moorfield@hotmail.co.uk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/WD-planets/AstroToolkit
|
|
7
7
|
Project-URL: Issues, https://github.com/WD-planets/AstroToolkit/issues
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: astropy==
|
|
13
|
+
Requires-Dist: astropy==6.0.1
|
|
14
14
|
Requires-Dist: astroquery==0.4.7
|
|
15
|
-
Requires-Dist: bokeh==3.
|
|
16
|
-
Requires-Dist: cmasher==1.
|
|
15
|
+
Requires-Dist: bokeh==3.4.1
|
|
16
|
+
Requires-Dist: cmasher==1.8.0
|
|
17
|
+
Requires-Dist: matplotlib==3.8.4
|
|
17
18
|
Requires-Dist: importlib_resources==6.4.0
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist: numpy==1.24.4
|
|
21
|
-
Requires-Dist: pandas==2.0.3
|
|
22
|
-
Requires-Dist: Pillow==10.2.0
|
|
23
|
-
Requires-Dist: PyQt5==5.15.10
|
|
24
|
-
Requires-Dist: PyQt5_sip==12.13.0
|
|
19
|
+
Requires-Dist: numpy==1.26.4
|
|
20
|
+
Requires-Dist: pandas==2.2.2
|
|
25
21
|
Requires-Dist: Requests==2.31.0
|
|
26
|
-
Requires-Dist: scikit_learn==1.3.2
|
|
27
|
-
Requires-Dist: scipy==1.10.1
|
|
28
22
|
Requires-Dist: selenium==4.17.2
|
|
23
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
24
|
+
Requires-Dist: scipy==1.13.0
|
|
29
25
|
|
|
30
26
|
# AstroToolkit
|
|
31
27
|
|
|
32
|
-
AstroToolkit (ATK) is a set of
|
|
28
|
+
AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
|
|
33
29
|
|
|
34
30
|
## Table of Contents
|
|
35
31
|
|
|
@@ -37,49 +33,15 @@ AstroToolkit (ATK) is a set of useful tools for fetching, plotting, and analysin
|
|
|
37
33
|
2. [Introduction](#introduction)
|
|
38
34
|
3. [Configuration](#configuration)
|
|
39
35
|
4. [Tools](#tools)
|
|
36
|
+
5. [Examples](#examples)
|
|
40
37
|
|
|
41
38
|
### ATK Tools
|
|
42
39
|
|
|
43
|
-
- 1 [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- 2 [Imaging Tools](#2-imaging-tools)
|
|
49
|
-
- 2.1 [imagequery](#21-imagequery)
|
|
50
|
-
- 2.2 [plotimage](#22-plotimage)
|
|
51
|
-
- 3 [HRD Tools](#3-hrd-tools)
|
|
52
|
-
- 3.1 [plothrd](#31-plothrd)
|
|
53
|
-
- 4 [Lightcurve Tools](#4-lightcurve-tools)
|
|
54
|
-
- 4.1 [lightcurvequery](#41-lightcurvequery)
|
|
55
|
-
- 4.2 [plotlightcurve](#42-plotlightcurve)
|
|
56
|
-
- 5 [SED Tools](#5-sed-tools)
|
|
57
|
-
- 5.1 [sedquery](#51-sedquery)
|
|
58
|
-
- 5.2 [plotsed](#52-plotsed)
|
|
59
|
-
- 6 [Spectrum Tools](#6-spectrum-tools)
|
|
60
|
-
- 6.1 [spectrumquery](#61-spectrumquery)
|
|
61
|
-
- 6.2 [plotspectrum](#62-plotspectrum)
|
|
62
|
-
- 7 [Timeseries Tools](#7-timeseries-tools)
|
|
63
|
-
- 7.1 [plotpowspec](#71-plotpowspec)
|
|
64
|
-
- 7.2 [tsanalysis](#72-tsanalysis)
|
|
65
|
-
- 8 [Datapage Tools](#8-datapage-tools)
|
|
66
|
-
- 8.1 [gridsetup](#81-gridsetup)
|
|
67
|
-
- 8.2 [getbuttons](#82-getbuttons)
|
|
68
|
-
- 8.3 [getmdtable](#83-getmdtable)
|
|
69
|
-
- 9 [File Handling Tools](#9-file-handling-tools)
|
|
70
|
-
- 9.1 [savedata](#91-savedata)
|
|
71
|
-
- 9.2 [readdata](#92-readdata)
|
|
72
|
-
- 9.3 [export](#93-export)
|
|
73
|
-
- 10 [Miscellaneous Tools](#10-miscellaneous-tools)
|
|
74
|
-
- 10.1 [showplot](#101-showplot)
|
|
75
|
-
- 10.2 [saveplot](#102-saveplot)
|
|
76
|
-
- 10.3 [correctpm](#103-correctpm)
|
|
77
|
-
- 10.4 [getdistance](#104-getdistance)
|
|
78
|
-
- 10.5 [convfromdeg](#105-convfromdeg)
|
|
79
|
-
- 10.6 [convtodeg](#106-convtodeg)
|
|
80
|
-
- 10.7 [getcolumn](#107-getcolumn)
|
|
81
|
-
- 10.8 [getsources](#108-getsources)
|
|
82
|
-
- 10.9 [getpositions](#109-getpositions)
|
|
40
|
+
- 1 [Query](#1-query)
|
|
41
|
+
- 2 [Plot](#2-plot)
|
|
42
|
+
- 3 [Datapage Tools](#3-datapage-tools)
|
|
43
|
+
- 4 [File Handling Tools](#4-file-handling-tools)
|
|
44
|
+
- 5 [Other Tools](#5-other-tools)
|
|
83
45
|
|
|
84
46
|
<br>
|
|
85
47
|
|
|
@@ -142,25 +104,25 @@ where options is a dictionary containing key : value pairs to set in the config.
|
|
|
142
104
|
- enable_notifications = False
|
|
143
105
|
- If True, notifications denoting basic information as each ATK tool is executed will be shown in the terminal. Can be useful for tracking the flow of data.
|
|
144
106
|
- dataquery_radius = 3
|
|
145
|
-
- This sets the default radius (in arcseconds) to use in
|
|
107
|
+
- This sets the default radius (in arcseconds) to use in [data queries](#11-data-query).
|
|
146
108
|
- photquery_radius = 3
|
|
147
|
-
- This sets the default radius (in arcseconds) to use in
|
|
109
|
+
- This sets the default radius (in arcseconds) to use in [photometry queries](#12-photometry-query).
|
|
148
110
|
- bulkphotquery_radius = 3
|
|
149
|
-
- This sets the default radius (in arcseconds) to use in
|
|
111
|
+
- This sets the default radius (in arcseconds) to use in [bulk photometry queries](#13-bulk-photometry-query).
|
|
150
112
|
- imagequery_size = 30
|
|
151
|
-
- This sets the default radius (in arcseconds) to use in
|
|
113
|
+
- This sets the default radius (in arcseconds) to use in [image queries](#15-imaging-query).
|
|
152
114
|
- imagequery_overlays = gaia
|
|
153
|
-
- This sets the default radius (in arcseconds) to use in
|
|
115
|
+
- This sets the default radius (in arcseconds) to use in [image queries](#15-imaging-query).
|
|
154
116
|
- lightcurvequery_radius = 3
|
|
155
|
-
- This sets the default radius (in arcseconds) to use in
|
|
117
|
+
- This sets the default radius (in arcseconds) to use in [lightcurve queries](#16-lightcurve-query).
|
|
156
118
|
- atlas_username = None
|
|
157
|
-
- This sets the default username to use
|
|
119
|
+
- This sets the default username to use in ATLAS [lightcurve queries](#16-lightcurve-query).
|
|
158
120
|
- atlas_password = None
|
|
159
|
-
- This sets the default password to use
|
|
121
|
+
- This sets the default password to use in ATLAS [lightcurve queries](#16-lightcurve-query).
|
|
160
122
|
- sed_radius = 3
|
|
161
|
-
- This sets the default radius to use in
|
|
123
|
+
- This sets the default radius to use in [SED queries](#17-sed-query).
|
|
162
124
|
- spectrum_radius = 3
|
|
163
|
-
- This sets the default radius to use in
|
|
125
|
+
- This sets the default radius to use in [spectrum queries](#18-spectrum-query).
|
|
164
126
|
- grid_size = 250
|
|
165
127
|
- This sets the default grid size to use in the [gridsetup](#71-gridsetup) tool.
|
|
166
128
|
- button_simbad_radius = 3
|
|
@@ -202,7 +164,7 @@ parameter = string, name of config parameter from above list
|
|
|
202
164
|
|
|
203
165
|
<br><br>
|
|
204
166
|
|
|
205
|
-
## Tools
|
|
167
|
+
## Tools<a id="tools"></a>
|
|
206
168
|
|
|
207
169
|
In this section, the available tools will be outlined. Note that if a parameter is listed as having a default parameter CONFIG, this means that this parameter is taken from the config as listed above. These parameters can still be passed to the tool, in which case the config value will be ignored.
|
|
208
170
|
|
|
@@ -216,25 +178,21 @@ In this section, the available tools will be outlined. Note that if a parameter
|
|
|
216
178
|
|
|
217
179
|
<br>
|
|
218
180
|
|
|
219
|
-
|
|
220
|
-
### 1.1. dataquery<a id="11-dataquery"></a>
|
|
181
|
+
## 1. query<a id="1-query"></a>
|
|
221
182
|
|
|
222
|
-
Returns
|
|
223
|
-
|
|
224
|
-
<br>
|
|
225
|
-
|
|
226
|
-
**Supported surveys:** gaia, galex, rosat, panstarrs, skymapper, sdss, twomass, wise, erosita
|
|
227
|
-
|
|
228
|
-
<br>
|
|
183
|
+
Returns available data of a given type from a given survey.
|
|
229
184
|
|
|
230
185
|
**Usage:**
|
|
231
186
|
|
|
232
187
|
```
|
|
233
|
-
|
|
188
|
+
query(type,survey=None,pos=None,source=None,radius=CONFIG)
|
|
234
189
|
```
|
|
235
190
|
|
|
236
191
|
where:
|
|
237
192
|
|
|
193
|
+
```
|
|
194
|
+
type = str, type of data to return
|
|
195
|
+
```
|
|
238
196
|
```
|
|
239
197
|
survey = str, name of a supported survey
|
|
240
198
|
```
|
|
@@ -245,68 +203,56 @@ pos = list, [ra,dec]
|
|
|
245
203
|
source = int/str, Gaia source_id
|
|
246
204
|
```
|
|
247
205
|
```
|
|
248
|
-
radius = int/float, radius of query
|
|
206
|
+
radius = int/float, radius of query of given type. If not given, will be taken from config value for given query type.
|
|
249
207
|
```
|
|
250
208
|
|
|
251
|
-
|
|
209
|
+
<br>
|
|
252
210
|
|
|
253
|
-
|
|
254
|
-
{
|
|
255
|
-
'survey' : str, survey of data
|
|
256
|
-
'type' : 'data'
|
|
257
|
-
'source' : int/str, source used to get data (None if a pos was used)
|
|
258
|
-
'pos' : [ra,dec], pos used to get data (None if a source was used)
|
|
259
|
-
'data' : dict, the returned data
|
|
260
|
-
}
|
|
261
|
-
```
|
|
211
|
+
**Note:** If no data is returned, the 'data' key of the returned dictionary will be set to None.
|
|
262
212
|
|
|
263
213
|
<br>
|
|
264
214
|
|
|
265
|
-
**
|
|
215
|
+
**Supported query types:** data, phot, bulkphot, image, lightcurve, sed, spectra, reddening
|
|
266
216
|
|
|
267
|
-
|
|
217
|
+
<br>
|
|
268
218
|
|
|
269
|
-
|
|
270
|
-
from AstroToolkit.Tools import dataquery
|
|
219
|
+
Below is an outline of the usage and output of each query type. Note that additonal arguments not listed above may be used, see individual query types below for details.
|
|
271
220
|
|
|
272
|
-
|
|
221
|
+
<br>
|
|
273
222
|
|
|
274
|
-
|
|
275
|
-
wise_data = dataquery(survey='wise',source=source)['data']
|
|
276
|
-
```
|
|
223
|
+
**Shortcuts**:
|
|
277
224
|
|
|
278
|
-
|
|
225
|
+
[Data Queries](#11-data-query)
|
|
279
226
|
|
|
280
|
-
|
|
227
|
+
[Photometry Queries](#12-photometry-query)
|
|
281
228
|
|
|
282
|
-
|
|
229
|
+
[Bulk Photomety Queries](#13-bulk-photometry-query)
|
|
283
230
|
|
|
284
|
-
|
|
231
|
+
[Reddening Queries](#14-reddening-query)
|
|
232
|
+
|
|
233
|
+
[Imaging Queries](#15-imaging-query)
|
|
234
|
+
|
|
235
|
+
[Lightcurve Queries](#16-lightcurve-query)
|
|
236
|
+
|
|
237
|
+
[SED Queries](#17-sed-query)
|
|
285
238
|
|
|
286
|
-
|
|
239
|
+
[Spectrum Queries](#18-spectrum-query)
|
|
240
|
+
|
|
241
|
+
[HRD Queries](#19-hrd-query)
|
|
287
242
|
|
|
288
243
|
<br>
|
|
289
244
|
|
|
290
|
-
|
|
245
|
+
### 1.1 Data Query<a id="11-data-query"></a>
|
|
291
246
|
|
|
292
|
-
|
|
293
|
-
photquery(survey,pos=None,source=None,radius=CONFIG)
|
|
294
|
-
```
|
|
247
|
+
Type argument: 'data'
|
|
295
248
|
|
|
296
|
-
|
|
249
|
+
Description: Returns all available raw data for a given survey
|
|
297
250
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
```
|
|
305
|
-
source = int/str, Gaia source_id
|
|
306
|
-
```
|
|
307
|
-
```
|
|
308
|
-
radius = int/float, radius of query
|
|
309
|
-
```
|
|
251
|
+
Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
|
|
252
|
+
|
|
253
|
+
Supported Surveys: gaia, galex, rosat, panstarrs, skymapper, sdss, twomass, wise, erosita
|
|
254
|
+
|
|
255
|
+
<br>
|
|
310
256
|
|
|
311
257
|
**Returns:** dict
|
|
312
258
|
|
|
@@ -320,42 +266,43 @@ radius = int/float, radius of query
|
|
|
320
266
|
}
|
|
321
267
|
```
|
|
322
268
|
|
|
323
|
-
<br>
|
|
324
|
-
|
|
325
|
-
**Example:**
|
|
269
|
+
<br><br>
|
|
326
270
|
|
|
327
|
-
|
|
328
|
-
```
|
|
329
|
-
from AstroToolkit.Tools import photquery
|
|
271
|
+
### 1.2 Photometry Query<a id="12-photometry-query"></a>
|
|
330
272
|
|
|
331
|
-
|
|
332
|
-
```
|
|
273
|
+
Type argument: 'phot'
|
|
333
274
|
|
|
334
|
-
|
|
275
|
+
Description: Returns all photometry available from a given survey, as well as some basic parameters such as coordinates.
|
|
335
276
|
|
|
336
|
-
|
|
277
|
+
Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
|
|
337
278
|
|
|
338
|
-
|
|
279
|
+
Supported Surveys: gaia, panstarrs, skymapper, galex, rosat, sdss, wise, twomass
|
|
339
280
|
|
|
340
281
|
<br>
|
|
341
282
|
|
|
342
|
-
**
|
|
283
|
+
**Returns:** dict
|
|
343
284
|
|
|
344
285
|
```
|
|
345
|
-
|
|
286
|
+
{
|
|
287
|
+
'survey' : str, survey of data
|
|
288
|
+
'type' : 'data'
|
|
289
|
+
'source' : int/str, source used to get data (None if a pos was used)
|
|
290
|
+
'pos' : [ra,dec], pos used to get data (None if a source was used)
|
|
291
|
+
'data' : dict, the returned data
|
|
292
|
+
}
|
|
346
293
|
```
|
|
347
294
|
|
|
348
|
-
|
|
295
|
+
<br><br>
|
|
349
296
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
297
|
+
### 1.3 Bulk Photometry Query<a id="13-bulk-photometry-query"></a>
|
|
298
|
+
|
|
299
|
+
Type argument: 'bulkphot'
|
|
300
|
+
|
|
301
|
+
Description: Returns all photometry available from all surveys supported by [photometry queries](#12-photometry-query)
|
|
302
|
+
|
|
303
|
+
Supported Arguments: pos, source, radius (all defined [above](#1-query))
|
|
304
|
+
|
|
305
|
+
<br>
|
|
359
306
|
|
|
360
307
|
**Returns:** dict
|
|
361
308
|
|
|
@@ -375,42 +322,17 @@ radius = int/float, radius of query
|
|
|
375
322
|
|
|
376
323
|
**Note:** The value of each survey will be set to None if no data was returned. E.g. if no galex data was returned, the value of the ['galex'] key would be None.
|
|
377
324
|
|
|
378
|
-
<br>
|
|
379
|
-
|
|
380
|
-
**Example:**
|
|
381
|
-
|
|
382
|
-
To retrieve the gaia and galex data for an object:
|
|
383
|
-
|
|
384
|
-
```
|
|
385
|
-
from AstroToolkit.Tools import bulkphotquery
|
|
386
|
-
|
|
387
|
-
bulk_phot=bulkphotquery(source=6050296829033196032)['data']
|
|
388
|
-
|
|
389
|
-
gaia_data=bulk_phot['gaia']
|
|
390
|
-
galex_data=bulk_phot['galex']
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
<br>
|
|
394
|
-
|
|
395
|
-
### 1.4. getreddening<a id="14-getreddening"></a>
|
|
325
|
+
<br><br>
|
|
396
326
|
|
|
397
|
-
|
|
327
|
+
### 1.4. Reddening Query<a id="14-reddening-query"></a>
|
|
398
328
|
|
|
399
|
-
|
|
400
|
-
- STILISM (https://stilism.obspm.fr/)
|
|
329
|
+
Type argument: 'reddening'
|
|
401
330
|
|
|
402
|
-
|
|
331
|
+
Description: Returns the reddening for a given Gaia source from a given survey
|
|
403
332
|
|
|
404
|
-
|
|
333
|
+
Supported Arguments: source (defined [above](#1-query))
|
|
405
334
|
|
|
406
|
-
|
|
407
|
-
getreddening(source)
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
where:
|
|
411
|
-
```
|
|
412
|
-
source = int/str, Gaia source_id
|
|
413
|
-
```
|
|
335
|
+
Supported Surveys: stilism (https://stilism.obspm.fr/)
|
|
414
336
|
|
|
415
337
|
<br>
|
|
416
338
|
|
|
@@ -433,17 +355,11 @@ source = int/str, Gaia source_id
|
|
|
433
355
|
|
|
434
356
|
<br><br>
|
|
435
357
|
|
|
436
|
-
###
|
|
437
|
-
|
|
438
|
-
These functions retrieve and plotimages from supported surveys.
|
|
439
|
-
|
|
440
|
-
**Note:** When using a 'pos' as input, some detections can be missing for high proper motion objects. When instead using a source as input, this is no longer a problem as the detection search radius is increased to account for this proper motion.
|
|
441
|
-
|
|
442
|
-
<br>
|
|
358
|
+
### 1.5 Imaging Query<a id="15-imaging-query"></a>
|
|
443
359
|
|
|
444
|
-
|
|
360
|
+
Type argument: 'image'
|
|
445
361
|
|
|
446
|
-
|
|
362
|
+
Description: Returns an image from a given survey. Overlays can be used to overlay detections from different surveys. There are two types of overlay: detections and tracers. Detections are proper motion-corrected circles that scale with the magnitude of the detection, and show that there is data available for a given object in a given survey.
|
|
447
363
|
|
|
448
364
|
Tracers (which are detections created from lightcurve surveys) can be used both to show that lightcurve data is available, but also to trace an object through time.
|
|
449
365
|
|
|
@@ -455,40 +371,10 @@ Tracers (which are detections created from lightcurve surveys) can be used both
|
|
|
455
371
|
|
|
456
372
|

|
|
457
373
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
Supported surveys:
|
|
461
|
-
- panstarrs, supported bands = g, r, i, z, y
|
|
462
|
-
- skymapper, supported bands = g, r, i, z, u, v
|
|
463
|
-
- dss, supported bands = g
|
|
464
|
-
|
|
465
|
-
**Note:** Can also use 'any' to perform an image query according to the hierarchy: panstarrs > skymapper > dss
|
|
466
|
-
|
|
467
|
-
<br>
|
|
468
|
-
|
|
469
|
-
Supported overlays: gaia, galex_nuv, galex_fuv, rosat,sdss, twomass, wise, ztf, erosita ,atlas, gaia_lc, asassn, crts
|
|
470
|
-
|
|
471
|
-
**Note:** Can also use 'all', which will enable overlays for all supported surveys.
|
|
472
|
-
|
|
473
|
-
<br>
|
|
474
|
-
|
|
475
|
-
**Usage:**
|
|
476
|
-
|
|
477
|
-
```
|
|
478
|
-
imagequery(survey,pos=None,source=None,size=CONFIG,band='g',overlays=CONFIG)
|
|
479
|
-
```
|
|
374
|
+
Supported Arguments: survey, pos, source, size, band, overlays
|
|
480
375
|
|
|
481
376
|
where:
|
|
482
377
|
```
|
|
483
|
-
survey = str, name of a supported survey
|
|
484
|
-
```
|
|
485
|
-
```
|
|
486
|
-
pos = list, [ra,dec]
|
|
487
|
-
```
|
|
488
|
-
```
|
|
489
|
-
source = int/str, Gaia source_id
|
|
490
|
-
```
|
|
491
|
-
```
|
|
492
378
|
size = int/float, size of image in arcsec
|
|
493
379
|
```
|
|
494
380
|
```
|
|
@@ -498,6 +384,19 @@ band = str, string containing the required bands (e.g. for all panstarrs bands,
|
|
|
498
384
|
overlays = str, required detection overlays (e.g. for gaia and wise detections, use overlays='gaia,wise')
|
|
499
385
|
```
|
|
500
386
|
|
|
387
|
+
and all other arguments have been defined [above](#1-query).
|
|
388
|
+
|
|
389
|
+
Supported overlays: gaia, galex_nuv, galex_fuv, rosat,sdss, twomass, wise, ztf, erosita ,atlas, gaia_lc, asassn, crts
|
|
390
|
+
|
|
391
|
+
**Note:** Can also use 'all', which will enable overlays for all supported surveys.
|
|
392
|
+
|
|
393
|
+
Supported Surveys:
|
|
394
|
+
- panstarrs, supported bands = g, r, i, z, y
|
|
395
|
+
- skymapper, supported bands = g, r, i, z, u, v
|
|
396
|
+
- dss, supported bands = g
|
|
397
|
+
|
|
398
|
+
<br>
|
|
399
|
+
|
|
501
400
|
**Returns:** dict
|
|
502
401
|
|
|
503
402
|
```
|
|
@@ -531,114 +430,29 @@ overlays = str, required detection overlays (e.g. for gaia and wise detections,
|
|
|
531
430
|
}
|
|
532
431
|
```
|
|
533
432
|
|
|
534
|
-
<br>
|
|
535
|
-
|
|
536
|
-
### 2.2. plotimage<a id="22-plotimage"></a>
|
|
537
|
-
|
|
538
|
-
Plots images in format returned by [imagequery](#21-imagequery).
|
|
539
|
-
|
|
540
|
-
<br>
|
|
541
|
-
|
|
542
|
-
**Usage:**
|
|
543
|
-
|
|
544
|
-
```
|
|
545
|
-
plotimage(data)
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
where:
|
|
549
|
-
```
|
|
550
|
-
data = dict in format returned by imagequery
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
**Returns:** dict
|
|
554
|
-
|
|
555
|
-
```
|
|
556
|
-
{
|
|
557
|
-
'type' : 'image'
|
|
558
|
-
'survey' : str, survey of image
|
|
559
|
-
'source' : int/str, source used to get image (None if a pos was used)
|
|
560
|
-
'pos' : [ra,dec], pos used to get image (None if a source was used)
|
|
561
|
-
'plot' : bokeh figure object, the actual plot
|
|
562
|
-
'ATKfilename' : the default filename given by ATK
|
|
563
|
-
}
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
**Note:** if a plot is not returned (e.g. if no data was supplied to the plotting tool), the 'plot' key will be set to None.
|
|
567
|
-
|
|
568
|
-
<br>
|
|
569
|
-
|
|
570
|
-
**Example:**
|
|
571
|
-
|
|
572
|
-
To retrieve and plot an image:
|
|
573
|
-
```
|
|
574
|
-
from AstroToolkit.Tools import imagequery,plotimage,showplot
|
|
575
|
-
|
|
576
|
-
image=imagequery(survey='any',source=6050296829033196032,overlays='gaia')
|
|
577
|
-
plot=plotimage(image)
|
|
578
|
-
showplot(plot)
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-

|
|
582
|
-
|
|
583
433
|
<br><br>
|
|
584
434
|
|
|
585
|
-
###
|
|
586
|
-
### 3.1. plothrd<a id="31-plothrd"></a>
|
|
435
|
+
### 1.6 Lightcurve Query<a id="16-lightcurve-query"></a>
|
|
587
436
|
|
|
588
|
-
|
|
437
|
+
Type argument: 'lightcurve'
|
|
589
438
|
|
|
590
|
-
|
|
439
|
+
Description: Returns lightcurve data from a given survey.
|
|
591
440
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
```
|
|
595
|
-
plothrd(source=None,sources=None)
|
|
596
|
-
```
|
|
441
|
+
Supported Arguments: survey, pos, source, radius, username, password, sigmaclip
|
|
597
442
|
|
|
598
443
|
where:
|
|
599
|
-
|
|
600
|
-
```
|
|
601
|
-
source = int/str, Gaia source_id
|
|
602
444
|
```
|
|
445
|
+
username = str, ATLAS username, hence only used in ATLAS queries
|
|
603
446
|
```
|
|
604
|
-
sources = list of sources
|
|
605
447
|
```
|
|
606
|
-
|
|
607
|
-
**Returns:** dict
|
|
608
|
-
|
|
609
|
-
```
|
|
610
|
-
{
|
|
611
|
-
'type' : 'hrd'
|
|
612
|
-
'source' : int/str, source overlayed in HRD
|
|
613
|
-
'sources' : list, sources overlayed in HRD if multiple were given
|
|
614
|
-
'plot' : bokeh figure object, the actual plot
|
|
615
|
-
'ATKfilename' : the default filename given by ATK
|
|
616
|
-
}
|
|
448
|
+
password = str, ATLAS password, hence only used in ATLAS queries
|
|
617
449
|
```
|
|
618
|
-
|
|
619
|
-
<br>
|
|
620
|
-
|
|
621
|
-
**Example:**
|
|
622
|
-
To retrieve a HRD with a single source overlayed:
|
|
623
450
|
```
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
plot=plothrd(source=6050296829033196032)
|
|
627
|
-
showplot(plot)
|
|
451
|
+
sigmaclip = int, performs sigma clipping on the data to this number of standard deviations
|
|
628
452
|
```
|
|
453
|
+
and all other arguments have been defined [above](#1-query).
|
|
629
454
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
<br><br>
|
|
633
|
-
|
|
634
|
-
### 4. Lightcurve Tools<a id="4-lightcurve-tools"></a>
|
|
635
|
-
### 4.1. lightcurvequery<a id="41-lightcurvequery"></a>
|
|
636
|
-
|
|
637
|
-
Returns lightcurve data for a given survey.
|
|
638
|
-
|
|
639
|
-
<br>
|
|
640
|
-
|
|
641
|
-
Supported surveys:
|
|
455
|
+
Supported Surveys (and filter bands):
|
|
642
456
|
- ZTF (ztf) - g, r, i
|
|
643
457
|
- ATLAS (atlas) - o, c, i
|
|
644
458
|
- ASAS-SN (asassn) - g, v
|
|
@@ -649,33 +463,6 @@ Supported surveys:
|
|
|
649
463
|
|
|
650
464
|
<br>
|
|
651
465
|
|
|
652
|
-
```
|
|
653
|
-
lightcurvequery(survey,pos=None,source=None,radius=CONFIG,username=CONFIG,password=CONFIG,sigmaclip=None)
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
where:
|
|
657
|
-
```
|
|
658
|
-
survey = str, name of a supported survey
|
|
659
|
-
```
|
|
660
|
-
```
|
|
661
|
-
pos = list, [ra,dec]
|
|
662
|
-
```
|
|
663
|
-
```
|
|
664
|
-
source = int/str, Gaia source_id
|
|
665
|
-
```
|
|
666
|
-
```
|
|
667
|
-
radius = int/float, radius of lightcurve query
|
|
668
|
-
```
|
|
669
|
-
```
|
|
670
|
-
username = str, ATLAS username, hence only used in ATLAS queries
|
|
671
|
-
```
|
|
672
|
-
```
|
|
673
|
-
password = str, ATLAS password, hence only used in ATLAS queries
|
|
674
|
-
```
|
|
675
|
-
```
|
|
676
|
-
sigmaclip = int, performs sigma clipping on the data to this number of standard deviations
|
|
677
|
-
```
|
|
678
|
-
|
|
679
466
|
**Returns:** list of dicts
|
|
680
467
|
|
|
681
468
|
list of lightcurve data dictionaries with an entry for each band in that survey (see below). Each entry has the format:
|
|
@@ -700,84 +487,17 @@ list of lightcurve data dictionaries with an entry for each band in that survey
|
|
|
700
487
|
}
|
|
701
488
|
```
|
|
702
489
|
|
|
703
|
-
<br>
|
|
704
|
-
|
|
705
|
-
### 4.2. plotlightcurve<a id="42-plotlightcurve"></a>
|
|
706
|
-
|
|
707
|
-
Plots lightcurves in the format returned by [lightcurvequery](#41-lightcurvequery).
|
|
708
|
-
|
|
709
|
-
<br>
|
|
710
|
-
|
|
711
|
-
**Usage:**
|
|
712
|
-
|
|
713
|
-
```
|
|
714
|
-
plotlightcurve(data,colour='black')
|
|
715
|
-
```
|
|
716
|
-
|
|
717
|
-
where:
|
|
718
|
-
```
|
|
719
|
-
data = dict if passing a single lightcurve, list of dicts if passing multiple lightcurves
|
|
720
|
-
```
|
|
721
|
-
```
|
|
722
|
-
colour = str, name of a supported colour. Only used when passing a single lightcurve
|
|
723
|
-
```
|
|
724
|
-
```
|
|
725
|
-
colours = list of strings denoting supported colours, e.g. ['green','red','blue']. Only used when passing multiple lightcurves
|
|
726
|
-
```
|
|
727
|
-
|
|
728
|
-
**Returns:** dict
|
|
729
|
-
|
|
730
|
-
```
|
|
731
|
-
{
|
|
732
|
-
'type' : 'lightcurve'
|
|
733
|
-
'survey' : str, survey of lightcurve
|
|
734
|
-
'source' : int/str, source used to get data (None if a pos was used)
|
|
735
|
-
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
736
|
-
'plot' : bokeh figure object, the actual plot
|
|
737
|
-
'ATKfilename' : the default filename given by ATK
|
|
738
|
-
}
|
|
739
|
-
```
|
|
740
|
-
|
|
741
|
-
<br>
|
|
742
|
-
|
|
743
|
-
**Example**:
|
|
744
|
-
To retrieve and plot lightcurves from ZTF:
|
|
745
|
-
```
|
|
746
|
-
from AstroToolkit.Tools import lightcurvequery,plotlightcurve,showplot
|
|
747
|
-
|
|
748
|
-
lightcurves=lightcurvequery(survey='ztf',source=6050296829033196032)
|
|
749
|
-
showplot(plotlightcurve(lightcurves,colours=['green','red','blue']))
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-

|
|
753
|
-
|
|
754
|
-
**Note:** Each band will then be toggleable using the legend.
|
|
755
|
-
|
|
756
490
|
<br><br>
|
|
757
491
|
|
|
758
|
-
###
|
|
759
|
-
### 5.1. sedquery<a id="51-sedquery"></a>
|
|
492
|
+
### 1.7 SED Query<a id="17-sed-query"></a>
|
|
760
493
|
|
|
761
|
-
|
|
494
|
+
Type argument: 'sed'
|
|
762
495
|
|
|
763
|
-
|
|
496
|
+
Description: Queries all supported [photometry surveys](#12-photometry-query) and returns SED data.
|
|
764
497
|
|
|
765
|
-
|
|
498
|
+
Supported Arguments: pos, source, radius (all defined [above](#1-query))
|
|
766
499
|
|
|
767
|
-
|
|
768
|
-
sedquery(pos=None,source=None,radius=CONFIG)
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
where:
|
|
772
|
-
```
|
|
773
|
-
pos = list, [ra,dec]
|
|
774
|
-
```
|
|
775
|
-
```
|
|
776
|
-
source = int/str, Gaia source_id
|
|
777
|
-
```
|
|
778
|
-
```
|
|
779
|
-
radius = int/float, radius of data query
|
|
780
|
-
```
|
|
500
|
+
<br>
|
|
781
501
|
|
|
782
502
|
**Returns:** dict
|
|
783
503
|
|
|
@@ -796,167 +516,154 @@ radius = int/float, radius of data query
|
|
|
796
516
|
}
|
|
797
517
|
```
|
|
798
518
|
|
|
799
|
-
<br>
|
|
519
|
+
<br><br>
|
|
800
520
|
|
|
801
|
-
###
|
|
521
|
+
### 1.8 Spectrum Query<a id="18-spectrum-query"></a>
|
|
802
522
|
|
|
803
|
-
|
|
523
|
+
Type argument: 'spectra'
|
|
804
524
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
**Usage:**
|
|
525
|
+
Description: Returns spectrum data for a given survey.
|
|
808
526
|
|
|
809
|
-
|
|
810
|
-
plotsed(data)
|
|
811
|
-
```
|
|
527
|
+
Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
|
|
812
528
|
|
|
813
|
-
|
|
529
|
+
Supported Surveys: sdss
|
|
814
530
|
|
|
815
|
-
|
|
816
|
-
data = dict in format returned by sedquery
|
|
817
|
-
```
|
|
531
|
+
<br>
|
|
818
532
|
|
|
819
|
-
**Returns:**
|
|
533
|
+
**Returns:**
|
|
820
534
|
|
|
821
535
|
```
|
|
822
536
|
{
|
|
823
|
-
'type' : '
|
|
537
|
+
'type' : 'spectra'
|
|
538
|
+
'survey' : str, survey of detection
|
|
824
539
|
'source' : int/str, source used to get data (None if a pos was used)
|
|
825
540
|
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
826
|
-
'
|
|
827
|
-
'
|
|
541
|
+
'data': {
|
|
542
|
+
'wavelength' : list of wavelength values
|
|
543
|
+
'flux' : list of flux values
|
|
544
|
+
}
|
|
828
545
|
}
|
|
829
546
|
```
|
|
830
547
|
|
|
831
|
-
<br>
|
|
548
|
+
<br><br>
|
|
832
549
|
|
|
833
|
-
|
|
834
|
-
```
|
|
835
|
-
from AstroToolkit.Tools import sedquery,plotsed,showplot
|
|
550
|
+
### 1.9 HRD Query<a id="19-hrd-query"></a>
|
|
836
551
|
|
|
837
|
-
|
|
838
|
-
showplot(plotsed(data))
|
|
839
|
-
```
|
|
840
|
-
|
|
841
|
-

|
|
552
|
+
Type argument: 'hrd'
|
|
842
553
|
|
|
843
|
-
|
|
554
|
+
Description: Returns data for Gaia HRD creation given a Gaia source/list of Gaia sources.
|
|
844
555
|
|
|
845
|
-
|
|
846
|
-
### 6.1. spectrumquery<a id="61-spectrumquery"></a>
|
|
556
|
+
Supported Arguments: sources
|
|
847
557
|
|
|
848
|
-
|
|
558
|
+
where:
|
|
559
|
+
```
|
|
560
|
+
sources = single Gaia source or list of Gaia sources
|
|
561
|
+
```
|
|
849
562
|
|
|
850
563
|
<br>
|
|
851
564
|
|
|
852
|
-
**
|
|
565
|
+
**Returns:** dict
|
|
853
566
|
|
|
854
567
|
```
|
|
855
|
-
|
|
568
|
+
'type' : 'hrd'
|
|
569
|
+
'sources' : list, list of input Gaia sources
|
|
570
|
+
'data': {
|
|
571
|
+
'absg' : list, absolute g magnitudes of given sources
|
|
572
|
+
'bp-rp' : list, bp-rp values of given sources
|
|
573
|
+
}
|
|
856
574
|
```
|
|
857
575
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
576
|
+
<br><br>
|
|
577
|
+
|
|
578
|
+
## 2. plot<a id="2-plot"></a>
|
|
579
|
+
|
|
580
|
+
Interprets and plots data.
|
|
581
|
+
|
|
582
|
+
**Usage:**
|
|
583
|
+
|
|
865
584
|
```
|
|
866
|
-
|
|
585
|
+
plot(data,type=None)
|
|
867
586
|
```
|
|
587
|
+
|
|
588
|
+
where:
|
|
868
589
|
```
|
|
869
|
-
|
|
590
|
+
data = list/dict data in structure returned by the query tool
|
|
870
591
|
```
|
|
871
592
|
|
|
872
|
-
|
|
593
|
+
<br>
|
|
873
594
|
|
|
874
|
-
|
|
875
|
-
{
|
|
876
|
-
'type' : 'spectra'
|
|
877
|
-
'survey' : str, survey of detection
|
|
878
|
-
'source' : int/str, source used to get data (None if a pos was used)
|
|
879
|
-
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
880
|
-
'data': {
|
|
881
|
-
'wavelength' : list of wavelength values
|
|
882
|
-
'flux' : list of flux values
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
```
|
|
595
|
+
**Note:** If no plot is returned, the 'plot' key of the returned dictionary will be set to None.
|
|
886
596
|
|
|
887
597
|
<br>
|
|
888
598
|
|
|
889
|
-
|
|
599
|
+
**Supported plot types:** image, lightcurve, sed, spectra, hrd
|
|
600
|
+
|
|
601
|
+
<br>
|
|
890
602
|
|
|
891
|
-
|
|
603
|
+
Below is an outline of the usage and output of each plot type. Note that additonal arguments not listed above may be used, see individual plot types below for details.
|
|
892
604
|
|
|
893
605
|
<br>
|
|
894
606
|
|
|
895
|
-
**
|
|
607
|
+
**Shortcuts**:
|
|
896
608
|
|
|
897
|
-
|
|
898
|
-
plotspectrum(data)
|
|
899
|
-
```
|
|
609
|
+
[Image Plotting](#21-image-plotting)
|
|
900
610
|
|
|
901
|
-
|
|
611
|
+
[Lightcurve Plotting](#22-lightcurve-plotting)
|
|
902
612
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
613
|
+
[SED Plotting](#23-sed-plotting)
|
|
614
|
+
|
|
615
|
+
[Spectrum Plotting](#24-spectrum-plotting)
|
|
616
|
+
|
|
617
|
+
[HRD Plotting](#25-hrd-plotting)
|
|
618
|
+
|
|
619
|
+
### 2.1 Image Plotting<a id="21-image-plotting"></a>
|
|
620
|
+
|
|
621
|
+
Type argument: 'image'
|
|
622
|
+
|
|
623
|
+
Description: Plots images in format returned by [image queries](#15-imaging-query).
|
|
624
|
+
|
|
625
|
+
<br>
|
|
906
626
|
|
|
907
627
|
**Returns:** dict
|
|
908
628
|
|
|
909
629
|
```
|
|
910
630
|
{
|
|
911
|
-
'type' : '
|
|
912
|
-
'survey' : str, survey of
|
|
913
|
-
'source' : int/str, source used to get
|
|
914
|
-
'pos': [ra,dec], pos used to get
|
|
631
|
+
'type' : 'image'
|
|
632
|
+
'survey' : str, survey of image
|
|
633
|
+
'source' : int/str, source used to get image (None if a pos was used)
|
|
634
|
+
'pos' : [ra,dec], pos used to get image (None if a source was used)
|
|
915
635
|
'plot' : bokeh figure object, the actual plot
|
|
916
636
|
'ATKfilename' : the default filename given by ATK
|
|
917
637
|
}
|
|
918
638
|
```
|
|
919
639
|
|
|
920
|
-
<br>
|
|
921
|
-
|
|
922
|
-
**Example:**
|
|
923
|
-
To retrieve and plot an SDSS spectrum:
|
|
924
|
-
```
|
|
925
|
-
from AstroToolkit.Tools import spectrumquery,plotspectrum,showplot
|
|
926
|
-
|
|
927
|
-
data=spectrumquery(survey='sdss',source=587316166180416640)
|
|
928
|
-
plot=plotspectrum(data)
|
|
929
|
-
showplot(plot)
|
|
930
|
-
```
|
|
931
|
-
|
|
932
|
-

|
|
933
|
-
|
|
934
640
|
<br><br>
|
|
935
641
|
|
|
936
|
-
###
|
|
937
|
-
### 7.1 plotpowspec<a id="71-plotpowspec"></a>
|
|
642
|
+
### 2.2 Lightcurve Plotting<a id="22-lightcurve-plotting"></a>
|
|
938
643
|
|
|
939
|
-
|
|
644
|
+
Type argument: 'lightcurve'
|
|
940
645
|
|
|
941
|
-
|
|
646
|
+
Description: Plots lightcurves in the format returned by [lightcurve queries](#16-lightcurve-query). Here, you can either pass a single lightcurve, or multiple lightcurves (e.g. those returned from [lightcurve queries](#16-lightcurve-query)).
|
|
942
647
|
|
|
943
|
-
|
|
648
|
+
Additional Supported Arguments: colour, colours
|
|
944
649
|
|
|
650
|
+
where:
|
|
945
651
|
```
|
|
946
|
-
|
|
652
|
+
colour = str, name of a supported colour. Only used when passing a single lightcurve
|
|
947
653
|
```
|
|
948
|
-
|
|
949
|
-
where:
|
|
950
654
|
```
|
|
951
|
-
|
|
655
|
+
colours = list of strings denoting supported colours, e.g. ['green','red','blue']. Only used when passing multiple lightcurves
|
|
952
656
|
```
|
|
953
657
|
|
|
954
|
-
**
|
|
658
|
+
**Note:** CRTS' data server is not designed for scripted queries. As a result, queries are limited in the toolkit to one query per 15 seconds. This cooldown is managed using the CRTS_TIMER.txt file in the Settings directory of the package files, and hence the contents of this file should not be edited.
|
|
659
|
+
|
|
660
|
+
<br>
|
|
955
661
|
|
|
662
|
+
**Returns:** dict
|
|
956
663
|
```
|
|
957
664
|
{
|
|
958
|
-
'type' : '
|
|
959
|
-
'survey' : str, survey of lightcurve
|
|
665
|
+
'type' : 'lightcurve'
|
|
666
|
+
'survey' : str, survey of lightcurve
|
|
960
667
|
'source' : int/str, source used to get data (None if a pos was used)
|
|
961
668
|
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
962
669
|
'plot' : bokeh figure object, the actual plot
|
|
@@ -964,56 +671,78 @@ data = dict or list in format returned by lightcurvequery
|
|
|
964
671
|
}
|
|
965
672
|
```
|
|
966
673
|
|
|
674
|
+
<br><br>
|
|
675
|
+
|
|
676
|
+
### 2.3 SED Plotting<a id="23-sed-plotting"></a>
|
|
677
|
+
|
|
678
|
+
Type argument: 'sed'
|
|
679
|
+
|
|
680
|
+
Description: Plots SED data in the format returned by [SED queries](#17-sed-query).
|
|
681
|
+
|
|
967
682
|
<br>
|
|
968
683
|
|
|
969
|
-
**
|
|
970
|
-
To retrieve lightcurve data from ZTF and plot a power spectrum:
|
|
684
|
+
**Returns:** dict
|
|
971
685
|
```
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
686
|
+
{
|
|
687
|
+
'type' : 'sed'
|
|
688
|
+
'source' : int/str, source used to get data (None if a pos was used)
|
|
689
|
+
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
690
|
+
'data': list of entries with each entry taking the form of a dict:
|
|
691
|
+
{
|
|
692
|
+
'survey' : str, survey of data point
|
|
693
|
+
'wavelength' : filter wavelength of data point
|
|
694
|
+
'flux' : flux through filter
|
|
695
|
+
'rel_err' : relative error on flux
|
|
696
|
+
}
|
|
697
|
+
}
|
|
977
698
|
```
|
|
978
699
|
|
|
979
|
-

|
|
980
|
-
|
|
981
700
|
<br><br>
|
|
982
701
|
|
|
983
|
-
###
|
|
702
|
+
### 2.4 Spectrum Plotting<a id="24-spectrum-plotting"></a>
|
|
984
703
|
|
|
985
|
-
|
|
704
|
+
Type argument: 'spectra'
|
|
986
705
|
|
|
987
|
-
|
|
706
|
+
Description: Plots spectrum data in the format returned by [spectrum queries](#18-spectrum-query).
|
|
988
707
|
|
|
989
|
-
|
|
708
|
+
<br>
|
|
990
709
|
|
|
710
|
+
**Returns:** dict
|
|
991
711
|
```
|
|
992
|
-
|
|
712
|
+
{
|
|
713
|
+
'type' : 'spectrum'
|
|
714
|
+
'survey' : str, survey of spectrum
|
|
715
|
+
'source' : int/str, source used to get data (None if a pos was used)
|
|
716
|
+
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
717
|
+
'plot' : bokeh figure object, the actual plot
|
|
718
|
+
'ATKfilename' : the default filename given by ATK
|
|
719
|
+
}
|
|
993
720
|
```
|
|
994
721
|
|
|
995
|
-
|
|
722
|
+
<br><br>
|
|
996
723
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
724
|
+
### 2.5 HRD Plotting<a id="25-hrd-plotting"></a>
|
|
725
|
+
|
|
726
|
+
Type argument: 'hrd'
|
|
727
|
+
|
|
728
|
+
Description: Plots Gaia HRD data in the format returned by [hrd queries](#19-hrd-query).
|
|
1000
729
|
|
|
1001
730
|
<br>
|
|
1002
731
|
|
|
1003
|
-
**
|
|
1004
|
-
To retrieve lightcurve data from ZTF and perform timeseries analysis:
|
|
732
|
+
**Returns:** dict
|
|
1005
733
|
```
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
734
|
+
{
|
|
735
|
+
'type' : 'hrd'
|
|
736
|
+
'source' : int/str, source overlayed in HRD
|
|
737
|
+
'sources' : list, sources overlayed in HRD if multiple were given
|
|
738
|
+
'plot' : bokeh figure object, the actual plot
|
|
739
|
+
'ATKfilename' : the default filename given by ATK
|
|
740
|
+
}
|
|
1010
741
|
```
|
|
1011
742
|
|
|
1012
|
-

|
|
1013
|
-
|
|
1014
743
|
<br><br>
|
|
1015
744
|
|
|
1016
|
-
##
|
|
745
|
+
## 3. Datapage Tools<a id="3-datapage-tools"></a>
|
|
1017
746
|
|
|
1018
747
|
These functions are used to create custom datapages from any plots/data supported by AstroToolkit.
|
|
1019
748
|
|
|
@@ -1025,7 +754,17 @@ Below is the datapage produced by this example. Once the script to create these
|
|
|
1025
754
|
|
|
1026
755
|
<br>
|
|
1027
756
|
|
|
1028
|
-
|
|
757
|
+
Shortcuts:
|
|
758
|
+
|
|
759
|
+
[Grid Creation](#31-gridsetup)
|
|
760
|
+
|
|
761
|
+
[SIMBAD/Vizier Buttons](#32-getbuttons)
|
|
762
|
+
|
|
763
|
+
[Metadata Table Creation](#33-getmdtable)
|
|
764
|
+
|
|
765
|
+
<br><br>
|
|
766
|
+
|
|
767
|
+
### 3.1 gridsetup<a id="31-gridsetup"></a>
|
|
1029
768
|
|
|
1030
769
|
Formats plots for datapage creation by sizing them to a grid of given dimensions.
|
|
1031
770
|
|
|
@@ -1071,7 +810,7 @@ where the keys "name ..." are the names given to the plots above, and the values
|
|
|
1071
810
|
|
|
1072
811
|
<br>
|
|
1073
812
|
|
|
1074
|
-
###
|
|
813
|
+
### 3.2 getbuttons<a id="32-getbuttons"></a>
|
|
1075
814
|
|
|
1076
815
|
Returns a Bokeh figure containing SIMBAD and Vizier buttons for use in datapages.
|
|
1077
816
|
|
|
@@ -1115,7 +854,7 @@ vizier_radius = int, radius to use in Vizier queries
|
|
|
1115
854
|
|
|
1116
855
|
<br>
|
|
1117
856
|
|
|
1118
|
-
###
|
|
857
|
+
### 3.3 getmdtable<a id="33-getmdtable"></a>
|
|
1119
858
|
|
|
1120
859
|
Creates a table of metadata table using data from supported surveys and/or custom data.
|
|
1121
860
|
|
|
@@ -1189,12 +928,23 @@ In this case, an additional 'values' key must be included, and the values/errors
|
|
|
1189
928
|
|
|
1190
929
|
<br><br>
|
|
1191
930
|
|
|
1192
|
-
##
|
|
931
|
+
## 4. File Handling Tools<a id="4-file-handling-tools"></a>
|
|
932
|
+
|
|
1193
933
|
These tools can be used to transform many returned ATK data structures into local files, and vice versa. This process is designed to be completely lossless, allowing for the exact data structure that was used to create a file to be recreated at a later date.
|
|
1194
934
|
|
|
1195
935
|
<br>
|
|
1196
936
|
|
|
1197
|
-
|
|
937
|
+
Shortcuts:
|
|
938
|
+
|
|
939
|
+
[Data Saving](#41-savedata)
|
|
940
|
+
|
|
941
|
+
[Data Reading](#42-readdata)
|
|
942
|
+
|
|
943
|
+
[Export Plots to PNG](#43-export)
|
|
944
|
+
|
|
945
|
+
<br><br>
|
|
946
|
+
|
|
947
|
+
### 4.1 savedata<a id="41-savedata"></a>
|
|
1198
948
|
|
|
1199
949
|
This tool allows for the saving of many ATK data structures into local files.
|
|
1200
950
|
|
|
@@ -1224,7 +974,7 @@ Name of file that the data was saved to
|
|
|
1224
974
|
|
|
1225
975
|
<br>
|
|
1226
976
|
|
|
1227
|
-
###
|
|
977
|
+
### 4.2 readdata<a id="42-readdata"></a>
|
|
1228
978
|
|
|
1229
979
|
This tool allows for the lossless recreation of ATK data stuctures from files created using [savedata](#91-savedata).
|
|
1230
980
|
|
|
@@ -1267,7 +1017,7 @@ showplot(plotlightcurve(recreated_lightcurve_data,colours=['red','orange','yello
|
|
|
1267
1017
|
|
|
1268
1018
|
<br>
|
|
1269
1019
|
|
|
1270
|
-
###
|
|
1020
|
+
### 4.3 export<a id="43-export"></a>
|
|
1271
1021
|
|
|
1272
1022
|
This allows for ATK figures to be saved as a .png file.
|
|
1273
1023
|
|
|
@@ -1289,15 +1039,35 @@ keephtml = bool. To get the filename for the png, the plot must first be saved a
|
|
|
1289
1039
|
|
|
1290
1040
|
<br><br>
|
|
1291
1041
|
|
|
1292
|
-
|
|
1042
|
+
## 5. Other Tools<a id="5-other-tools"></a>
|
|
1293
1043
|
|
|
1294
|
-
|
|
1044
|
+
Below is a list of the other tools available in ATK.
|
|
1295
1045
|
|
|
1296
|
-
|
|
1046
|
+
Shortcuts:
|
|
1297
1047
|
|
|
1298
|
-
|
|
1048
|
+
[Show Plots](531-showplot)
|
|
1299
1049
|
|
|
1300
|
-
|
|
1050
|
+
[Save Plots](532-saveplot)
|
|
1051
|
+
|
|
1052
|
+
[Proper Motion Correction](533-correctpm)
|
|
1053
|
+
|
|
1054
|
+
[Parallax to Distance](534-getdistance)
|
|
1055
|
+
|
|
1056
|
+
[Convert Degrees to HMS/DMS](535-convfromdeg)
|
|
1057
|
+
|
|
1058
|
+
[Convert from HMS/DMS to Degrees](536-convtodeg)
|
|
1059
|
+
|
|
1060
|
+
[Read fits file columns](#57-getcolumn)
|
|
1061
|
+
|
|
1062
|
+
[Read Sources from a fits file](#58-getsources)
|
|
1063
|
+
|
|
1064
|
+
[Read Positions from a fits file](#59-getpositions)
|
|
1065
|
+
|
|
1066
|
+
[Open object in SIMBAD/Vizier](#510-webquery)
|
|
1067
|
+
|
|
1068
|
+
### 5.1 showplot<a id="51-showplot"></a>
|
|
1069
|
+
|
|
1070
|
+
Description: This allows for the plot dictionaries returned by ATK to be opened in the browser. Doing so will also save the plot locally as a .html file. Can also be used with the same functionality as show() from bokeh for non-ATK bokeh figures.
|
|
1301
1071
|
|
|
1302
1072
|
<br>
|
|
1303
1073
|
|
|
@@ -1308,14 +1078,14 @@ showplot(plot)
|
|
|
1308
1078
|
|
|
1309
1079
|
where:
|
|
1310
1080
|
```
|
|
1311
|
-
plot = ATK plot dictionary
|
|
1081
|
+
plot = ATK plot dictionary or bokeh figure
|
|
1312
1082
|
```
|
|
1313
1083
|
|
|
1314
|
-
<br>
|
|
1084
|
+
<br><br>
|
|
1315
1085
|
|
|
1316
|
-
###
|
|
1086
|
+
### 5.2 saveplot<a id="52-saveplot"></a>
|
|
1317
1087
|
|
|
1318
|
-
This allows for the plot dictionaries returned by ATK to be saved to local .html files without opening them in the browser. Can also be used with the same functionality as save() from bokeh for non-ATK bokeh figures.
|
|
1088
|
+
Description: This allows for the plot dictionaries returned by ATK to be saved to local .html files without opening them in the browser. Can also be used with the same functionality as save() from bokeh for non-ATK bokeh figures.
|
|
1319
1089
|
|
|
1320
1090
|
<br>
|
|
1321
1091
|
|
|
@@ -1326,14 +1096,14 @@ saveplot(plot)
|
|
|
1326
1096
|
|
|
1327
1097
|
where:
|
|
1328
1098
|
```
|
|
1329
|
-
plot = ATK plot dictionary
|
|
1099
|
+
plot = ATK plot dictionary or bokeh figure
|
|
1330
1100
|
```
|
|
1331
1101
|
|
|
1332
|
-
<br>
|
|
1102
|
+
<br><br>
|
|
1333
1103
|
|
|
1334
|
-
###
|
|
1104
|
+
### 5.3 correctpm<a id="53-correctpm"></a>
|
|
1335
1105
|
|
|
1336
|
-
Corrects for proper motion of an object between an input time and a target time.
|
|
1106
|
+
Description: Corrects for proper motion of an object between an input time and a target time.
|
|
1337
1107
|
|
|
1338
1108
|
<br>
|
|
1339
1109
|
|
|
@@ -1370,22 +1140,9 @@ pmdec = float, proper motion in dec direction of object in mas/yr
|
|
|
1370
1140
|
|
|
1371
1141
|
[ra,dec] of object in degrees, corrected for proper motion.
|
|
1372
1142
|
|
|
1373
|
-
<br>
|
|
1374
|
-
|
|
1375
|
-
**Example:**
|
|
1376
|
-
To correct an object for proper motion to the year 2000:
|
|
1377
|
-
```
|
|
1378
|
-
from AstroToolkit.Tools import dataquery,correctpm
|
|
1379
|
-
|
|
1380
|
-
gaia_data=dataquery(survey='gaia',source=6050296829033196032)['data']
|
|
1381
|
-
ra,dec,pmra,pmdec=gaia_data['ra'][0],gaia_data['dec'][0],gaia_data['pmra'][0],gaia_data['pmdec'][0]
|
|
1382
|
-
|
|
1383
|
-
ra_corrected,dec_corrected=correctpm([2016,0],[2000,0],ra,dec,pmra,pmdec)
|
|
1384
|
-
```
|
|
1385
|
-
|
|
1386
|
-
<br>
|
|
1143
|
+
<br><br>
|
|
1387
1144
|
|
|
1388
|
-
###
|
|
1145
|
+
### 5.4 getdistance<a id="54-getdistance"></a>
|
|
1389
1146
|
|
|
1390
1147
|
Simply calculates the distance (1/parallax) of an object given its parallax in mas (the unit of parallax in Gaia).
|
|
1391
1148
|
|
|
@@ -1410,7 +1167,7 @@ distance of object in pc
|
|
|
1410
1167
|
|
|
1411
1168
|
<br>
|
|
1412
1169
|
|
|
1413
|
-
###
|
|
1170
|
+
### 5.5 convfromdeg<a id="55-convfromdeg"></a>
|
|
1414
1171
|
|
|
1415
1172
|
Converts deg coordinates to HMS/DMS format
|
|
1416
1173
|
|
|
@@ -1435,7 +1192,7 @@ pos = list, [ra,dec] of object in degrees
|
|
|
1435
1192
|
|
|
1436
1193
|
<br>
|
|
1437
1194
|
|
|
1438
|
-
###
|
|
1195
|
+
### 5.6 convtodeg<a id="56-convtodeg"></a>
|
|
1439
1196
|
|
|
1440
1197
|
Converts HMS/DMS coordinates to deg.
|
|
1441
1198
|
|
|
@@ -1460,7 +1217,7 @@ pos = list, [ra,dec] of object in [HMS/DMS] format, i.e. [[H,M,S],[D,M,S]]
|
|
|
1460
1217
|
|
|
1461
1218
|
<br>
|
|
1462
1219
|
|
|
1463
|
-
###
|
|
1220
|
+
### 5.7 getcolumn<a id="57-getcolumn"></a>
|
|
1464
1221
|
|
|
1465
1222
|
Returns a list of values from a .fits file given a column name.
|
|
1466
1223
|
|
|
@@ -1484,7 +1241,7 @@ list of values for that column
|
|
|
1484
1241
|
|
|
1485
1242
|
<br>
|
|
1486
1243
|
|
|
1487
|
-
###
|
|
1244
|
+
### 5.8 getsources<a id="58-getsources"></a>
|
|
1488
1245
|
|
|
1489
1246
|
Returns a list of source values from a .fits file given a column name, which can either be set in the tool or in the config.
|
|
1490
1247
|
|
|
@@ -1508,7 +1265,7 @@ list of Gaia sources
|
|
|
1508
1265
|
|
|
1509
1266
|
<br>
|
|
1510
1267
|
|
|
1511
|
-
###
|
|
1268
|
+
### 5.9 getpositions<a id="59-getpositions"></a>
|
|
1512
1269
|
|
|
1513
1270
|
Returns a list of ra,dec values from a .fits file given ra and dec column names, which can either be set in the tool or in the config.
|
|
1514
1271
|
|
|
@@ -1529,3 +1286,147 @@ col_name = str, comma separated string containing names of ra and dec columns. e
|
|
|
1529
1286
|
**Returns:** list
|
|
1530
1287
|
|
|
1531
1288
|
list of positions [[ra1,dec1],[ra2,dec2]], etc.
|
|
1289
|
+
|
|
1290
|
+
### 5.10 webquery<a id="510-webquery"></a>
|
|
1291
|
+
|
|
1292
|
+
Performs SIMBAD/Vizier queries given a source/pos in the web browser.
|
|
1293
|
+
|
|
1294
|
+
**Usage:**
|
|
1295
|
+
|
|
1296
|
+
```
|
|
1297
|
+
webquery(type,source=None,pos=None,radius=CONFIG)
|
|
1298
|
+
```
|
|
1299
|
+
|
|
1300
|
+
where:
|
|
1301
|
+
```
|
|
1302
|
+
type = str, type of query from 'simbad' or 'vizier'
|
|
1303
|
+
```
|
|
1304
|
+
```
|
|
1305
|
+
pos = list, [ra,dec]
|
|
1306
|
+
```
|
|
1307
|
+
```
|
|
1308
|
+
source = int/str, Gaia source_id
|
|
1309
|
+
```
|
|
1310
|
+
```
|
|
1311
|
+
radius = int/float, radius of data query. If not given, this is taken from simbad_radius or vizier_radius in the config, depending on the query type
|
|
1312
|
+
```
|
|
1313
|
+
|
|
1314
|
+
**Returns:** None
|
|
1315
|
+
|
|
1316
|
+
<br><br>
|
|
1317
|
+
|
|
1318
|
+
## Examples<a id="examples"></a>
|
|
1319
|
+
|
|
1320
|
+
### Example 1: Fetching and plotting an image
|
|
1321
|
+
|
|
1322
|
+
```
|
|
1323
|
+
from AstroToolkit.Tools import query,plot,showplot
|
|
1324
|
+
|
|
1325
|
+
image=query(type='image',survey='any',source=6050296829033196032,overlays='gaia')
|
|
1326
|
+
figure=plot(image)
|
|
1327
|
+
showplot(figure)
|
|
1328
|
+
```
|
|
1329
|
+
|
|
1330
|
+

|
|
1331
|
+
|
|
1332
|
+
<br><br>
|
|
1333
|
+
|
|
1334
|
+
### Example 2: Fetching and plotting a Gaia HRD
|
|
1335
|
+
|
|
1336
|
+
```
|
|
1337
|
+
from AstroToolkit.Tools import query,plot,showplot
|
|
1338
|
+
|
|
1339
|
+
data=query(type='hrd',sources=[6050296829033196032])
|
|
1340
|
+
figure=plot(data)
|
|
1341
|
+
showplot(figure)
|
|
1342
|
+
```
|
|
1343
|
+
|
|
1344
|
+

|
|
1345
|
+
|
|
1346
|
+
<br><br>
|
|
1347
|
+
|
|
1348
|
+
### Example 3: Fetching and plotting a ZTF lightcurve
|
|
1349
|
+
|
|
1350
|
+
```
|
|
1351
|
+
from AstroToolkit.Tools import query,plot,showplot
|
|
1352
|
+
|
|
1353
|
+
data=lightcurvequery(type='lightcurve',survey='ztf',source=6050296829033196032)
|
|
1354
|
+
showplot(plot(data,colours=['green','red','blue']))
|
|
1355
|
+
```
|
|
1356
|
+
|
|
1357
|
+
**Note:** Each band will then be toggleable using the legend.
|
|
1358
|
+
|
|
1359
|
+

|
|
1360
|
+
|
|
1361
|
+
<br><br>
|
|
1362
|
+
|
|
1363
|
+
### Example 4: Fetching and plotting an SED
|
|
1364
|
+
|
|
1365
|
+
```
|
|
1366
|
+
from AstroToolkit.Tools import query,plot,showplot
|
|
1367
|
+
|
|
1368
|
+
data=query(type='sed',source=6050296829033196032)
|
|
1369
|
+
showplot(plot(data))
|
|
1370
|
+
```
|
|
1371
|
+
|
|
1372
|
+

|
|
1373
|
+
|
|
1374
|
+
<br><br>
|
|
1375
|
+
|
|
1376
|
+
### Example 5: Fetching and plotting an SDSS spectrum
|
|
1377
|
+
|
|
1378
|
+
```
|
|
1379
|
+
from AstroToolkit.Tools import query,plot,showplot
|
|
1380
|
+
|
|
1381
|
+
data=query(type='spectra',survey='sdss',source=587316166180416640)
|
|
1382
|
+
plot=plot(data)
|
|
1383
|
+
showplot(plot)
|
|
1384
|
+
```
|
|
1385
|
+
|
|
1386
|
+

|
|
1387
|
+
|
|
1388
|
+
<br><br>
|
|
1389
|
+
|
|
1390
|
+
### Example 6: Fetching Gaia parallax and WISE data
|
|
1391
|
+
|
|
1392
|
+
```
|
|
1393
|
+
from AstroToolkit.Tools import query
|
|
1394
|
+
|
|
1395
|
+
source = 6050296829033196032
|
|
1396
|
+
|
|
1397
|
+
parallax = query(type='data',survey='gaia',source=source)['data']['parallax']
|
|
1398
|
+
wise_data = query(type='data',survey='wise',source=source)['data']
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
### Example 7: Fetching 2MASS photometry for an object
|
|
1402
|
+
|
|
1403
|
+
```
|
|
1404
|
+
from AstroToolkit.Tools import query
|
|
1405
|
+
|
|
1406
|
+
data=query(type='phot',survey='twomass',source=6050296829033196032)['data']
|
|
1407
|
+
```
|
|
1408
|
+
|
|
1409
|
+
### Example 8: Fetching photometry from all available surveys using a bulk photometry query
|
|
1410
|
+
|
|
1411
|
+
```
|
|
1412
|
+
from AstroToolkit.Tools import query
|
|
1413
|
+
|
|
1414
|
+
bulk_phot=query(type='bulkphot',source=6050296829033196032)['data']
|
|
1415
|
+
|
|
1416
|
+
gaia_data=bulk_phot['gaia']
|
|
1417
|
+
galex_data=bulk_phot['galex']
|
|
1418
|
+
```
|
|
1419
|
+
|
|
1420
|
+
<br><br>
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
### Example 9: Proper motion correction
|
|
1424
|
+
|
|
1425
|
+
```
|
|
1426
|
+
from AstroToolkit.Tools import query,correctpm
|
|
1427
|
+
|
|
1428
|
+
gaia_data=query(type='data',survey='gaia',source=6050296829033196032)['data']
|
|
1429
|
+
ra,dec,pmra,pmdec=gaia_data['ra'][0],gaia_data['dec'][0],gaia_data['pmra'][0],gaia_data['pmdec'][0]
|
|
1430
|
+
|
|
1431
|
+
ra_corrected,dec_corrected=correctpm([2016,0],[2000,0],ra,dec,pmra,pmdec)
|
|
1432
|
+
```
|