AstroToolkit 1.4.0__tar.gz → 1.4.2__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.4.0/README.md → astrotoolkit-1.4.2/PKG-INFO +31 -91
- AstroToolkit-1.4.0/PKG-INFO → astrotoolkit-1.4.2/README.md +6 -120
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/pyproject.toml +11 -15
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/data.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/imaging.py +7 -6
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/overlays.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/sed.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Datapages/grid.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Datapages/metadata.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Examples/datapage_creation.py +6 -9
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/ProperMotionCorrection.py +0 -1
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/HRD.py +0 -2
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/imaging.py +1 -2
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/lightcurves.py +2 -2
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/sed.py +3 -3
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/spectra.py +1 -3
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Tools.py +40 -84
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit.egg-info/PKG-INFO +15 -104
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit.egg-info/SOURCES.txt +1 -13
- astrotoolkit-1.4.2/src/AstroToolkit.egg-info/requires.txt +12 -0
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/README - Windows.txt +0 -67
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/README.txt +0 -61
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/__init__.py +0 -0
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/aov.cp38-win_amd64.pyd +0 -0
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/aov.f90 +0 -885
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/aovconst.f90 +0 -14
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/aovsub.f90 +0 -940
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/build.sh +0 -28
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/buildwin.bat +0 -25
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/pyaov.pdf +0 -0
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/pyaov.py +0 -781
- AstroToolkit-1.4.0/src/AstroToolkit/Timeseries/ztfanalysis.py +0 -816
- AstroToolkit-1.4.0/src/AstroToolkit.egg-info/requires.txt +0 -16
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/LICENSE +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/MANIFEST.in +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/setup.cfg +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/lightcurve_sigma_clip.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/lightcurves.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/photometry.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/reddening.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Data/spectra.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Datapages/buttons.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/coord_conversion.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/database_queries.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/file_handling.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/file_naming.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/input_validation.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Misc/read_fits.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/backdrop_hrd_allmags.fits +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Plotting/powspec.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit/Settings/__init__.py +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit.egg-info/dependency_links.txt +0 -0
- {AstroToolkit-1.4.0 → astrotoolkit-1.4.2}/src/AstroToolkit.egg-info/top_level.txt +0 -0
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: AstroToolkit
|
|
3
|
+
Version: 1.4.2
|
|
4
|
+
Summary: A package for the gathering and plotting of astronomical data.
|
|
5
|
+
Author-email: Ethan Moorfield <ethan.moorfield@hotmail.co.uk>
|
|
6
|
+
Project-URL: Homepage, https://github.com/WD-planets/AstroToolkit
|
|
7
|
+
Project-URL: Issues, https://github.com/WD-planets/AstroToolkit/issues
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: astropy==6.0.1
|
|
14
|
+
Requires-Dist: astroquery==0.4.7
|
|
15
|
+
Requires-Dist: bokeh==3.4.1
|
|
16
|
+
Requires-Dist: cmasher==1.8.0
|
|
17
|
+
Requires-Dist: matplotlib==3.8.4
|
|
18
|
+
Requires-Dist: importlib_resources==6.4.0
|
|
19
|
+
Requires-Dist: numpy==1.26.4
|
|
20
|
+
Requires-Dist: pandas==2.2.2
|
|
21
|
+
Requires-Dist: Requests==2.31.0
|
|
22
|
+
Requires-Dist: selenium==4.17.2
|
|
23
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
24
|
+
Requires-Dist: scipy==1.13.0
|
|
25
|
+
|
|
1
26
|
# AstroToolkit
|
|
2
27
|
|
|
3
28
|
AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
|
|
@@ -27,18 +52,6 @@ The package can be installed as with any other package, e.g. using pip:
|
|
|
27
52
|
pip install AstroToolkit
|
|
28
53
|
```
|
|
29
54
|
|
|
30
|
-
Once the package has been installed, you should navigate to the package install location. This should be located in: **.../Lib/site-packages/AstroToolkit**, where **...** is your python install location. If you wish to find this, you can use the following command from the terminal:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
python -c "from AstroToolkit.Tools import getpath; getpath()"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
In this directory, run either buildwin.bat (Windows) or build.sh (Linux) depending on your operating system.
|
|
37
|
-
|
|
38
|
-
**NOTE:** See _README.txt_ (Linux) or _README - Windows.txt_ (Windows) in the above directory for any additional dependencies.
|
|
39
|
-
|
|
40
|
-
<br>
|
|
41
|
-
|
|
42
55
|
## Introduction<a id="introduction"></a>
|
|
43
56
|
|
|
44
57
|
ATK uses Bokeh as its primary plotting library. The official documentation can be found at [https://bokeh.org/](https://bokeh.org/). A key property of Bokeh plots is that they can be saved as static .html files, which can then be shared/accessed while retaining all interactivity.
|
|
@@ -571,7 +584,7 @@ data = list/dict data in structure returned by the query tool
|
|
|
571
584
|
|
|
572
585
|
<br>
|
|
573
586
|
|
|
574
|
-
**Supported plot types:** image, lightcurve, sed, spectra,
|
|
587
|
+
**Supported plot types:** image, lightcurve, sed, spectra, hrd
|
|
575
588
|
|
|
576
589
|
<br>
|
|
577
590
|
|
|
@@ -591,10 +604,6 @@ Below is an outline of the usage and output of each plot type. Note that additon
|
|
|
591
604
|
|
|
592
605
|
[HRD Plotting](#25-hrd-plotting)
|
|
593
606
|
|
|
594
|
-
[Power Spectra Plotting](#26-power-spectra-plotting)
|
|
595
|
-
|
|
596
|
-
<br>
|
|
597
|
-
|
|
598
607
|
### 2.1 Image Plotting<a id="21-image-plotting"></a>
|
|
599
608
|
|
|
600
609
|
Type argument: 'image'
|
|
@@ -721,49 +730,6 @@ Description: Plots Gaia HRD data in the format returned by [hrd queries](#19-hrd
|
|
|
721
730
|
|
|
722
731
|
<br><br>
|
|
723
732
|
|
|
724
|
-
### 2.6 Power Spectra Plotting<a id="26-power-spectra-plotting"></a>
|
|
725
|
-
|
|
726
|
-
Type argument: 'powspec'
|
|
727
|
-
|
|
728
|
-
Description: Plots power spectra from lightcurve data in the format returned by [lightcurve queries](#16-lightcurve-query).
|
|
729
|
-
|
|
730
|
-
<br>
|
|
731
|
-
|
|
732
|
-
**Returns:** dict
|
|
733
|
-
|
|
734
|
-
```
|
|
735
|
-
{
|
|
736
|
-
'type' : 'powspec'
|
|
737
|
-
'survey' : str, survey of lightcurve data given to the powspec tool
|
|
738
|
-
'source' : int/str, source used to get data (None if a pos was used)
|
|
739
|
-
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
740
|
-
'plot' : bokeh figure object, the actual plot
|
|
741
|
-
'ATKfilename' : the default filename given by ATK
|
|
742
|
-
}
|
|
743
|
-
```
|
|
744
|
-
|
|
745
|
-
<br><br>
|
|
746
|
-
|
|
747
|
-
### 2.7 Timeseries Analysis<a id="27-timeseries-analysis"></a>
|
|
748
|
-
|
|
749
|
-
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).
|
|
750
|
-
|
|
751
|
-
<br>
|
|
752
|
-
|
|
753
|
-
**Usage:**
|
|
754
|
-
|
|
755
|
-
```
|
|
756
|
-
tsanalysis(data)
|
|
757
|
-
```
|
|
758
|
-
|
|
759
|
-
where:
|
|
760
|
-
|
|
761
|
-
```
|
|
762
|
-
data = dict or list in format returned by lightcurve queries
|
|
763
|
-
```
|
|
764
|
-
|
|
765
|
-
<br><br>
|
|
766
|
-
|
|
767
733
|
## 3. Datapage Tools<a id="3-datapage-tools"></a>
|
|
768
734
|
|
|
769
735
|
These functions are used to create custom datapages from any plots/data supported by AstroToolkit.
|
|
@@ -1409,21 +1375,7 @@ showplot(plot)
|
|
|
1409
1375
|
|
|
1410
1376
|
<br><br>
|
|
1411
1377
|
|
|
1412
|
-
### Example 6: Fetching
|
|
1413
|
-
|
|
1414
|
-
```
|
|
1415
|
-
from AstroToolkit.Tools import lightcurvequery,plotpowspec,showplot
|
|
1416
|
-
|
|
1417
|
-
data=lightcurvequery(survey='ztf',source=6050296829033196032)
|
|
1418
|
-
plot=plotpowspec(data)
|
|
1419
|
-
showplot(plot)
|
|
1420
|
-
```
|
|
1421
|
-
|
|
1422
|
-

|
|
1423
|
-
|
|
1424
|
-
<br><br>
|
|
1425
|
-
|
|
1426
|
-
### Example 7: Fetching Gaia parallax and WISE data
|
|
1378
|
+
### Example 6: Fetching Gaia parallax and WISE data
|
|
1427
1379
|
|
|
1428
1380
|
```
|
|
1429
1381
|
from AstroToolkit.Tools import query
|
|
@@ -1434,7 +1386,7 @@ parallax = query(type='data',survey='gaia',source=source)['data']['parallax']
|
|
|
1434
1386
|
wise_data = query(type='data',survey='wise',source=source)['data']
|
|
1435
1387
|
```
|
|
1436
1388
|
|
|
1437
|
-
### Example
|
|
1389
|
+
### Example 7: Fetching 2MASS photometry for an object
|
|
1438
1390
|
|
|
1439
1391
|
```
|
|
1440
1392
|
from AstroToolkit.Tools import query
|
|
@@ -1442,7 +1394,7 @@ from AstroToolkit.Tools import query
|
|
|
1442
1394
|
data=query(type='phot',survey='twomass',source=6050296829033196032)['data']
|
|
1443
1395
|
```
|
|
1444
1396
|
|
|
1445
|
-
### Example
|
|
1397
|
+
### Example 8: Fetching photometry from all available surveys using a bulk photometry query
|
|
1446
1398
|
|
|
1447
1399
|
```
|
|
1448
1400
|
from AstroToolkit.Tools import query
|
|
@@ -1455,20 +1407,8 @@ galex_data=bulk_phot['galex']
|
|
|
1455
1407
|
|
|
1456
1408
|
<br><br>
|
|
1457
1409
|
|
|
1458
|
-
### Example 10: Fetching ZTF lightcurve data, and performing timeseries analysis
|
|
1459
1410
|
|
|
1460
|
-
|
|
1461
|
-
from AstroToolkit.Tools import query,tsanalysis
|
|
1462
|
-
|
|
1463
|
-
data=query(type='lightcurve',survey='ztf',source=6050296829033196032)
|
|
1464
|
-
plot=tsanalysis(data)
|
|
1465
|
-
```
|
|
1466
|
-
|
|
1467
|
-

|
|
1468
|
-
|
|
1469
|
-
<br><br>
|
|
1470
|
-
|
|
1471
|
-
### Example 11: Proper motion correction
|
|
1411
|
+
### Example 9: Proper motion correction
|
|
1472
1412
|
|
|
1473
1413
|
```
|
|
1474
1414
|
from AstroToolkit.Tools import query,correctpm
|
|
@@ -1477,4 +1417,4 @@ gaia_data=query(type='data',survey='gaia',source=6050296829033196032)['data']
|
|
|
1477
1417
|
ra,dec,pmra,pmdec=gaia_data['ra'][0],gaia_data['dec'][0],gaia_data['pmra'][0],gaia_data['pmdec'][0]
|
|
1478
1418
|
|
|
1479
1419
|
ra_corrected,dec_corrected=correctpm([2016,0],[2000,0],ra,dec,pmra,pmdec)
|
|
1480
|
-
```
|
|
1420
|
+
```
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: AstroToolkit
|
|
3
|
-
Version: 1.4.0
|
|
4
|
-
Summary: A package for the gathering and plotting of astronomical data.
|
|
5
|
-
Author-email: Ethan Moorfield <ethan.moorfield@hotmail.co.uk>
|
|
6
|
-
Project-URL: Homepage, https://github.com/WD-planets/AstroToolkit
|
|
7
|
-
Project-URL: Issues, https://github.com/WD-planets/AstroToolkit/issues
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Operating System :: OS Independent
|
|
10
|
-
Requires-Python: >=3.7
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: astropy==5.2.2
|
|
14
|
-
Requires-Dist: astroquery==0.4.7
|
|
15
|
-
Requires-Dist: bokeh==3.1.1
|
|
16
|
-
Requires-Dist: cmasher==1.6.3
|
|
17
|
-
Requires-Dist: importlib_resources==6.4.0
|
|
18
|
-
Requires-Dist: matplotlib==3.7.5
|
|
19
|
-
Requires-Dist: numba==0.58.1
|
|
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
|
|
25
|
-
Requires-Dist: Requests==2.31.0
|
|
26
|
-
Requires-Dist: scikit_learn==1.3.2
|
|
27
|
-
Requires-Dist: scipy==1.10.1
|
|
28
|
-
Requires-Dist: selenium==4.17.2
|
|
29
|
-
|
|
30
1
|
# AstroToolkit
|
|
31
2
|
|
|
32
3
|
AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
|
|
@@ -56,18 +27,6 @@ The package can be installed as with any other package, e.g. using pip:
|
|
|
56
27
|
pip install AstroToolkit
|
|
57
28
|
```
|
|
58
29
|
|
|
59
|
-
Once the package has been installed, you should navigate to the package install location. This should be located in: **.../Lib/site-packages/AstroToolkit**, where **...** is your python install location. If you wish to find this, you can use the following command from the terminal:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
python -c "from AstroToolkit.Tools import getpath; getpath()"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
In this directory, run either buildwin.bat (Windows) or build.sh (Linux) depending on your operating system.
|
|
66
|
-
|
|
67
|
-
**NOTE:** See _README.txt_ (Linux) or _README - Windows.txt_ (Windows) in the above directory for any additional dependencies.
|
|
68
|
-
|
|
69
|
-
<br>
|
|
70
|
-
|
|
71
30
|
## Introduction<a id="introduction"></a>
|
|
72
31
|
|
|
73
32
|
ATK uses Bokeh as its primary plotting library. The official documentation can be found at [https://bokeh.org/](https://bokeh.org/). A key property of Bokeh plots is that they can be saved as static .html files, which can then be shared/accessed while retaining all interactivity.
|
|
@@ -600,7 +559,7 @@ data = list/dict data in structure returned by the query tool
|
|
|
600
559
|
|
|
601
560
|
<br>
|
|
602
561
|
|
|
603
|
-
**Supported plot types:** image, lightcurve, sed, spectra,
|
|
562
|
+
**Supported plot types:** image, lightcurve, sed, spectra, hrd
|
|
604
563
|
|
|
605
564
|
<br>
|
|
606
565
|
|
|
@@ -620,10 +579,6 @@ Below is an outline of the usage and output of each plot type. Note that additon
|
|
|
620
579
|
|
|
621
580
|
[HRD Plotting](#25-hrd-plotting)
|
|
622
581
|
|
|
623
|
-
[Power Spectra Plotting](#26-power-spectra-plotting)
|
|
624
|
-
|
|
625
|
-
<br>
|
|
626
|
-
|
|
627
582
|
### 2.1 Image Plotting<a id="21-image-plotting"></a>
|
|
628
583
|
|
|
629
584
|
Type argument: 'image'
|
|
@@ -750,49 +705,6 @@ Description: Plots Gaia HRD data in the format returned by [hrd queries](#19-hrd
|
|
|
750
705
|
|
|
751
706
|
<br><br>
|
|
752
707
|
|
|
753
|
-
### 2.6 Power Spectra Plotting<a id="26-power-spectra-plotting"></a>
|
|
754
|
-
|
|
755
|
-
Type argument: 'powspec'
|
|
756
|
-
|
|
757
|
-
Description: Plots power spectra from lightcurve data in the format returned by [lightcurve queries](#16-lightcurve-query).
|
|
758
|
-
|
|
759
|
-
<br>
|
|
760
|
-
|
|
761
|
-
**Returns:** dict
|
|
762
|
-
|
|
763
|
-
```
|
|
764
|
-
{
|
|
765
|
-
'type' : 'powspec'
|
|
766
|
-
'survey' : str, survey of lightcurve data given to the powspec tool
|
|
767
|
-
'source' : int/str, source used to get data (None if a pos was used)
|
|
768
|
-
'pos': [ra,dec], pos used to get data (None if a source was used)
|
|
769
|
-
'plot' : bokeh figure object, the actual plot
|
|
770
|
-
'ATKfilename' : the default filename given by ATK
|
|
771
|
-
}
|
|
772
|
-
```
|
|
773
|
-
|
|
774
|
-
<br><br>
|
|
775
|
-
|
|
776
|
-
### 2.7 Timeseries Analysis<a id="27-timeseries-analysis"></a>
|
|
777
|
-
|
|
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).
|
|
779
|
-
|
|
780
|
-
<br>
|
|
781
|
-
|
|
782
|
-
**Usage:**
|
|
783
|
-
|
|
784
|
-
```
|
|
785
|
-
tsanalysis(data)
|
|
786
|
-
```
|
|
787
|
-
|
|
788
|
-
where:
|
|
789
|
-
|
|
790
|
-
```
|
|
791
|
-
data = dict or list in format returned by lightcurve queries
|
|
792
|
-
```
|
|
793
|
-
|
|
794
|
-
<br><br>
|
|
795
|
-
|
|
796
708
|
## 3. Datapage Tools<a id="3-datapage-tools"></a>
|
|
797
709
|
|
|
798
710
|
These functions are used to create custom datapages from any plots/data supported by AstroToolkit.
|
|
@@ -1438,21 +1350,7 @@ showplot(plot)
|
|
|
1438
1350
|
|
|
1439
1351
|
<br><br>
|
|
1440
1352
|
|
|
1441
|
-
### Example 6: Fetching
|
|
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
|
-

|
|
1452
|
-
|
|
1453
|
-
<br><br>
|
|
1454
|
-
|
|
1455
|
-
### Example 7: Fetching Gaia parallax and WISE data
|
|
1353
|
+
### Example 6: Fetching Gaia parallax and WISE data
|
|
1456
1354
|
|
|
1457
1355
|
```
|
|
1458
1356
|
from AstroToolkit.Tools import query
|
|
@@ -1463,7 +1361,7 @@ parallax = query(type='data',survey='gaia',source=source)['data']['parallax']
|
|
|
1463
1361
|
wise_data = query(type='data',survey='wise',source=source)['data']
|
|
1464
1362
|
```
|
|
1465
1363
|
|
|
1466
|
-
### Example
|
|
1364
|
+
### Example 7: Fetching 2MASS photometry for an object
|
|
1467
1365
|
|
|
1468
1366
|
```
|
|
1469
1367
|
from AstroToolkit.Tools import query
|
|
@@ -1471,7 +1369,7 @@ from AstroToolkit.Tools import query
|
|
|
1471
1369
|
data=query(type='phot',survey='twomass',source=6050296829033196032)['data']
|
|
1472
1370
|
```
|
|
1473
1371
|
|
|
1474
|
-
### Example
|
|
1372
|
+
### Example 8: Fetching photometry from all available surveys using a bulk photometry query
|
|
1475
1373
|
|
|
1476
1374
|
```
|
|
1477
1375
|
from AstroToolkit.Tools import query
|
|
@@ -1484,20 +1382,8 @@ galex_data=bulk_phot['galex']
|
|
|
1484
1382
|
|
|
1485
1383
|
<br><br>
|
|
1486
1384
|
|
|
1487
|
-
### Example 10: Fetching ZTF lightcurve data, and performing timeseries analysis
|
|
1488
1385
|
|
|
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
|
-

