AstroToolkit 1.3.5__tar.gz → 1.4.0__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.
Files changed (53) hide show
  1. {AstroToolkit-1.3.5/src/AstroToolkit.egg-info → AstroToolkit-1.4.0}/PKG-INFO +508 -530
  2. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/README.md +508 -530
  3. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/pyproject.toml +1 -1
  4. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/imaging.py +2 -2
  5. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/lightcurves.py +2 -2
  6. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/overlays.py +10 -11
  7. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/reddening.py +7 -7
  8. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/sed.py +2 -2
  9. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/spectra.py +2 -2
  10. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Datapages/buttons.py +2 -2
  11. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Datapages/metadata.py +3 -3
  12. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Examples/datapage_creation.py +12 -11
  13. AstroToolkit-1.4.0/src/AstroToolkit/Misc/database_queries.py +32 -0
  14. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/file_naming.py +10 -7
  15. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/input_validation.py +3 -0
  16. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/HRD.py +33 -33
  17. AstroToolkit-1.4.0/src/AstroToolkit/Tools.py +937 -0
  18. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0/src/AstroToolkit.egg-info}/PKG-INFO +508 -530
  19. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit.egg-info/SOURCES.txt +1 -0
  20. AstroToolkit-1.3.5/src/AstroToolkit/Tools.py +0 -916
  21. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/LICENSE +0 -0
  22. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/MANIFEST.in +0 -0
  23. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/setup.cfg +0 -0
  24. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/data.py +0 -0
  25. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/lightcurve_sigma_clip.py +0 -0
  26. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Data/photometry.py +0 -0
  27. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Datapages/grid.py +0 -0
  28. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/ProperMotionCorrection.py +0 -0
  29. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/coord_conversion.py +0 -0
  30. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/file_handling.py +0 -0
  31. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Misc/read_fits.py +0 -0
  32. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/backdrop_hrd_allmags.fits +0 -0
  33. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/imaging.py +0 -0
  34. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/lightcurves.py +0 -0
  35. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/powspec.py +0 -0
  36. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/sed.py +0 -0
  37. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Plotting/spectra.py +0 -0
  38. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Settings/__init__.py +0 -0
  39. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/README - Windows.txt +0 -0
  40. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/README.txt +0 -0
  41. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/__init__.py +0 -0
  42. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/aov.cp38-win_amd64.pyd +0 -0
  43. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/aov.f90 +0 -0
  44. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/aovconst.f90 +0 -0
  45. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/aovsub.f90 +0 -0
  46. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/build.sh +0 -0
  47. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/buildwin.bat +0 -0
  48. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/pyaov.pdf +0 -0
  49. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/pyaov.py +0 -0
  50. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit/Timeseries/ztfanalysis.py +0 -0
  51. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit.egg-info/dependency_links.txt +0 -0
  52. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit.egg-info/requires.txt +0 -0
  53. {AstroToolkit-1.3.5 → AstroToolkit-1.4.0}/src/AstroToolkit.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AstroToolkit
3
- Version: 1.3.5
3
+ Version: 1.4.0
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
@@ -29,7 +29,7 @@ Requires-Dist: selenium==4.17.2
29
29
 
30
30
  # AstroToolkit
31
31
 
32
- AstroToolkit (ATK) is a set of useful tools for fetching, plotting, and analysing astronomical data.
32
+ AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
33
33
 
34
34
  ## Table of Contents
35
35
 
@@ -37,49 +37,15 @@ AstroToolkit (ATK) is a set of useful tools for fetching, plotting, and analysin
37
37
  2. [Introduction](#introduction)
38
38
  3. [Configuration](#configuration)
39
39
  4. [Tools](#tools)
40
+ 5. [Examples](#examples)
40
41
 
41
42
  ### ATK Tools
42
43
 
43
- - 1 [Raw Data Tools](#1-raw-data-tools)
44
- - 1.1 [dataquery](#11-dataquery)
45
- - 1.2 [photquery](#12-photquery)
46
- - 1.3 [bulkphotquery](#13-bulkphotquery)
47
- - 1.4 [getreddening](#14-getreddening)
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)
44
+ - 1 [Query](#1-query)
45
+ - 2 [Plot](#2-plot)
46
+ - 3 [Datapage Tools](#3-datapage-tools)
47
+ - 4 [File Handling Tools](#4-file-handling-tools)
48
+ - 5 [Other Tools](#5-other-tools)
83
49
 
84
50
  <br>
85
51
 
@@ -142,25 +108,25 @@ where options is a dictionary containing key : value pairs to set in the config.
142
108
  - enable_notifications = False
143
109
  - 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
110
  - dataquery_radius = 3
145
- - This sets the default radius (in arcseconds) to use in the [dataquery](#11-dataquery) tool.
111
+ - This sets the default radius (in arcseconds) to use in [data queries](#11-data-query).
146
112
  - photquery_radius = 3
147
- - This sets the default radius (in arcseconds) to use in the [photquery](#12-photquery) tool.
113
+ - This sets the default radius (in arcseconds) to use in [photometry queries](#12-photometry-query).
148
114
  - bulkphotquery_radius = 3
149
- - This sets the default radius (in arcseconds) to use in the [bulkphotquery](#13-bulkphotquery) tool.
115
+ - This sets the default radius (in arcseconds) to use in [bulk photometry queries](#13-bulk-photometry-query).
150
116
  - imagequery_size = 30
151
- - This sets the default radius (in arcseconds) to use in the [imagequery](#21-imagequery) tool.
117
+ - This sets the default radius (in arcseconds) to use in [image queries](#15-imaging-query).
152
118
  - imagequery_overlays = gaia
153
- - This sets the default radius (in arcseconds) to use in the [imagequery](#21-imagequery) tool.
119
+ - This sets the default radius (in arcseconds) to use in [image queries](#15-imaging-query).
154
120
  - lightcurvequery_radius = 3
155
- - This sets the default radius (in arcseconds) to use in the [lightcurvequery](#31-lightcurvequery) tool.
121
+ - This sets the default radius (in arcseconds) to use in [lightcurve queries](#16-lightcurve-query).
156
122
  - atlas_username = None
157
- - This sets the default username to use for ATLAS lightcurve queries in the [lightcurvequery](#31-lightcurvequery) tool.
123
+ - This sets the default username to use in ATLAS [lightcurve queries](#16-lightcurve-query).
158
124
  - atlas_password = None
159
- - This sets the default password to use for ATLAS lightcurve queries in the [lightcurvequery](#31-lightcurvequery) tool.
125
+ - This sets the default password to use in ATLAS [lightcurve queries](#16-lightcurve-query).
160
126
  - sed_radius = 3
161
- - This sets the default radius to use in the [sedquery](#41-sedquery) tool.
127
+ - This sets the default radius to use in [SED queries](#17-sed-query).
162
128
  - spectrum_radius = 3
163
- - This sets the default radius to use in the [spectrumquery](#51-spectrumquery) tool.
129
+ - This sets the default radius to use in [spectrum queries](#18-spectrum-query).
164
130
  - grid_size = 250
165
131
  - This sets the default grid size to use in the [gridsetup](#71-gridsetup) tool.
166
132
  - button_simbad_radius = 3
@@ -202,7 +168,7 @@ parameter = string, name of config parameter from above list
202
168
 
203
169
  <br><br>
204
170
 
205
- ## Tools
171
+ ## Tools<a id="tools"></a>
206
172
 
207
173
  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
174
 
@@ -216,25 +182,21 @@ In this section, the available tools will be outlined. Note that if a parameter
216
182
 
217
183
  <br>
218
184
 
219
- ### 1. Raw Data Tools<a id="1-raw-data-tools"></a>
220
- ### 1.1. dataquery<a id="11-dataquery"></a>
185
+ ## 1. query<a id="1-query"></a>
221
186
 
222
- Returns all available data for a given survey (e.g. magnitudes, positions, etc.).
223
-
224
- <br>
225
-
226
- **Supported surveys:** gaia, galex, rosat, panstarrs, skymapper, sdss, twomass, wise, erosita
227
-
228
- <br>
187
+ Returns available data of a given type from a given survey.
229
188
 
230
189
  **Usage:**
231
190
 
232
191
  ```
233
- dataquery(survey,pos=None,source=None,radius=CONFIG)
192
+ query(type,survey=None,pos=None,source=None,radius=CONFIG)
234
193
  ```
235
194
 
236
195
  where:
237
196
 
197
+ ```
198
+ type = str, type of data to return
199
+ ```
238
200
  ```
239
201
  survey = str, name of a supported survey
240
202
  ```
@@ -245,68 +207,56 @@ pos = list, [ra,dec]
245
207
  source = int/str, Gaia source_id
246
208
  ```
247
209
  ```
248
- radius = int/float, radius of query
210
+ radius = int/float, radius of query of given type. If not given, will be taken from config value for given query type.
249
211
  ```
250
212
 
251
- **Returns:** dict
213
+ <br>
252
214
 
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
- ```
215
+ **Note:** If no data is returned, the 'data' key of the returned dictionary will be set to None.
262
216
 
263
217
  <br>
264
218
 
265
- **Example:**
219
+ **Supported query types:** data, phot, bulkphot, image, lightcurve, sed, spectra, reddening
266
220
 
267
- To retrieve the parallax of a system through Gaia, and its WISE data:
221
+ <br>
268
222
 
269
- ```
270
- from AstroToolkit.Tools import dataquery
223
+ 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
224
 
272
- source = 6050296829033196032
225
+ <br>
273
226
 
274
- parallax = dataquery(survey='gaia',source=source)['data']['parallax']
275
- wise_data = dataquery(survey='wise',source=source)['data']
276
- ```
227
+ **Shortcuts**:
277
228
 
278
- <br><br>
229
+ [Data Queries](#11-data-query)
279
230
 
280
- ### 1.2. photquery<a id="12-photquery"></a>
231
+ [Photometry Queries](#12-photometry-query)
281
232
 
282
- Returns data from a given survey, with columns filtered to only include photometry and other basic information.
233
+ [Bulk Photomety Queries](#13-bulk-photometry-query)
283
234
 
284
- <br>
235
+ [Reddening Queries](#14-reddening-query)
236
+
237
+ [Imaging Queries](#15-imaging-query)
238
+
239
+ [Lightcurve Queries](#16-lightcurve-query)
240
+
241
+ [SED Queries](#17-sed-query)
242
+
243
+ [Spectrum Queries](#18-spectrum-query)
285
244
 
286
- **Supported surveys:** gaia,panstarrs,skymapper,galex,rosat,sdss,wise,twomass
245
+ [HRD Queries](#19-hrd-query)
287
246
 
288
247
  <br>
289
248
 
290
- **Usage:**
249
+ ### 1.1 Data Query<a id="11-data-query"></a>
291
250
 
292
- ```
293
- photquery(survey,pos=None,source=None,radius=CONFIG)
294
- ```
251
+ Type argument: 'data'
295
252
 
296
- where:
253
+ Description: Returns all available raw data for a given survey
297
254
 
298
- ```
299
- survey = str, name of a supported survey
300
- ```
301
- ```
302
- pos = list, [ra,dec]
303
- ```
304
- ```
305
- source = int/str, Gaia source_id
306
- ```
307
- ```
308
- radius = int/float, radius of query
309
- ```
255
+ Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
256
+
257
+ Supported Surveys: gaia, galex, rosat, panstarrs, skymapper, sdss, twomass, wise, erosita
258
+
259
+ <br>
310
260
 
311
261
  **Returns:** dict
312
262
 
@@ -320,42 +270,43 @@ radius = int/float, radius of query
320
270
  }
321
271
  ```
322
272
 
323
- <br>
324
-
325
- **Example:**
273
+ <br><br>
326
274
 
327
- To retrieve the 2MASS photometry for an object:
328
- ```
329
- from AstroToolkit.Tools import photquery
275
+ ### 1.2 Photometry Query<a id="12-photometry-query"></a>
330
276
 
331
- data=photquery(survey='twomass',source=6050296829033196032)['data']
332
- ```
277
+ Type argument: 'phot'
333
278
 
334
- <br>
279
+ Description: Returns all photometry available from a given survey, as well as some basic parameters such as coordinates.
335
280
 
336
- ### 1.3. bulkphotquery<a id="13-bulkphotquery"></a>
281
+ Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
337
282
 
338
- Returns available photometry from all surveys supported by [photquery](#12-photquery).
283
+ Supported Surveys: gaia, panstarrs, skymapper, galex, rosat, sdss, wise, twomass
339
284
 
340
285
  <br>
341
286
 
342
- **Usage:**
287
+ **Returns:** dict
343
288
 
344
289
  ```
345
- bulkphotquery(pos=None,source=None,radius=CONFIG)
290
+ {
291
+ 'survey' : str, survey of data
292
+ 'type' : 'data'
293
+ 'source' : int/str, source used to get data (None if a pos was used)
294
+ 'pos' : [ra,dec], pos used to get data (None if a source was used)
295
+ 'data' : dict, the returned data
296
+ }
346
297
  ```
347
298
 
348
- where:
299
+ <br><br>
349
300
 
350
- ```
351
- pos = list, [ra,dec]
352
- ```
353
- ```
354
- source = int/str, Gaia source_id
355
- ```
356
- ```
357
- radius = int/float, radius of query
358
- ```
301
+ ### 1.3 Bulk Photometry Query<a id="13-bulk-photometry-query"></a>
302
+
303
+ Type argument: 'bulkphot'
304
+
305
+ Description: Returns all photometry available from all surveys supported by [photometry queries](#12-photometry-query)
306
+
307
+ Supported Arguments: pos, source, radius (all defined [above](#1-query))
308
+
309
+ <br>
359
310
 
360
311
  **Returns:** dict
361
312
 
@@ -375,42 +326,17 @@ radius = int/float, radius of query
375
326
 
376
327
  **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
328
 
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>
396
-
397
- Returns the reddening of a Gaia source.
329
+ <br><br>
398
330
 
399
- Currently supported reddening surveys:
400
- - STILISM (https://stilism.obspm.fr/)
331
+ ### 1.4. Reddening Query<a id="14-reddening-query"></a>
401
332
 
402
- <br>
333
+ Type argument: 'reddening'
403
334
 
404
- **Usage:**
335
+ Description: Returns the reddening for a given Gaia source from a given survey
405
336
 
406
- ```
407
- getreddening(source)
408
- ```
337
+ Supported Arguments: source (defined [above](#1-query))
409
338
 
410
- where:
411
- ```
412
- source = int/str, Gaia source_id
413
- ```
339
+ Supported Surveys: stilism (https://stilism.obspm.fr/)
414
340
 
415
341
  <br>
416
342
 
@@ -433,17 +359,11 @@ source = int/str, Gaia source_id
433
359
 
434
360
  <br><br>
435
361
 
436
- ### 2. Imaging Tools<a id="2-imaging-tools"></a>
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.
362
+ ### 1.5 Imaging Query<a id="15-imaging-query"></a>
441
363
 
442
- <br>
443
-
444
- ### 2.1. imagequery<a id="21-imagequery"></a>
364
+ Type argument: 'image'
445
365
 
446
- Retrieves 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.
366
+ 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
367
 
448
368
  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
369
 
@@ -455,40 +375,10 @@ Tracers (which are detections created from lightcurve surveys) can be used both
455
375
 
456
376
  ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/tracer_example.png?raw=true)
457
377
 
458
- <br>
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
- ```
378
+ Supported Arguments: survey, pos, source, size, band, overlays
480
379
 
481
380
  where:
482
381
  ```
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
382
  size = int/float, size of image in arcsec
493
383
  ```
494
384
  ```
@@ -498,6 +388,19 @@ band = str, string containing the required bands (e.g. for all panstarrs bands,
498
388
  overlays = str, required detection overlays (e.g. for gaia and wise detections, use overlays='gaia,wise')
499
389
  ```
500
390
 
391
+ and all other arguments have been defined [above](#1-query).
392
+
393
+ Supported overlays: gaia, galex_nuv, galex_fuv, rosat,sdss, twomass, wise, ztf, erosita ,atlas, gaia_lc, asassn, crts
394
+
395
+ **Note:** Can also use 'all', which will enable overlays for all supported surveys.
396
+
397
+ Supported Surveys:
398
+ - panstarrs, supported bands = g, r, i, z, y
399
+ - skymapper, supported bands = g, r, i, z, u, v
400
+ - dss, supported bands = g
401
+
402
+ <br>
403
+
501
404
  **Returns:** dict
502
405
 
503
406
  ```
@@ -531,114 +434,29 @@ overlays = str, required detection overlays (e.g. for gaia and wise detections,
531
434
  }
532
435
  ```
533
436
 
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
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/imaging_example.png?raw=true)
582
-
583
437
  <br><br>
584
438
 
585
- ### 3. HRD Tools<a id="3-hrd-tools"></a>
586
- ### 3.1. plothrd<a id="31-plothrd"></a>
439
+ ### 1.6 Lightcurve Query<a id="16-lightcurve-query"></a>
587
440
 
588
- Returns a HRD with a source or list of sources overlayed over a Gaia 100pc background sample.
441
+ Type argument: 'lightcurve'
589
442
 
590
- <br>
591
-
592
- **Usage:**
443
+ Description: Returns lightcurve data from a given survey.
593
444
 
594
- ```
595
- plothrd(source=None,sources=None)
596
- ```
445
+ Supported Arguments: survey, pos, source, radius, username, password, sigmaclip
597
446
 
598
447
  where:
599
-
600
448
  ```
601
- source = int/str, Gaia source_id
602
- ```
603
- ```
604
- sources = list of sources
449
+ username = str, ATLAS username, hence only used in ATLAS queries
605
450
  ```
606
-
607
- **Returns:** dict
608
-
609
451
  ```
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
- }
452
+ password = str, ATLAS password, hence only used in ATLAS queries
617
453
  ```
618
-
619
- <br>
620
-
621
- **Example:**
622
- To retrieve a HRD with a single source overlayed:
623
454
  ```
624
- from AstroToolkit.Tools import plothrd,showplot
625
-
626
- plot=plothrd(source=6050296829033196032)
627
- showplot(plot)
455
+ sigmaclip = int, performs sigma clipping on the data to this number of standard deviations
628
456
  ```
457
+ and all other arguments have been defined [above](#1-query).
629
458
 
630
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/hrd_example.png?raw=true)
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:
459
+ Supported Surveys (and filter bands):
642
460
  - ZTF (ztf) - g, r, i
643
461
  - ATLAS (atlas) - o, c, i
644
462
  - ASAS-SN (asassn) - g, v
@@ -649,33 +467,6 @@ Supported surveys:
649
467
 
650
468
  <br>
651
469
 
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
470
  **Returns:** list of dicts
680
471
 
681
472
  list of lightcurve data dictionaries with an entry for each band in that survey (see below). Each entry has the format:
@@ -700,212 +491,231 @@ list of lightcurve data dictionaries with an entry for each band in that survey
700
491
  }
701
492
  ```
702
493
 
703
- <br>
704
-
705
- ### 4.2. plotlightcurve<a id="42-plotlightcurve"></a>
494
+ <br><br>
706
495
 
707
- Plots lightcurves in the format returned by [lightcurvequery](#41-lightcurvequery).
496
+ ### 1.7 SED Query<a id="17-sed-query"></a>
708
497
 
709
- <br>
498
+ Type argument: 'sed'
710
499
 
711
- **Usage:**
500
+ Description: Queries all supported [photometry surveys](#12-photometry-query) and returns SED data.
712
501
 
713
- ```
714
- plotlightcurve(data,colour='black')
715
- ```
502
+ Supported Arguments: pos, source, radius (all defined [above](#1-query))
716
503
 
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
- ```
504
+ <br>
727
505
 
728
506
  **Returns:** dict
729
507
 
730
508
  ```
731
509
  {
732
- 'type' : 'lightcurve'
733
- 'survey' : str, survey of lightcurve
510
+ 'type' : 'sed'
734
511
  'source' : int/str, source used to get data (None if a pos was used)
735
512
  '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
513
+ 'data': list of entries with each entry taking the form of a dict:
514
+ {
515
+ 'survey' : str, survey of data point
516
+ 'wavelength' : filter wavelength of data point
517
+ 'flux' : flux through filter
518
+ 'rel_err' : relative error on flux
519
+ }
738
520
  }
739
521
  ```
740
522
 
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
- ```
523
+ <br><br>
751
524
 
752
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/lightcurve_example.png?raw=true)
525
+ ### 1.8 Spectrum Query<a id="18-spectrum-query"></a>
753
526
 
754
- **Note:** Each band will then be toggleable using the legend.
527
+ Type argument: 'spectra'
755
528
 
756
- <br><br>
529
+ Description: Returns spectrum data for a given survey.
757
530
 
758
- ### 5. SED Tools<a id="5-sed-tools"></a>
759
- ### 5.1. sedquery<a id="51-sedquery"></a>
531
+ Supported Arguments: survey, pos, source, radius (all defined [above](#1-query))
760
532
 
761
- Queries all supported photometry surveys and returns SED data.
533
+ Supported Surveys: sdss
762
534
 
763
535
  <br>
764
536
 
765
- **Usage:**
537
+ **Returns:**
766
538
 
767
539
  ```
768
- sedquery(pos=None,source=None,radius=CONFIG)
540
+ {
541
+ 'type' : 'spectra'
542
+ 'survey' : str, survey of detection
543
+ 'source' : int/str, source used to get data (None if a pos was used)
544
+ 'pos': [ra,dec], pos used to get data (None if a source was used)
545
+ 'data': {
546
+ 'wavelength' : list of wavelength values
547
+ 'flux' : list of flux values
548
+ }
549
+ }
769
550
  ```
770
551
 
552
+ <br><br>
553
+
554
+ ### 1.9 HRD Query<a id="19-hrd-query"></a>
555
+
556
+ Type argument: 'hrd'
557
+
558
+ Description: Returns data for Gaia HRD creation given a Gaia source/list of Gaia sources.
559
+
560
+ Supported Arguments: sources
561
+
771
562
  where:
772
563
  ```
773
- pos = list, [ra,dec]
774
- ```
775
- ```
776
- source = int/str, Gaia source_id
777
- ```
778
- ```
779
- radius = int/float, radius of data query
564
+ sources = single Gaia source or list of Gaia sources
780
565
  ```
781
566
 
567
+ <br>
568
+
782
569
  **Returns:** dict
783
570
 
784
571
  ```
785
- {
786
- 'type' : 'sed'
787
- 'source' : int/str, source used to get data (None if a pos was used)
788
- 'pos': [ra,dec], pos used to get data (None if a source was used)
789
- 'data': list of entries with each entry taking the form of a dict:
790
- {
791
- 'survey' : str, survey of data point
792
- 'wavelength' : filter wavelength of data point
793
- 'flux' : flux through filter
794
- 'rel_err' : relative error on flux
795
- }
796
- }
572
+ 'type' : 'hrd'
573
+ 'sources' : list, list of input Gaia sources
574
+ 'data': {
575
+ 'absg' : list, absolute g magnitudes of given sources
576
+ 'bp-rp' : list, bp-rp values of given sources
577
+ }
797
578
  ```
798
579
 
799
- <br>
800
-
801
- ### 5.2. plotsed<a id="52-plotsed"></a>
580
+ <br><br>
802
581
 
803
- Plots SEDs in the format returned by [sedquery](#51-sedquery).
582
+ ## 2. plot<a id="2-plot"></a>
804
583
 
805
- <br>
584
+ Interprets and plots data.
806
585
 
807
586
  **Usage:**
808
587
 
809
588
  ```
810
- plotsed(data)
589
+ plot(data,type=None)
811
590
  ```
812
591
 
813
592
  where:
814
-
815
593
  ```
816
- data = dict in format returned by sedquery
594
+ data = list/dict data in structure returned by the query tool
817
595
  ```
818
596
 
819
- **Returns:** dict
597
+ <br>
820
598
 
821
- ```
822
- {
823
- 'type' : 'sed'
824
- 'source' : int/str, source used to get data (None if a pos was used)
825
- 'pos': [ra,dec], pos used to get data (None if a source was used)
826
- 'plot' : bokeh figure object, the actual plot
827
- 'ATKfilename' : the default filename given by ATK
828
- }
829
- ```
599
+ **Note:** If no plot is returned, the 'plot' key of the returned dictionary will be set to None.
830
600
 
831
601
  <br>
832
602
 
833
- **Example:** To retrieve and plot an SED:
834
- ```
835
- from AstroToolkit.Tools import sedquery,plotsed,showplot
603
+ **Supported plot types:** image, lightcurve, sed, spectra, powspec, hrd
836
604
 
837
- data=sedquery(source=6050296829033196032)
838
- showplot(plotsed(data))
839
- ```
605
+ <br>
840
606
 
841
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/sed_example.png?raw=true)
607
+ 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.
842
608
 
843
- <br><br>
609
+ <br>
610
+
611
+ **Shortcuts**:
844
612
 
845
- ### 6. Spectrum Tools<a id="6-spectrum-tools"></a>
846
- ### 6.1. spectrumquery<a id="61-spectrumquery"></a>
613
+ [Image Plotting](#21-image-plotting)
847
614
 
848
- Returns spectrum data from a given survey.
615
+ [Lightcurve Plotting](#22-lightcurve-plotting)
616
+
617
+ [SED Plotting](#23-sed-plotting)
618
+
619
+ [Spectrum Plotting](#24-spectrum-plotting)
620
+
621
+ [HRD Plotting](#25-hrd-plotting)
622
+
623
+ [Power Spectra Plotting](#26-power-spectra-plotting)
849
624
 
850
625
  <br>
851
626
 
852
- **Usage:**
627
+ ### 2.1 Image Plotting<a id="21-image-plotting"></a>
628
+
629
+ Type argument: 'image'
630
+
631
+ Description: Plots images in format returned by [image queries](#15-imaging-query).
632
+
633
+ <br>
634
+
635
+ **Returns:** dict
853
636
 
854
637
  ```
855
- spectrumquery(survey=None,pos=None,source=None,radius=CONFIG)
638
+ {
639
+ 'type' : 'image'
640
+ 'survey' : str, survey of image
641
+ 'source' : int/str, source used to get image (None if a pos was used)
642
+ 'pos' : [ra,dec], pos used to get image (None if a source was used)
643
+ 'plot' : bokeh figure object, the actual plot
644
+ 'ATKfilename' : the default filename given by ATK
645
+ }
856
646
  ```
857
647
 
648
+ <br><br>
649
+
650
+ ### 2.2 Lightcurve Plotting<a id="22-lightcurve-plotting"></a>
651
+
652
+ Type argument: 'lightcurve'
653
+
654
+ 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)).
655
+
656
+ Additional Supported Arguments: colour, colours
657
+
858
658
  where:
859
659
  ```
860
- survey = str, name of a supported survey
861
- ```
862
- ```
863
- pos = list, [ra,dec]
864
- ```
865
- ```
866
- source = int/str, Gaia source_id
660
+ colour = str, name of a supported colour. Only used when passing a single lightcurve
867
661
  ```
868
662
  ```
869
- radius = int/float, radius of data query
663
+ colours = list of strings denoting supported colours, e.g. ['green','red','blue']. Only used when passing multiple lightcurves
870
664
  ```
871
665
 
872
- **Returns:** dict
666
+ **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.
667
+
668
+ <br>
873
669
 
670
+ **Returns:** dict
874
671
  ```
875
672
  {
876
- 'type' : 'spectra'
877
- 'survey' : str, survey of detection
673
+ 'type' : 'lightcurve'
674
+ 'survey' : str, survey of lightcurve
878
675
  'source' : int/str, source used to get data (None if a pos was used)
879
676
  '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
- }
677
+ 'plot' : bokeh figure object, the actual plot
678
+ 'ATKfilename' : the default filename given by ATK
884
679
  }
885
680
  ```
886
681
 
887
- <br>
682
+ <br><br>
888
683
 
889
- ### 6.2. plotspectrum<a id="62-plotspectrum"></a>
684
+ ### 2.3 SED Plotting<a id="23-sed-plotting"></a>
890
685
 
891
- Plots spectra in the format returned by [spectrumquery](#61-spectrumquery).
686
+ Type argument: 'sed'
892
687
 
893
- <br>
688
+ Description: Plots SED data in the format returned by [SED queries](#17-sed-query).
894
689
 
895
- **Usage:**
690
+ <br>
896
691
 
692
+ **Returns:** dict
897
693
  ```
898
- plotspectrum(data)
694
+ {
695
+ 'type' : 'sed'
696
+ 'source' : int/str, source used to get data (None if a pos was used)
697
+ 'pos': [ra,dec], pos used to get data (None if a source was used)
698
+ 'data': list of entries with each entry taking the form of a dict:
699
+ {
700
+ 'survey' : str, survey of data point
701
+ 'wavelength' : filter wavelength of data point
702
+ 'flux' : flux through filter
703
+ 'rel_err' : relative error on flux
704
+ }
705
+ }
899
706
  ```
900
707
 
901
- where:
708
+ <br><br>
902
709
 
903
- ```
904
- data = dict in format returned by spectrumquery
905
- ```
710
+ ### 2.4 Spectrum Plotting<a id="24-spectrum-plotting"></a>
906
711
 
907
- **Returns:** dict
712
+ Type argument: 'spectra'
908
713
 
714
+ Description: Plots spectrum data in the format returned by [spectrum queries](#18-spectrum-query).
715
+
716
+ <br>
717
+
718
+ **Returns:** dict
909
719
  ```
910
720
  {
911
721
  'type' : 'spectrum'
@@ -917,39 +727,36 @@ data = dict in format returned by spectrumquery
917
727
  }
918
728
  ```
919
729
 
920
- <br>
730
+ <br><br>
921
731
 
922
- **Example:**
923
- To retrieve and plot an SDSS spectrum:
924
- ```
925
- from AstroToolkit.Tools import spectrumquery,plotspectrum,showplot
732
+ ### 2.5 HRD Plotting<a id="25-hrd-plotting"></a>
926
733
 
927
- data=spectrumquery(survey='sdss',source=587316166180416640)
928
- plot=plotspectrum(data)
929
- showplot(plot)
930
- ```
734
+ Type argument: 'hrd'
931
735
 
932
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/spectrum_example.png?raw=true)
736
+ Description: Plots Gaia HRD data in the format returned by [hrd queries](#19-hrd-query).
933
737
 
934
- <br><br>
738
+ <br>
935
739
 
936
- ### 7. Timeseries Tools<a id="7-timeseries-tools"></a>
937
- ### 7.1 plotpowspec<a id="71-plotpowspec"></a>
740
+ **Returns:** dict
741
+ ```
742
+ {
743
+ 'type' : 'hrd'
744
+ 'source' : int/str, source overlayed in HRD
745
+ 'sources' : list, sources overlayed in HRD if multiple were given
746
+ 'plot' : bokeh figure object, the actual plot
747
+ 'ATKfilename' : the default filename given by ATK
748
+ }
749
+ ```
938
750
 
939
- Plots a power spectrum from lightcurve data in the format returned by [lightcurvequery](#41-lightcurvequery)
751
+ <br><br>
940
752
 
941
- <br>
753
+ ### 2.6 Power Spectra Plotting<a id="26-power-spectra-plotting"></a>
942
754
 
943
- **Usage:**
755
+ Type argument: 'powspec'
944
756
 
945
- ```
946
- plotpowspec(data)
947
- ```
757
+ Description: Plots power spectra from lightcurve data in the format returned by [lightcurve queries](#16-lightcurve-query).
948
758
 
949
- where:
950
- ```
951
- data = dict or list in format returned by lightcurvequery
952
- ```
759
+ <br>
953
760
 
954
761
  **Returns:** dict
955
762
 
@@ -964,25 +771,11 @@ data = dict or list in format returned by lightcurvequery
964
771
  }
965
772
  ```
966
773
 
967
- <br>
968
-
969
- **Example:**
970
- To retrieve lightcurve data from ZTF and plot a power spectrum:
971
- ```
972
- from AstroToolkit.Tools import lightcurvequery,plotpowspec,showplot
973
-
974
- data=lightcurvequery(survey='ztf',source=6050296829033196032)
975
- plot=plotpowspec(data)
976
- showplot(plot)
977
- ```
978
-
979
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/powspec_example.png?raw=true)
980
-
981
774
  <br><br>
982
775
 
983
- ### 7.2 tsanalysis<a id="72-tsanalysis"></a>
776
+ ### 2.7 Timeseries Analysis<a id="27-timeseries-analysis"></a>
984
777
 
985
- Runs period analysis on lightcurve data in format returned by [lightcurvequery](#lightcurvequery)
778
+ Description: Not explicitly a plotting function, but included here for completeness. Runs period analysis on lightcurve data in format returned by [lightcurve queries](#16-lightcurve-query).
986
779
 
987
780
  <br>
988
781
 
@@ -995,25 +788,12 @@ tsanalysis(data)
995
788
  where:
996
789
 
997
790
  ```
998
- data = dict or list in format returned by lightcurvequery
999
- ```
1000
-
1001
- <br>
1002
-
1003
- **Example:**
1004
- To retrieve lightcurve data from ZTF and perform timeseries analysis:
1005
- ```
1006
- from AstroToolkit.Tools import lightcurvequery,tsanalysis
1007
-
1008
- data=lightcurvequery(survey='ztf',source=6050296829033196032)
1009
- plot=tsanalysis(data)
791
+ data = dict or list in format returned by lightcurve queries
1010
792
  ```
1011
793
 
1012
- ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/tsanalysis_example.png?raw=true)
1013
-
1014
794
  <br><br>
1015
795
 
1016
- ## 8. Datapage Tools<a id="8-datapage-tools"></a>
796
+ ## 3. Datapage Tools<a id="3-datapage-tools"></a>
1017
797
 
1018
798
  These functions are used to create custom datapages from any plots/data supported by AstroToolkit.
1019
799
 
@@ -1025,7 +805,17 @@ Below is the datapage produced by this example. Once the script to create these
1025
805
 
1026
806
  <br>
1027
807
 
1028
- ### 8.1. gridsetup<a id="81-gridsetup"></a>
808
+ Shortcuts:
809
+
810
+ [Grid Creation](#31-gridsetup)
811
+
812
+ [SIMBAD/Vizier Buttons](#32-getbuttons)
813
+
814
+ [Metadata Table Creation](#33-getmdtable)
815
+
816
+ <br><br>
817
+
818
+ ### 3.1 gridsetup<a id="31-gridsetup"></a>
1029
819
 
1030
820
  Formats plots for datapage creation by sizing them to a grid of given dimensions.
1031
821
 
@@ -1071,7 +861,7 @@ where the keys "name ..." are the names given to the plots above, and the values
1071
861
 
1072
862
  <br>
1073
863
 
1074
- ### 8.2. getbuttons<a id="82-getbuttons"></a>
864
+ ### 3.2 getbuttons<a id="32-getbuttons"></a>
1075
865
 
1076
866
  Returns a Bokeh figure containing SIMBAD and Vizier buttons for use in datapages.
1077
867
 
@@ -1115,7 +905,7 @@ vizier_radius = int, radius to use in Vizier queries
1115
905
 
1116
906
  <br>
1117
907
 
1118
- ### 8.3. getmdtable<a id="83-getmdtable"></a>
908
+ ### 3.3 getmdtable<a id="33-getmdtable"></a>
1119
909
 
1120
910
  Creates a table of metadata table using data from supported surveys and/or custom data.
1121
911
 
@@ -1189,12 +979,23 @@ In this case, an additional 'values' key must be included, and the values/errors
1189
979
 
1190
980
  <br><br>
1191
981
 
1192
- ## 9. File Handling Tools<a id="9-file-handling-tools"></a>
982
+ ## 4. File Handling Tools<a id="4-file-handling-tools"></a>
983
+
1193
984
  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
985
 
1195
986
  <br>
1196
987
 
1197
- ### 9.1. savedata<a id="91-savedata"></a>
988
+ Shortcuts:
989
+
990
+ [Data Saving](#41-savedata)
991
+
992
+ [Data Reading](#42-readdata)
993
+
994
+ [Export Plots to PNG](#43-export)
995
+
996
+ <br><br>
997
+
998
+ ### 4.1 savedata<a id="41-savedata"></a>
1198
999
 
1199
1000
  This tool allows for the saving of many ATK data structures into local files.
1200
1001
 
@@ -1224,7 +1025,7 @@ Name of file that the data was saved to
1224
1025
 
1225
1026
  <br>
1226
1027
 
1227
- ### 9.2. readdata<a id="92-readdata"></a>
1028
+ ### 4.2 readdata<a id="42-readdata"></a>
1228
1029
 
1229
1030
  This tool allows for the lossless recreation of ATK data stuctures from files created using [savedata](#91-savedata).
1230
1031
 
@@ -1267,7 +1068,7 @@ showplot(plotlightcurve(recreated_lightcurve_data,colours=['red','orange','yello
1267
1068
 
1268
1069
  <br>
1269
1070
 
1270
- ### 9.3. export<a id="93-export"></a>
1071
+ ### 4.3 export<a id="43-export"></a>
1271
1072
 
1272
1073
  This allows for ATK figures to be saved as a .png file.
1273
1074
 
@@ -1289,15 +1090,35 @@ keephtml = bool. To get the filename for the png, the plot must first be saved a
1289
1090
 
1290
1091
  <br><br>
1291
1092
 
1292
- ### 10. Miscellaneous Tools<a id="10-miscellaneous-tools"></a>
1093
+ ## 5. Other Tools<a id="5-other-tools"></a>
1293
1094
 
1294
- These are tools that do not fit into the above categories, but can still be useful for quickly performing some basic functions.
1095
+ Below is a list of the other tools available in ATK.
1295
1096
 
1296
- <br>
1097
+ Shortcuts:
1098
+
1099
+ [Show Plots](531-showplot)
1100
+
1101
+ [Save Plots](532-saveplot)
1102
+
1103
+ [Proper Motion Correction](533-correctpm)
1104
+
1105
+ [Parallax to Distance](534-getdistance)
1106
+
1107
+ [Convert Degrees to HMS/DMS](535-convfromdeg)
1108
+
1109
+ [Convert from HMS/DMS to Degrees](536-convtodeg)
1297
1110
 
1298
- ### 10.1. showplot<a id="101-showplot"></a>
1111
+ [Read fits file columns](#57-getcolumn)
1299
1112
 
1300
- 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.
1113
+ [Read Sources from a fits file](#58-getsources)
1114
+
1115
+ [Read Positions from a fits file](#59-getpositions)
1116
+
1117
+ [Open object in SIMBAD/Vizier](#510-webquery)
1118
+
1119
+ ### 5.1 showplot<a id="51-showplot"></a>
1120
+
1121
+ 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
1122
 
1302
1123
  <br>
1303
1124
 
@@ -1308,14 +1129,14 @@ showplot(plot)
1308
1129
 
1309
1130
  where:
1310
1131
  ```
1311
- plot = ATK plot dictionary
1132
+ plot = ATK plot dictionary or bokeh figure
1312
1133
  ```
1313
1134
 
1314
- <br>
1135
+ <br><br>
1315
1136
 
1316
- ### 10.2. saveplot<a id="102-saveplot"></a>
1137
+ ### 5.2 saveplot<a id="52-saveplot"></a>
1317
1138
 
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.
1139
+ 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
1140
 
1320
1141
  <br>
1321
1142
 
@@ -1326,14 +1147,14 @@ saveplot(plot)
1326
1147
 
1327
1148
  where:
1328
1149
  ```
1329
- plot = ATK plot dictionary
1150
+ plot = ATK plot dictionary or bokeh figure
1330
1151
  ```
1331
1152
 
1332
- <br>
1153
+ <br><br>
1333
1154
 
1334
- ### 10.3. correctpm<a id="103-correctpm"></a>
1155
+ ### 5.3 correctpm<a id="53-correctpm"></a>
1335
1156
 
1336
- Corrects for proper motion of an object between an input time and a target time.
1157
+ Description: Corrects for proper motion of an object between an input time and a target time.
1337
1158
 
1338
1159
  <br>
1339
1160
 
@@ -1370,22 +1191,9 @@ pmdec = float, proper motion in dec direction of object in mas/yr
1370
1191
 
1371
1192
  [ra,dec] of object in degrees, corrected for proper motion.
1372
1193
 
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>
1194
+ <br><br>
1387
1195
 
1388
- ### 10.4. getdistance<a id="104-getdistance"></a>
1196
+ ### 5.4 getdistance<a id="54-getdistance"></a>
1389
1197
 
1390
1198
  Simply calculates the distance (1/parallax) of an object given its parallax in mas (the unit of parallax in Gaia).
1391
1199
 
@@ -1410,7 +1218,7 @@ distance of object in pc
1410
1218
 
1411
1219
  <br>
1412
1220
 
1413
- ### 10.5. convfromdeg<a id="105-convfromdeg"></a>
1221
+ ### 5.5 convfromdeg<a id="55-convfromdeg"></a>
1414
1222
 
1415
1223
  Converts deg coordinates to HMS/DMS format
1416
1224
 
@@ -1435,7 +1243,7 @@ pos = list, [ra,dec] of object in degrees
1435
1243
 
1436
1244
  <br>
1437
1245
 
1438
- ### 10.6. convtodeg<a id="106-convtodeg"></a>
1246
+ ### 5.6 convtodeg<a id="56-convtodeg"></a>
1439
1247
 
1440
1248
  Converts HMS/DMS coordinates to deg.
1441
1249
 
@@ -1460,7 +1268,7 @@ pos = list, [ra,dec] of object in [HMS/DMS] format, i.e. [[H,M,S],[D,M,S]]
1460
1268
 
1461
1269
  <br>
1462
1270
 
1463
- ### 10.7. getcolumn<a id="107-getcolumn"></a>
1271
+ ### 5.7 getcolumn<a id="57-getcolumn"></a>
1464
1272
 
1465
1273
  Returns a list of values from a .fits file given a column name.
1466
1274
 
@@ -1484,7 +1292,7 @@ list of values for that column
1484
1292
 
1485
1293
  <br>
1486
1294
 
1487
- ### 10.8. getsources<a id="108-getsources"></a>
1295
+ ### 5.8 getsources<a id="58-getsources"></a>
1488
1296
 
1489
1297
  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
1298
 
@@ -1508,7 +1316,7 @@ list of Gaia sources
1508
1316
 
1509
1317
  <br>
1510
1318
 
1511
- ### 10.9. getpositions<a id="109-getpositions"></a>
1319
+ ### 5.9 getpositions<a id="59-getpositions"></a>
1512
1320
 
1513
1321
  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
1322
 
@@ -1529,3 +1337,173 @@ col_name = str, comma separated string containing names of ra and dec columns. e
1529
1337
  **Returns:** list
1530
1338
 
1531
1339
  list of positions [[ra1,dec1],[ra2,dec2]], etc.
1340
+
1341
+ ### 5.10 webquery<a id="510-webquery"></a>
1342
+
1343
+ Performs SIMBAD/Vizier queries given a source/pos in the web browser.
1344
+
1345
+ **Usage:**
1346
+
1347
+ ```
1348
+ webquery(type,source=None,pos=None,radius=CONFIG)
1349
+ ```
1350
+
1351
+ where:
1352
+ ```
1353
+ type = str, type of query from 'simbad' or 'vizier'
1354
+ ```
1355
+ ```
1356
+ pos = list, [ra,dec]
1357
+ ```
1358
+ ```
1359
+ source = int/str, Gaia source_id
1360
+ ```
1361
+ ```
1362
+ 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
1363
+ ```
1364
+
1365
+ **Returns:** None
1366
+
1367
+ <br><br>
1368
+
1369
+ ## Examples<a id="examples"></a>
1370
+
1371
+ ### Example 1: Fetching and plotting an image
1372
+
1373
+ ```
1374
+ from AstroToolkit.Tools import query,plot,showplot
1375
+
1376
+ image=query(type='image',survey='any',source=6050296829033196032,overlays='gaia')
1377
+ figure=plot(image)
1378
+ showplot(figure)
1379
+ ```
1380
+
1381
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/imaging_example.png?raw=true)
1382
+
1383
+ <br><br>
1384
+
1385
+ ### Example 2: Fetching and plotting a Gaia HRD
1386
+
1387
+ ```
1388
+ from AstroToolkit.Tools import query,plot,showplot
1389
+
1390
+ data=query(type='hrd',sources=[6050296829033196032])
1391
+ figure=plot(data)
1392
+ showplot(figure)
1393
+ ```
1394
+
1395
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/hrd_example.png?raw=true)
1396
+
1397
+ <br><br>
1398
+
1399
+ ### Example 3: Fetching and plotting a ZTF lightcurve
1400
+
1401
+ ```
1402
+ from AstroToolkit.Tools import query,plot,showplot
1403
+
1404
+ data=lightcurvequery(type='lightcurve',survey='ztf',source=6050296829033196032)
1405
+ showplot(plot(data,colours=['green','red','blue']))
1406
+ ```
1407
+
1408
+ **Note:** Each band will then be toggleable using the legend.
1409
+
1410
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/lightcurve_example.png?raw=true)
1411
+
1412
+ <br><br>
1413
+
1414
+ ### Example 4: Fetching and plotting an SED
1415
+
1416
+ ```
1417
+ from AstroToolkit.Tools import query,plot,showplot
1418
+
1419
+ data=query(type='sed',source=6050296829033196032)
1420
+ showplot(plot(data))
1421
+ ```
1422
+
1423
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/sed_example.png?raw=true)
1424
+
1425
+ <br><br>
1426
+
1427
+ ### Example 5: Fetching and plotting an SDSS spectrum
1428
+
1429
+ ```
1430
+ from AstroToolkit.Tools import query,plot,showplot
1431
+
1432
+ data=query(type='spectra',survey='sdss',source=587316166180416640)
1433
+ plot=plot(data)
1434
+ showplot(plot)
1435
+ ```
1436
+
1437
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/spectrum_example.png?raw=true)
1438
+
1439
+ <br><br>
1440
+
1441
+ ### Example 6: Fetching ZTF ligthcurve data, and then plotting it as a power spectrum
1442
+
1443
+ ```
1444
+ from AstroToolkit.Tools import lightcurvequery,plotpowspec,showplot
1445
+
1446
+ data=lightcurvequery(survey='ztf',source=6050296829033196032)
1447
+ plot=plotpowspec(data)
1448
+ showplot(plot)
1449
+ ```
1450
+
1451
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/powspec_example.png?raw=true)
1452
+
1453
+ <br><br>
1454
+
1455
+ ### Example 7: Fetching Gaia parallax and WISE data
1456
+
1457
+ ```
1458
+ from AstroToolkit.Tools import query
1459
+
1460
+ source = 6050296829033196032
1461
+
1462
+ parallax = query(type='data',survey='gaia',source=source)['data']['parallax']
1463
+ wise_data = query(type='data',survey='wise',source=source)['data']
1464
+ ```
1465
+
1466
+ ### Example 8: Fetching 2MASS photometry for an object
1467
+
1468
+ ```
1469
+ from AstroToolkit.Tools import query
1470
+
1471
+ data=query(type='phot',survey='twomass',source=6050296829033196032)['data']
1472
+ ```
1473
+
1474
+ ### Example 9: Fetching photometry from all available surveys using a bulk photometry query
1475
+
1476
+ ```
1477
+ from AstroToolkit.Tools import query
1478
+
1479
+ bulk_phot=query(type='bulkphot',source=6050296829033196032)['data']
1480
+
1481
+ gaia_data=bulk_phot['gaia']
1482
+ galex_data=bulk_phot['galex']
1483
+ ```
1484
+
1485
+ <br><br>
1486
+
1487
+ ### Example 10: Fetching ZTF lightcurve data, and performing timeseries analysis
1488
+
1489
+ ```
1490
+ from AstroToolkit.Tools import query,tsanalysis
1491
+
1492
+ data=query(type='lightcurve',survey='ztf',source=6050296829033196032)
1493
+ plot=tsanalysis(data)
1494
+ ```
1495
+
1496
+ ![](https://github.com/WD-planets/AstroToolkit/raw/latest/README_Images/tsanalysis_example.png?raw=true)
1497
+
1498
+ <br><br>
1499
+
1500
+ ### Example 11: Proper motion correction
1501
+
1502
+ ```
1503
+ from AstroToolkit.Tools import query,correctpm
1504
+
1505
+ gaia_data=query(type='data',survey='gaia',source=6050296829033196032)['data']
1506
+ ra,dec,pmra,pmdec=gaia_data['ra'][0],gaia_data['dec'][0],gaia_data['pmra'][0],gaia_data['pmdec'][0]
1507
+
1508
+ ra_corrected,dec_corrected=correctpm([2016,0],[2000,0],ra,dec,pmra,pmdec)
1509
+ ```