|
|
1497
|
-
|
|
1498
|
-
<br><br>
|
|
1499
|
-
|
|
1500
|
-
### Example 11: Proper motion correction
|
|
1386
|
+
### Example 9: Proper motion correction
|
|
1501
1387
|
|
|
1502
1388
|
```
|
|
1503
1389
|
from AstroToolkit.Tools import query,correctpm
|
|
@@ -1506,4 +1392,4 @@ gaia_data=query(type='data',survey='gaia',source=6050296829033196032)['data']
|
|
|
1506
1392
|
ra,dec,pmra,pmdec=gaia_data['ra'][0],gaia_data['dec'][0],gaia_data['pmra'][0],gaia_data['pmdec'][0]
|
|
1507
1393
|
|
|
1508
1394
|
ra_corrected,dec_corrected=correctpm([2016,0],[2000,0],ra,dec,pmra,pmdec)
|
|
1509
|
-
```
|
|
1395
|
+
```
|
|
@@ -7,34 +7,30 @@ include-package-data = true
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "AstroToolkit"
|
|
10
|
-
version = "1.4.
|
|
10
|
+
version = "1.4.2"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Ethan Moorfield", email="ethan.moorfield@hotmail.co.uk"},
|
|
13
13
|
]
|
|
14
14
|
description = "A package for the gathering and plotting of astronomical data."
|
|
15
15
|
readme = "README.md"
|
|
16
|
-
requires-python = ">=3.
|
|
16
|
+
requires-python = ">=3.8"
|
|
17
17
|
classifiers = [
|
|
18
18
|
"Programming Language :: Python :: 3",
|
|
19
19
|
"Operating System :: OS Independent",
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"astropy==
|
|
22
|
+
"astropy==6.0.1",
|
|
23
23
|
"astroquery==0.4.7",
|
|
24
|
-
"bokeh==3.
|
|
25
|
-
"cmasher==1.
|
|
24
|
+
"bokeh==3.4.1",
|
|
25
|
+
"cmasher==1.8.0",
|
|
26
|
+
"matplotlib==3.8.4",
|
|
26
27
|
"importlib_resources==6.4.0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"numpy==1.24.4",
|
|
30
|
-
"pandas==2.0.3",
|
|
31
|
-
"Pillow==10.2.0",
|
|
32
|
-
"PyQt5==5.15.10",
|
|
33
|
-
"PyQt5_sip==12.13.0",
|
|
28
|
+
"numpy==1.26.4",
|
|
29
|
+
"pandas==2.2.2",
|
|
34
30
|
"Requests==2.31.0",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
31
|
+
"selenium==4.17.2",
|
|
32
|
+
"beautifulsoup4==4.12.3",
|
|
33
|
+
"scipy==1.13.0",
|
|
38
34
|
]
|
|
39
35
|
|
|
40
36
|
[project.urls]
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
from tkinter import W
|
|
2
1
|
from astropy.table import Table
|
|
3
2
|
from astropy.io import fits
|
|
4
|
-
import astropy
|
|
5
3
|
from astropy.visualization import PercentileInterval, AsinhStretch
|
|
6
4
|
from astropy.wcs import WCS
|
|
7
|
-
import PIL
|
|
8
|
-
from PIL import Image
|
|
9
5
|
from io import BytesIO
|
|
10
6
|
import numpy as np
|
|
11
7
|
import requests
|
|
@@ -34,7 +30,7 @@ def get_image_dict(survey,source=None,pos=None,location=None,size=30,band='g'):
|
|
|
34
30
|
url_size=size*4
|
|
35
31
|
service='https://ps1images.stsci.edu/cgi-bin/ps1filenames.py'
|
|
36
32
|
url=f'{service}?ra={ra}&dec={dec}&band={band}'
|
|
37
|
-
|
|
33
|
+
|
|
38
34
|
# get table of returned image filenames
|
|
39
35
|
try:
|
|
40
36
|
table=Table.read(url, format='ascii')
|
|
@@ -89,9 +85,14 @@ def get_image_dict(survey,source=None,pos=None,location=None,size=30,band='g'):
|
|
|
89
85
|
urlMain=f'{service}?ra={ra}&d={dec}&v=3&e=J2000&f=fits&h={url_size}&w={url_size}'
|
|
90
86
|
|
|
91
87
|
# send request using the URL returned for the selected survey
|
|
92
|
-
|
|
88
|
+
try:
|
|
89
|
+
r=requests.get(urlMain,timeout=15)
|
|
90
|
+
except:
|
|
91
|
+
print(f'Note: Experiencing issues with {survey}.')
|
|
92
|
+
return failed_search()
|
|
93
93
|
if r.status_code!=200:
|
|
94
94
|
print(f'Note: Experiencing issues with {survey}.')
|
|
95
|
+
return failed_search()
|
|
95
96
|
|
|
96
97
|
try:
|
|
97
98
|
fh=fits.open(BytesIO(r.content))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from AstroToolkit.Tools import query,plot,getbuttons,gridsetup,getmdtable,showplot
|
|
1
|
+
from AstroToolkit.Tools import query,plot,getbuttons,gridsetup,getmdtable,showplot,export
|
|
2
2
|
from bokeh.layouts import column,row,layout
|
|
3
3
|
from bokeh.plotting import output_file
|
|
4
|
+
import chromedriver_binary
|
|
4
5
|
|
|
5
6
|
# source = Hu Leo
|
|
6
|
-
#source=2552928187080872832
|
|
7
7
|
source=587316166180416640
|
|
8
8
|
|
|
9
9
|
# set grid size (scales overally size of datapage)
|
|
@@ -31,9 +31,6 @@ lightcurve_data=query(type='lightcurve',survey='ztf',source=source)
|
|
|
31
31
|
# plot each lightcurve in lightcurve_data and set colour of each plot
|
|
32
32
|
lightcurves=plot(lightcurve_data,colours=['green','red','blue'])
|
|
33
33
|
|
|
34
|
-
# plot power spectrum data (lightcurve_data)
|
|
35
|
-
power_spectrum=plot(lightcurve_data,type='powspec',)
|
|
36
|
-
|
|
37
34
|
# get SIMBAD and Vizier buttons
|
|
38
35
|
buttons=getbuttons(grid_size=grid_size,source=source)
|
|
39
36
|
|
|
@@ -54,18 +51,18 @@ grid_plots=gridsetup(dimensions={'width':6,'height':5},plots=[{'name':'image','f
|
|
|
54
51
|
{'name':'sed','figure':sed,'width':2,'height':1},
|
|
55
52
|
{'name':'lightcurves','figure':lightcurves,'width':2,'height':1},
|
|
56
53
|
{'name':'buttons','figure':buttons,'width':1,'height':1},
|
|
57
|
-
{'name':'spectrum','figure':spectrum,'width':
|
|
58
|
-
{'name':'powspec','figure':power_spectrum,'width':2,'height':1},
|
|
54
|
+
{'name':'spectrum','figure':spectrum,'width':5,'height':1},
|
|
59
55
|
{'name':'metadata_table','figure':metadata,'width':6,'height':2}],
|
|
60
56
|
grid_size=grid_size)
|
|
61
57
|
|
|
62
58
|
# set up the final grid
|
|
63
59
|
datapage=layout(column(
|
|
64
60
|
row(grid_plots['image'],grid_plots['hrd'],column(grid_plots['sed'],grid_plots['lightcurves'])),
|
|
65
|
-
row(grid_plots['buttons'],grid_plots['spectrum']
|
|
61
|
+
row(grid_plots['buttons'],grid_plots['spectrum']),
|
|
66
62
|
row(grid_plots['metadata_table'])
|
|
67
63
|
))
|
|
68
64
|
|
|
69
65
|
output_file(f'{source}_datapage.html')
|
|
70
66
|
|
|
71
|
-
showplot(datapage)
|
|
67
|
+
showplot(datapage)
|
|
68
|
+
export(datapage)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
from astropy.table import Table
|
|
2
|
-
import matplotlib.pyplot as plt
|
|
3
2
|
import numpy as np
|
|
4
3
|
from scipy import stats
|
|
5
4
|
import math
|
|
6
5
|
import cmasher as cmr
|
|
7
6
|
from bokeh.plotting import figure
|
|
8
|
-
import os
|
|
9
7
|
from importlib_resources import files
|
|
10
8
|
from bokeh.models import CustomJS
|
|
11
9
|
from bokeh import events
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import matplotlib
|
|
2
2
|
import numpy as np
|
|
3
3
|
from bokeh.plotting import figure
|
|
4
|
-
from bokeh.models import
|
|
4
|
+
from bokeh.models import ColumnDataSource
|
|
5
5
|
from bokeh.transform import linear_cmap
|
|
6
6
|
from bokeh.models import CustomJS
|
|
7
7
|
from bokeh import events
|
|
@@ -108,7 +108,7 @@ def plot_lightcurve(data,colour,colours):
|
|
|
108
108
|
mapper=linear_cmap(field_name='mag',palette=palette,low=min(mag),high=max(mag))
|
|
109
109
|
|
|
110
110
|
# plot points
|
|
111
|
-
plot.
|
|
111
|
+
plot.scatter(x='time',y='mag',source=source,color=mapper,marker='circle',legend_label=f"{data_dict['survey']} {data_dict['band']}")
|
|
112
112
|
|
|
113
113
|
# plot error bars
|
|
114
114
|
err_xs=[]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from bokeh.plotting import figure
|
|
2
|
-
from bokeh.models import
|
|
2
|
+
from bokeh.models import CustomJS, PrintfTickFormatter
|
|
3
3
|
from bokeh import events
|
|
4
4
|
import math
|
|
5
5
|
|
|
@@ -47,9 +47,9 @@ def plot_sed(sed_data):
|
|
|
47
47
|
# plot data
|
|
48
48
|
for i,v in enumerate(x_arr):
|
|
49
49
|
if not math.isnan(err_arr[i]):
|
|
50
|
-
plot.
|
|
50
|
+
plot.scatter(x=x_arr[i],y=y_arr[i],color=colour_arr[current_survey_index],marker='circle',legend_label=f'{survey}')
|
|
51
51
|
else:
|
|
52
|
-
plot.
|
|
52
|
+
plot.scatter(x=x_arr[i],y=y_arr[i],color=colour_arr[current_survey_index],marker='cross',legend_label=f'{survey} (Upper Limit)',size=7.5)
|
|
53
53
|
|
|
54
54
|
# plot errors
|
|
55
55
|
plot.multi_line(err_xs,err_ys,color=colour_arr[current_survey_index],legend_label=f'{survey}',level='underlay',line_width=0.5,line_cap='square')
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import pandas as pd
|
|
2
1
|
from bokeh.plotting import figure
|
|
3
2
|
from bokeh.models import Span, CheckboxGroup, CustomJS, Label, Range1d
|
|
4
|
-
from bokeh.layouts import row
|
|
3
|
+
from bokeh.layouts import row
|
|
5
4
|
from bokeh.models import PrintfTickFormatter
|
|
6
5
|
from bokeh import events
|
|
7
|
-
import math
|
|
8
6
|
|
|
9
7
|
def get_plot(spectrum_dict):
|
|
10
8
|
if spectrum_dict['data']==None:
|