AstroToolkit 1.7.0__tar.gz → 2.0.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.
- astrotoolkit-2.0.0/PKG-INFO +60 -0
- astrotoolkit-2.0.0/README.md +33 -0
- astrotoolkit-2.0.0/pyproject.toml +51 -0
- astrotoolkit-2.0.0/src/ATK/Config/__init__.py +4 -0
- astrotoolkit-2.0.0/src/ATK/Models/__init__.py +13 -0
- astrotoolkit-2.0.0/src/ATK/Tools/__init__.py +4 -0
- astrotoolkit-2.0.0/src/ATK/Tools/query.py +229 -0
- astrotoolkit-2.0.0/src/ATK/Tools/query.pyi +14 -0
- astrotoolkit-2.0.0/src/ATK/Tools/read.py +22 -0
- astrotoolkit-2.0.0/src/ATK/Visualisation/__init__.py +3 -0
- astrotoolkit-2.0.0/src/ATK/Visualisation/datapages.py +48 -0
- astrotoolkit-2.0.0/src/ATK/__init__.py +5 -0
- astrotoolkit-2.0.0/src/ATK/base/__init__.py +3 -0
- astrotoolkit-2.0.0/src/ATK/configuration/alias_config.py +22 -0
- astrotoolkit-2.0.0/src/ATK/configuration/base_config.py +37 -0
- astrotoolkit-2.0.0/src/ATK/configuration/defaults/alias_defaults.py +17 -0
- astrotoolkit-2.0.0/src/ATK/configuration/defaults/base_defaults.py +51 -0
- astrotoolkit-2.0.0/src/ATK/configuration/defaults/epoch_defaults.py +34 -0
- astrotoolkit-2.0.0/src/ATK/configuration/defaults/overlay_defaults.py +61 -0
- astrotoolkit-2.0.0/src/ATK/configuration/defaults/survey_defaults.py +102 -0
- astrotoolkit-2.0.0/src/ATK/configuration/epoch_config.py +43 -0
- astrotoolkit-2.0.0/src/ATK/configuration/overlay_config.py +56 -0
- astrotoolkit-2.0.0/src/ATK/configuration/parser_config/ParserConfig.py +206 -0
- astrotoolkit-2.0.0/src/ATK/configuration/survey_config.py +94 -0
- astrotoolkit-2.0.0/src/ATK/configuration/yaml_config/YAMLConfig.py +244 -0
- astrotoolkit-2.0.0/src/ATK/configuration/yaml_config/yaml_io.py +61 -0
- astrotoolkit-2.0.0/src/ATK/io/files/read.py +263 -0
- astrotoolkit-2.0.0/src/ATK/io/files/writing.py +79 -0
- astrotoolkit-2.0.0/src/ATK/io/plot_io.py +252 -0
- astrotoolkit-2.0.0/src/ATK/io/struct_stdout.py +561 -0
- astrotoolkit-2.0.0/src/ATK/io/structure_io.py +421 -0
- astrotoolkit-2.0.0/src/ATK/io/target_io.py +116 -0
- astrotoolkit-2.0.0/src/ATK/plotting/colours.py +92 -0
- astrotoolkit-2.0.0/src/ATK/plotting/datapage/plot_datapage.py +358 -0
- astrotoolkit-2.0.0/src/ATK/plotting/datatable/plot_datatable.py +71 -0
- astrotoolkit-2.0.0/src/ATK/plotting/formatting.py +138 -0
- astrotoolkit-2.0.0/src/ATK/plotting/hrd/plot_hrd.py +178 -0
- astrotoolkit-2.0.0/src/ATK/plotting/image/false_colour.py +89 -0
- astrotoolkit-2.0.0/src/ATK/plotting/image/plot_image.py +323 -0
- astrotoolkit-2.0.0/src/ATK/plotting/lightcurve/folded_params.py +211 -0
- astrotoolkit-2.0.0/src/ATK/plotting/lightcurve/plot_lightcurve.py +276 -0
- astrotoolkit-2.0.0/src/ATK/plotting/plotting_core.py +15 -0
- astrotoolkit-2.0.0/src/ATK/plotting/powspec/plot_powspec.py +39 -0
- astrotoolkit-2.0.0/src/ATK/plotting/sed/plot_sed.py +148 -0
- astrotoolkit-2.0.0/src/ATK/plotting/spectrum/plot_spectrum.py +89 -0
- astrotoolkit-2.0.0/src/ATK/plotting/spectrum/spectrum_overlay.py +118 -0
- astrotoolkit-2.0.0/src/ATK/queries/arguments.py +111 -0
- astrotoolkit-2.0.0/src/ATK/queries/checksum.py +67 -0
- astrotoolkit-2.0.0/src/ATK/queries/datatable/datatable_query.py +100 -0
- astrotoolkit-2.0.0/src/ATK/queries/hrd/gaia_query.py +44 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/2mass_query.py +39 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/_query_info.py +19 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/dss1_query.py +13 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/dss2_query.py +13 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/image_core.py +202 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/irsa_queries.py +91 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/overlays.py +317 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/panstarrs_query.py +57 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/sdss_query.py +49 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/skymapper_query.py +63 -0
- astrotoolkit-2.0.0/src/ATK/queries/image/wise_query.py +14 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/_query_info.py +8 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/asassn_query.py +59 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/atlas_query.py +134 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/crts_query.py +83 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/gaia_query.py +67 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/lightcurve_core.py +78 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/tess_query.py +131 -0
- astrotoolkit-2.0.0/src/ATK/queries/lightcurve/ztf_query.py +45 -0
- astrotoolkit-2.0.0/src/ATK/queries/query_core.py +241 -0
- astrotoolkit-2.0.0/src/ATK/queries/sed/_query_info.py +1 -0
- astrotoolkit-2.0.0/src/ATK/queries/sed/sed_core.py +64 -0
- astrotoolkit-2.0.0/src/ATK/queries/sed/sed_query.py +114 -0
- astrotoolkit-2.0.0/src/ATK/queries/simbad/simbad_query.py +54 -0
- astrotoolkit-2.0.0/src/ATK/queries/spectrum/_query_info.py +1 -0
- astrotoolkit-2.0.0/src/ATK/queries/spectrum/desi_query.py +115 -0
- astrotoolkit-2.0.0/src/ATK/queries/spectrum/sdss_query.py +53 -0
- astrotoolkit-2.0.0/src/ATK/queries/vizier/_query_info.py +11 -0
- astrotoolkit-2.0.0/src/ATK/queries/vizier/vizier_query.py +108 -0
- astrotoolkit-2.0.0/src/ATK/structures/Base.py +256 -0
- astrotoolkit-2.0.0/src/ATK/structures/DataPages.py +153 -0
- astrotoolkit-2.0.0/src/ATK/structures/DataSet.py +441 -0
- astrotoolkit-2.0.0/src/ATK/structures/DataTable.py +83 -0
- astrotoolkit-2.0.0/src/ATK/structures/HRD.py +78 -0
- astrotoolkit-2.0.0/src/ATK/structures/Image.py +95 -0
- astrotoolkit-2.0.0/src/ATK/structures/Lightcurve.py +447 -0
- astrotoolkit-2.0.0/src/ATK/structures/Powspec.py +72 -0
- astrotoolkit-2.0.0/src/ATK/structures/Record.py +104 -0
- astrotoolkit-2.0.0/src/ATK/structures/SED.py +98 -0
- astrotoolkit-2.0.0/src/ATK/structures/Spectrum.py +183 -0
- astrotoolkit-2.0.0/src/ATK/structures/Target.py +171 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/apply.py +72 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/binning.py +73 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/cropping.py +40 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/lightcurve/phasefold.py +180 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/lightcurve/powspec.py +56 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/lightcurve/timeseries_core.py +57 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/sigma_clip.py +15 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/spectrum/fitting.py +399 -0
- astrotoolkit-2.0.0/src/ATK/structures/methods/spectrum/radial_velocities.py +254 -0
- astrotoolkit-2.0.0/src/ATK/utilities/coordinates.py +208 -0
- astrotoolkit-2.0.0/src/ATK/utilities/defaults.py +28 -0
- astrotoolkit-2.0.0/src/ATK/utilities/docstrings.py +294 -0
- astrotoolkit-2.0.0/src/ATK/utilities/file_io.py +43 -0
- astrotoolkit-2.0.0/src/ATK/utilities/mapping.py +72 -0
- astrotoolkit-2.0.0/src/ATK/utilities/misc.py +21 -0
- astrotoolkit-2.0.0/src/ATK/utilities/requests.py +64 -0
- astrotoolkit-2.0.0/src/ATK/utilities/units.py +29 -0
- astrotoolkit-2.0.0/src/AstroToolkit.egg-info/PKG-INFO +60 -0
- astrotoolkit-2.0.0/src/AstroToolkit.egg-info/SOURCES.txt +117 -0
- astrotoolkit-2.0.0/src/AstroToolkit.egg-info/entry_points.txt +3 -0
- astrotoolkit-2.0.0/src/AstroToolkit.egg-info/requires.txt +13 -0
- astrotoolkit-2.0.0/src/AstroToolkit.egg-info/top_level.txt +2 -0
- astrotoolkit-2.0.0/src/bin/atkconfig_command.py +54 -0
- astrotoolkit-2.0.0/src/bin/atksurvey_command.py +104 -0
- astrotoolkit-1.7.0/PKG-INFO +0 -86
- astrotoolkit-1.7.0/README.md +0 -57
- astrotoolkit-1.7.0/pyproject.toml +0 -56
- astrotoolkit-1.7.0/src/AstroToolkit/Aliases.py +0 -110
- astrotoolkit-1.7.0/src/AstroToolkit/Config.py +0 -93
- astrotoolkit-1.7.0/src/AstroToolkit/Configuration/baseconfig.py +0 -168
- astrotoolkit-1.7.0/src/AstroToolkit/Configuration/catalogue_setup.py +0 -117
- astrotoolkit-1.7.0/src/AstroToolkit/Configuration/epochs.py +0 -127
- astrotoolkit-1.7.0/src/AstroToolkit/Configuration/overlays.py +0 -139
- astrotoolkit-1.7.0/src/AstroToolkit/Data/bin_lightcurves.py +0 -94
- astrotoolkit-1.7.0/src/AstroToolkit/Data/bulkquery.py +0 -64
- astrotoolkit-1.7.0/src/AstroToolkit/Data/crop_lightcurves.py +0 -63
- astrotoolkit-1.7.0/src/AstroToolkit/Data/dataquery.py +0 -237
- astrotoolkit-1.7.0/src/AstroToolkit/Data/fetch_crts.py +0 -112
- astrotoolkit-1.7.0/src/AstroToolkit/Data/fetch_tess.py +0 -75
- astrotoolkit-1.7.0/src/AstroToolkit/Data/hrdquery.py +0 -165
- astrotoolkit-1.7.0/src/AstroToolkit/Data/imageoverlay.py +0 -360
- astrotoolkit-1.7.0/src/AstroToolkit/Data/imagequery.py +0 -370
- astrotoolkit-1.7.0/src/AstroToolkit/Data/lightcurvequery.py +0 -851
- astrotoolkit-1.7.0/src/AstroToolkit/Data/reddeningquery.py +0 -270
- astrotoolkit-1.7.0/src/AstroToolkit/Data/sedquery.py +0 -212
- astrotoolkit-1.7.0/src/AstroToolkit/Data/sigmaclip.py +0 -89
- astrotoolkit-1.7.0/src/AstroToolkit/Data/simbad_query.py +0 -36
- astrotoolkit-1.7.0/src/AstroToolkit/Data/spectrumquery.py +0 -155
- astrotoolkit-1.7.0/src/AstroToolkit/DatapageElements/datapage_buttons.py +0 -64
- astrotoolkit-1.7.0/src/AstroToolkit/DatapageElements/metadata_table.py +0 -127
- astrotoolkit-1.7.0/src/AstroToolkit/Datapages.py +0 -251
- astrotoolkit-1.7.0/src/AstroToolkit/Epochs.py +0 -114
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/AR_Sco_TNT.txt +0 -3458
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_creation.py +0 -59
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_hrd.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_image.fits +1 -143
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_lightcurve.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_sed.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/datapage_spectrum.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/examples_utilities.py +0 -26
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/external_data.py +0 -40
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/fetching_data.py +0 -8
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/image_overlays.fits +0 -2618
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/image_plotting.py +0 -24
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/lightcurve.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/lightcurve_plotting.py +0 -43
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/loadExamples.py +0 -11
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/local_files.py +0 -18
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/test_data.fits +0 -3
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/test_lightcurve.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Examples/user_defined_overlay.py +0 -16
- astrotoolkit-1.7.0/src/AstroToolkit/FileHandling/file_naming.py +0 -39
- astrotoolkit-1.7.0/src/AstroToolkit/FileHandling/file_reading.py +0 -277
- astrotoolkit-1.7.0/src/AstroToolkit/FileHandling/file_writing.py +0 -302
- astrotoolkit-1.7.0/src/AstroToolkit/Gui.py +0 -874
- astrotoolkit-1.7.0/src/AstroToolkit/Input/input_validation.py +0 -339
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/coordinate_conversions.py +0 -23
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/estimate_spectral_type.py +0 -60
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/fitsfiles.py +0 -34
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/grid.py +0 -230
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/identifier_generation.py +0 -55
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/pmcorrection.py +0 -138
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/rename_headers.py +0 -246
- astrotoolkit-1.7.0/src/AstroToolkit/Misc/search.py +0 -55
- astrotoolkit-1.7.0/src/AstroToolkit/Models.py +0 -285
- astrotoolkit-1.7.0/src/AstroToolkit/Overlays.py +0 -86
- astrotoolkit-1.7.0/src/AstroToolkit/PackageInfo.py +0 -309
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/backdrop_hrd_allmags.fits +0 -0
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/hrdplotting.py +0 -124
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/imageplotting.py +0 -215
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/lightcurveplotting.py +0 -153
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/plotting_map.py +0 -151
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/sedplotting.py +0 -120
- astrotoolkit-1.7.0/src/AstroToolkit/Plotting/spectrumplotting.py +0 -147
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/data_printing.py +0 -140
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/data_saving.py +0 -24
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/method_definitions.py +0 -191
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/plot_exporting.py +0 -36
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/plot_saving.py +0 -43
- astrotoolkit-1.7.0/src/AstroToolkit/StructureMethods/plot_showing.py +0 -39
- astrotoolkit-1.7.0/src/AstroToolkit/Timeseries/lomb_scargle.py +0 -234
- astrotoolkit-1.7.0/src/AstroToolkit/Timeseries/timeseries_formatting.py +0 -35
- astrotoolkit-1.7.0/src/AstroToolkit/Tools.py +0 -670
- astrotoolkit-1.7.0/src/AstroToolkit/Utility.py +0 -55
- astrotoolkit-1.7.0/src/AstroToolkit.egg-info/PKG-INFO +0 -86
- astrotoolkit-1.7.0/src/AstroToolkit.egg-info/SOURCES.txt +0 -96
- astrotoolkit-1.7.0/src/AstroToolkit.egg-info/entry_points.txt +0 -10
- astrotoolkit-1.7.0/src/AstroToolkit.egg-info/requires.txt +0 -15
- astrotoolkit-1.7.0/src/AstroToolkit.egg-info/top_level.txt +0 -2
- astrotoolkit-1.7.0/src/bin/atkalias_command.py +0 -33
- astrotoolkit-1.7.0/src/bin/atkconfig_command.py +0 -26
- astrotoolkit-1.7.0/src/bin/atkconv_command.py +0 -26
- astrotoolkit-1.7.0/src/bin/atkepoch_command.py +0 -38
- astrotoolkit-1.7.0/src/bin/atkoverlay_command.py +0 -56
- astrotoolkit-1.7.0/src/bin/atkquery_command.py +0 -171
- astrotoolkit-1.7.0/src/bin/atkread_command.py +0 -32
- astrotoolkit-1.7.0/src/bin/atksearch_command.py +0 -88
- astrotoolkit-1.7.0/src/bin/opengui_command.py +0 -5
- {astrotoolkit-1.7.0 → astrotoolkit-2.0.0}/LICENSE +0 -0
- {astrotoolkit-1.7.0 → astrotoolkit-2.0.0}/MANIFEST.in +0 -0
- {astrotoolkit-1.7.0 → astrotoolkit-2.0.0}/setup.cfg +0 -0
- {astrotoolkit-1.7.0 → astrotoolkit-2.0.0}/src/AstroToolkit.egg-info/dependency_links.txt +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AstroToolkit
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: A package for the gathering, plotting and analysis 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.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: astropy
|
|
14
|
+
Requires-Dist: astroquery
|
|
15
|
+
Requires-Dist: beautifulsoup4
|
|
16
|
+
Requires-Dist: bokeh
|
|
17
|
+
Requires-Dist: lightkurve
|
|
18
|
+
Requires-Dist: matplotlib
|
|
19
|
+
Requires-Dist: numpy
|
|
20
|
+
Requires-Dist: pandas>3.0.0
|
|
21
|
+
Requires-Dist: PyYAML
|
|
22
|
+
Requires-Dist: reproject
|
|
23
|
+
Requires-Dist: scipy
|
|
24
|
+
Requires-Dist: skypatrol
|
|
25
|
+
Requires-Dist: sparclclient
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
AstroToolkit
|
|
29
|
+
============
|
|
30
|
+
AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
|
|
31
|
+
|
|
32
|
+
<br>
|
|
33
|
+
|
|
34
|
+
Installation
|
|
35
|
+
============
|
|
36
|
+
To install the package from PyPI, use:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
pip install AstroToolkit
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
<br>
|
|
43
|
+
|
|
44
|
+
Documentation
|
|
45
|
+
=============
|
|
46
|
+
Full documentation for the package can be found [here](https://astrotoolkit.readthedocs.io/en/latest/).
|
|
47
|
+
|
|
48
|
+
<br>
|
|
49
|
+
|
|
50
|
+
Acknowledgements
|
|
51
|
+
================
|
|
52
|
+
This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 101020057).
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<picture>
|
|
56
|
+
<source media="(prefers-color-scheme: dark)" srcset="./docs/source/_static/erc_logo_dark.png">
|
|
57
|
+
<source media="(prefers-color-scheme: light)" srcset="./docs/source/_static/erc_logo_light.png">
|
|
58
|
+
<img src="./source/_static/erc_logo_dark.png" width="200"/>
|
|
59
|
+
</picture>
|
|
60
|
+
</p>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
AstroToolkit
|
|
2
|
+
============
|
|
3
|
+
AstroToolkit (ATK) is a set of tools for fetching, plotting, and analysing astronomical data.
|
|
4
|
+
|
|
5
|
+
<br>
|
|
6
|
+
|
|
7
|
+
Installation
|
|
8
|
+
============
|
|
9
|
+
To install the package from PyPI, use:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
pip install AstroToolkit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
<br>
|
|
16
|
+
|
|
17
|
+
Documentation
|
|
18
|
+
=============
|
|
19
|
+
Full documentation for the package can be found [here](https://astrotoolkit.readthedocs.io/en/latest/).
|
|
20
|
+
|
|
21
|
+
<br>
|
|
22
|
+
|
|
23
|
+
Acknowledgements
|
|
24
|
+
================
|
|
25
|
+
This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 101020057).
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<picture>
|
|
29
|
+
<source media="(prefers-color-scheme: dark)" srcset="./docs/source/_static/erc_logo_dark.png">
|
|
30
|
+
<source media="(prefers-color-scheme: light)" srcset="./docs/source/_static/erc_logo_light.png">
|
|
31
|
+
<img src="./source/_static/erc_logo_dark.png" width="200"/>
|
|
32
|
+
</picture>
|
|
33
|
+
</p>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.setuptools]
|
|
6
|
+
include-package-data = true
|
|
7
|
+
|
|
8
|
+
[tool.black]
|
|
9
|
+
line-length = 240
|
|
10
|
+
skip-magic-trailing-comma = true
|
|
11
|
+
|
|
12
|
+
[tool.ruff]
|
|
13
|
+
line-length = 240
|
|
14
|
+
|
|
15
|
+
[project]
|
|
16
|
+
name = "AstroToolkit"
|
|
17
|
+
version = "2.0.0"
|
|
18
|
+
authors = [
|
|
19
|
+
{ name="Ethan Moorfield", email="ethan.moorfield@hotmail.co.uk"},
|
|
20
|
+
]
|
|
21
|
+
description = "A package for the gathering, plotting and analysis of astronomical data."
|
|
22
|
+
readme = "README.md"
|
|
23
|
+
requires-python = ">=3.11"
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
dependencies = [
|
|
30
|
+
"astropy",
|
|
31
|
+
"astroquery",
|
|
32
|
+
"beautifulsoup4",
|
|
33
|
+
"bokeh",
|
|
34
|
+
"lightkurve",
|
|
35
|
+
"matplotlib",
|
|
36
|
+
"numpy",
|
|
37
|
+
"pandas > 3.0.0",
|
|
38
|
+
"PyYAML",
|
|
39
|
+
"reproject",
|
|
40
|
+
"scipy",
|
|
41
|
+
"skypatrol",
|
|
42
|
+
"sparclclient",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/WD-planets/AstroToolkit"
|
|
47
|
+
Issues = "https://github.com/WD-planets/AstroToolkit/issues"
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
ATKconfig = "bin.atkconfig_command:main"
|
|
51
|
+
ATKsurvey = "bin.atksurvey_command:main"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from ..structures.DataPages import DataPages
|
|
2
|
+
from ..structures.DataSet import DataSet
|
|
3
|
+
from ..structures.DataTable import DataTable
|
|
4
|
+
from ..structures.HRD import HRD
|
|
5
|
+
from ..structures.Image import Image
|
|
6
|
+
from ..structures.Lightcurve import Lightcurve
|
|
7
|
+
from ..structures.Powspec import Powspec
|
|
8
|
+
from ..structures.Record import Record
|
|
9
|
+
from ..structures.SED import SED
|
|
10
|
+
from ..structures.Spectrum import Spectrum
|
|
11
|
+
from ..structures.Target import Target
|
|
12
|
+
|
|
13
|
+
__all__ = ["DataSet", "HRD", "Image", "Lightcurve", "Powspec", "SED", "Spectrum", "Target", "Record", "DataTable", "DataPages"]
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
from astropy.coordinates import SkyCoord
|
|
4
|
+
|
|
5
|
+
from ..queries.arguments import get_query_arguments
|
|
6
|
+
from ..queries.checksum import make_cache_key
|
|
7
|
+
from ..queries.query_core import general_query, setup_targeting
|
|
8
|
+
from ..structures.DataSet import DataSet
|
|
9
|
+
from ..structures.Target import Target
|
|
10
|
+
from ..utilities.defaults import RETURNS
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def query(kind: str, targets: int | SkyCoord | Target | list[int | SkyCoord | Target], **kwargs) -> DataSet:
|
|
14
|
+
"""
|
|
15
|
+
Performs a query to retrieve astronomical data.
|
|
16
|
+
|
|
17
|
+
Parameters
|
|
18
|
+
----------
|
|
19
|
+
kind : {'vizier', 'image', 'lightcurve', 'spectrum', 'sed', 'hrd', 'datatable'}, optional
|
|
20
|
+
Type of query to perform.
|
|
21
|
+
|
|
22
|
+
targets : int, :class:`~astropy.coordinates.SkyCoord`, :class:`~ATK.Models.Target`, or iterable of these
|
|
23
|
+
Targets of search (see :doc:`here </auto_tutorials/getting_started/data_query>`).
|
|
24
|
+
|
|
25
|
+
path : str or :class:`~pathlib.Path`, optional
|
|
26
|
+
Path of local FITS file to which result should be saved. :func:`~ATK.Tools.query` will attempt to read this file instead of retrieving new data under all but the following situations:
|
|
27
|
+
|
|
28
|
+
- Changes to query parameters
|
|
29
|
+
|
|
30
|
+
- Changes to the working version of ATK
|
|
31
|
+
|
|
32
|
+
- If an exception was encountered during data retrieval prior to file creation (i.e. :attr:`~ATK.Models.DataSet.exception` is ``True``)
|
|
33
|
+
|
|
34
|
+
corrections : bool, optional
|
|
35
|
+
If ``True``, perform automatic proper motion correction (where possible, see :doc:`here </auto_tutorials/getting_started/data_query>`).
|
|
36
|
+
|
|
37
|
+
Default is ``True``.
|
|
38
|
+
|
|
39
|
+
**kwargs
|
|
40
|
+
Accepted keyword arguments are specific to each ``kind`` (see below).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Returns
|
|
44
|
+
-------
|
|
45
|
+
:class:`~ATK.Models.DataSet`
|
|
46
|
+
Dataset containing data matching ``kind``.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Notes
|
|
50
|
+
-----
|
|
51
|
+
The keyword arguments that are available to :func:`~ATK.Tools.query` depend on the ``kind`` of data that is being requested. These are outlined below:
|
|
52
|
+
|
|
53
|
+
|
|
|
54
|
+
|
|
55
|
+
``kind='vizier'``
|
|
56
|
+
|
|
57
|
+
survey : str
|
|
58
|
+
`Vizier <https://vizier.cds.unistra.fr/>`_ catalogue or `Vizier <https://vizier.cds.unistra.fr/>`_ catalogue alias (see :doc:`here </auto_tutorials/extension/vizier>`).
|
|
59
|
+
|
|
60
|
+
radius : float or :class:`~astropy.units.Quantity`, optional
|
|
61
|
+
Search radius around each target. If float, unit taken from ``query_settings.default_scale`` config key (see :doc:`here </auto_tutorials/configuration/config>`).
|
|
62
|
+
|
|
63
|
+
Default taken from ``query_settings.query_radius`` config key
|
|
64
|
+
(see :doc:`here </auto_tutorials/configuration/config>`).
|
|
65
|
+
|
|
66
|
+
|
|
|
67
|
+
|
|
|
68
|
+
|
|
69
|
+
``kind='image'``
|
|
70
|
+
|
|
71
|
+
survey : str
|
|
72
|
+
Target survey (see :doc:`here </auto_tutorials/images/image_query>`).
|
|
73
|
+
|
|
74
|
+
band : str
|
|
75
|
+
Photometric band of image (see :doc:`here </auto_tutorials/images/image_query>`).
|
|
76
|
+
|
|
77
|
+
size : float or :class:`~astropy.units.Quantity`, optional
|
|
78
|
+
Width and height of image. If float, unit taken from ``query_settings.default_scale`` config key (see :doc:`here </auto_tutorials/configuration/config>`).
|
|
79
|
+
|
|
80
|
+
Default taken from ``query_settings.image_size`` config key
|
|
81
|
+
(see :doc:`here </auto_tutorials/configuration/config>`).
|
|
82
|
+
|
|
83
|
+
overlays : list of str, optional
|
|
84
|
+
List of detection overlays to generate (see :doc:`here </auto_tutorials/images/image_query_2>`).
|
|
85
|
+
|
|
86
|
+
Default is ``None``
|
|
87
|
+
|
|
88
|
+
|
|
|
89
|
+
|
|
|
90
|
+
|
|
91
|
+
``kind='lightcurve'``
|
|
92
|
+
|
|
93
|
+
survey : str
|
|
94
|
+
Target survey (see :doc:`here </auto_tutorials/lightcurves/lightcurve_query>`).
|
|
95
|
+
|
|
96
|
+
radius : float or :class:`~astropy.units.Quantity`, optional
|
|
97
|
+
Search radius around each target. If float, unit taken from ``query_settings.default_scale`` config key (see :doc:`here </auto_tutorials/configuration/config>`).
|
|
98
|
+
|
|
99
|
+
Default taken from ``query_settings.query_radius`` config key
|
|
100
|
+
(see :doc:`here </auto_tutorials/configuration/config>`).
|
|
101
|
+
|
|
102
|
+
split : bool, optional
|
|
103
|
+
If ``True``, photometry is separated by a per-survey ID.
|
|
104
|
+
|
|
105
|
+
Default is ``False``
|
|
106
|
+
|
|
107
|
+
filter : bool, optional
|
|
108
|
+
If ``True``, optional data quality filtering is performed.
|
|
109
|
+
|
|
110
|
+
Default is ``True``
|
|
111
|
+
|
|
112
|
+
username : str, optional
|
|
113
|
+
ATLAS forced photometry username, only required in ATLAS queries.
|
|
114
|
+
|
|
115
|
+
password : str, optional
|
|
116
|
+
ATLAS forced photometry password, only required in ATLAS queries.
|
|
117
|
+
|
|
118
|
+
|
|
|
119
|
+
|
|
|
120
|
+
|
|
121
|
+
``kind='spectrum'``
|
|
122
|
+
|
|
123
|
+
survey : str
|
|
124
|
+
Target survey (see :doc:`here </auto_tutorials/spectra/spectrum_query>`).
|
|
125
|
+
|
|
126
|
+
radius : float or :class:`~astropy.units.Quantity`, optional
|
|
127
|
+
Search radius around each target. If float, unit taken from ``query_settings.default_scale`` config key (see :doc:`here </auto_tutorials/configuration/config>`).
|
|
128
|
+
|
|
129
|
+
Default taken from ``query_settings.query_radius`` config key
|
|
130
|
+
(see :doc:`here </auto_tutorials/configuration/config>`).
|
|
131
|
+
|
|
132
|
+
|
|
|
133
|
+
|
|
|
134
|
+
|
|
135
|
+
``kind='sed'``
|
|
136
|
+
|
|
137
|
+
radius : float or :class:`~astropy.units.Quantity`, optional
|
|
138
|
+
Search radius around each target. If float, unit taken from ``query_settings.default_scale`` config key (see :doc:`here </auto_tutorials/configuration/config>`).
|
|
139
|
+
|
|
140
|
+
Default taken from ``query_settings.query_radius`` config key
|
|
141
|
+
(see :doc:`here </auto_tutorials/configuration/config>`).
|
|
142
|
+
|
|
143
|
+
|
|
|
144
|
+
|
|
|
145
|
+
|
|
146
|
+
``kind='hrd'``
|
|
147
|
+
|
|
148
|
+
colour : str, optional
|
|
149
|
+
Gaia colour in format ``band1-band2``, where each band is a photometry column in `Vizier <https://vizier.cds.unistra.fr/viz-bin/VizieR-3?-source=I/355/gaiadr3>`_.
|
|
150
|
+
|
|
151
|
+
Default is ``'BPmag-RPmag'``.
|
|
152
|
+
|
|
153
|
+
mag : str, optional
|
|
154
|
+
Gaia absolute magnitude, as listed in `Vizier <https://vizier.cds.unistra.fr/viz-bin/VizieR-3?-source=I/355/gaiadr3>`_.
|
|
155
|
+
|
|
156
|
+
Default is ``'Gmag'``.
|
|
157
|
+
|
|
158
|
+
|
|
|
159
|
+
|
|
|
160
|
+
|
|
161
|
+
``kind='datatable'``
|
|
162
|
+
|
|
163
|
+
columns : dict
|
|
164
|
+
Table columns in format ``survey: cols``, where survey is a `Vizier <https://vizier.cds.unistra.fr/>`_ catalogue or `Vizier <https://vizier.cds.unistra.fr/>`_ catalogue alias (see :doc:`here </auto_tutorials/extension/vizier>`) and cols is a list of columns in that catalogue.
|
|
165
|
+
|
|
166
|
+
Example: ``{'gaia': ['Gmag', 'BPmag', 'RPmag'], 'II/328/allwise': ['W1mag', 'W2mag', 'W3mag', 'W4mag']}``
|
|
167
|
+
|
|
168
|
+
See Also
|
|
169
|
+
--------
|
|
170
|
+
:class:`~ATK.Models.Record` : Vizier data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``vizier`` queries.
|
|
171
|
+
:class:`~ATK.Models.Image` : Image data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``image`` queries.
|
|
172
|
+
:class:`~ATK.Models.Lightcurve` : Light curve data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``lightcurve`` queries.
|
|
173
|
+
:class:`~ATK.Models.Spectrum` : Spectrum data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``spectrum`` queries.
|
|
174
|
+
:class:`~ATK.Models.SED` : SED data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``sed`` queries.
|
|
175
|
+
:class:`~ATK.Models.HRD` : HRD data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``hrd`` queries.
|
|
176
|
+
:class:`~ATK.Models.DataTable` : Table data container, stored in :class:`~ATK.Models.DataSet`\ s returned by ``datatable`` queries.
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
arguments = get_query_arguments(kind, kwargs)
|
|
180
|
+
|
|
181
|
+
if targets is None:
|
|
182
|
+
raise ValueError("No targets specified for query.")
|
|
183
|
+
|
|
184
|
+
# get flattened list of targets
|
|
185
|
+
targets = setup_targeting(targets)
|
|
186
|
+
if targets is RETURNS.NULL:
|
|
187
|
+
raise ValueError("Query received no targets, likely due to no valid targets being provided.")
|
|
188
|
+
|
|
189
|
+
if targets is RETURNS.EXCEPTION:
|
|
190
|
+
raise Exception("Failed to generate requested targets, this is likely due to a Vizier fault.")
|
|
191
|
+
|
|
192
|
+
for target in targets:
|
|
193
|
+
target.radius = arguments.get("radius")
|
|
194
|
+
|
|
195
|
+
# targets may return exception if Vizier is down
|
|
196
|
+
if any(target is RETURNS.EXCEPTION for target in targets):
|
|
197
|
+
warnings.warn("Failed to generate requested targets, this is likely due to a Vizier fault.")
|
|
198
|
+
|
|
199
|
+
structure = DataSet[kind](
|
|
200
|
+
kind=None, survey=arguments.get("survey", None), targets=None, radius=arguments.get("radius", None), exception=True
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
return structure
|
|
204
|
+
|
|
205
|
+
# disable proper motion correction
|
|
206
|
+
if not arguments.get("corrections", True):
|
|
207
|
+
for target in targets:
|
|
208
|
+
initial_coords = target.initial_coords
|
|
209
|
+
target.initial_coords = SkyCoord(
|
|
210
|
+
ra=initial_coords.ra, dec=initial_coords.dec, frame=initial_coords.frame, obstime=initial_coords.obstime
|
|
211
|
+
)
|
|
212
|
+
target.coords = initial_coords
|
|
213
|
+
target.identifier = None
|
|
214
|
+
target.survey = None
|
|
215
|
+
target.correction = "none"
|
|
216
|
+
|
|
217
|
+
structure = general_query(kind, targets, **arguments)
|
|
218
|
+
|
|
219
|
+
# attach cache key
|
|
220
|
+
structure._cache_key = make_cache_key(kind, targets, arguments)
|
|
221
|
+
|
|
222
|
+
if structure.exception:
|
|
223
|
+
return structure
|
|
224
|
+
|
|
225
|
+
# save if path provided
|
|
226
|
+
if arguments.get("path"):
|
|
227
|
+
structure.store(arguments["path"])
|
|
228
|
+
|
|
229
|
+
return structure
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import Literal, overload
|
|
2
|
+
|
|
3
|
+
from astropy.coordinates import SkyCoord
|
|
4
|
+
from astropy.units import Quantity
|
|
5
|
+
|
|
6
|
+
from ..structures.DataSet import DataSet
|
|
7
|
+
from ..structures.Target import Target
|
|
8
|
+
|
|
9
|
+
@overload
|
|
10
|
+
def query(
|
|
11
|
+
kind: Literal["vizier"], targets: int | SkyCoord | Target | list[int | SkyCoord | Target], radius: float | Quantity
|
|
12
|
+
) -> DataSet: ...
|
|
13
|
+
@overload
|
|
14
|
+
def query(kind: Literal["image"], targets: int | SkyCoord | Target | list[int | SkyCoord | Target], size: float | Quantity) -> DataSet: ...
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from ..io.files.read import read_local
|
|
4
|
+
from ..structures.DataSet import DataSet
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def read(path: str | Path) -> DataSet:
|
|
8
|
+
"""
|
|
9
|
+
Reads a local ATK FITS file to recreate the original :class:`~ATK.Models.DataSet`.
|
|
10
|
+
|
|
11
|
+
Parameters
|
|
12
|
+
----------
|
|
13
|
+
path : str or :class:`~pathlib.Path`
|
|
14
|
+
Path to file.
|
|
15
|
+
|
|
16
|
+
See Also
|
|
17
|
+
--------
|
|
18
|
+
:class:`~ATK.Models.DataSet` : Data structure from which a local ATK FITS file can be generated.
|
|
19
|
+
:meth:`~ATK.Models.DataSet.store` : :class:`~ATK.Models.DataSet` method from which an ATK FITS file can be generated.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
return read_local(path)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from typing import Sequence
|
|
2
|
+
|
|
3
|
+
from bokeh.models import GridBox
|
|
4
|
+
|
|
5
|
+
from ..plotting.datapage.plot_datapage import get_datapage
|
|
6
|
+
from ..structures.DataSet import DataSet
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def grid(layout: Sequence[Sequence[DataSet]]) -> GridBox:
|
|
10
|
+
"""
|
|
11
|
+
Combines any number of plottable :class:`~ATK.Models.DataSet` objects into a neat grid of figures (see :doc:`here </auto_tutorials/datapages/datapage_plotting>`).
|
|
12
|
+
|
|
13
|
+
Parameters
|
|
14
|
+
----------
|
|
15
|
+
layout : Sequence of Sequence of :class:`~ATK.Models.DataSet`
|
|
16
|
+
Each internal list forms a **row** of the output grid.
|
|
17
|
+
|
|
18
|
+
Examples
|
|
19
|
+
--------
|
|
20
|
+
A 5x6 grid layout containing **three rows**:
|
|
21
|
+
|
|
22
|
+
- 1st row = 2x2 :class:`~ATK.Models.Image` and 3x2 :class:`~ATK.Models.Lightcurve`
|
|
23
|
+
- 2nd row = 2x2 :class:`~ATK.Models.HRD` and 3x2 :class:`~ATK.Models.Spectrum`
|
|
24
|
+
- 3rd row = 5x2 :class:`~ATK.Models.DataTable`
|
|
25
|
+
|
|
26
|
+
|
|
|
27
|
+
|
|
28
|
+
Should be passed as:
|
|
29
|
+
|
|
30
|
+
.. code-block:: python
|
|
31
|
+
|
|
32
|
+
layout = [[image, image, lc , lc , lc ],
|
|
33
|
+
[image, image, lc , lc , lc ],
|
|
34
|
+
[hrd , hrd , spec , spec , spec ],
|
|
35
|
+
[hrd , hrd , spec , spec , spec ],
|
|
36
|
+
[table, table, table, table, table],
|
|
37
|
+
[table, table, table, table, table]]
|
|
38
|
+
|
|
39
|
+
where:
|
|
40
|
+
|
|
41
|
+
- ``image`` is a :class:`~ATK.Models.DataSet` containing :class:`~ATK.Models.Image` objects
|
|
42
|
+
- ``lc`` is a :class:`~ATK.Models.DataSet` containing :class:`~ATK.Models.Lightcurve` objects
|
|
43
|
+
- ``hrd`` is a :class:`~ATK.Models.DataSet` containing :class:`~ATK.Models.HRD` objects
|
|
44
|
+
- ``spec`` is a :class:`~ATK.Models.DataSet` containing :class:`~ATK.Models.Spectrum` objects
|
|
45
|
+
- ``table`` is a :class:`~ATK.Models.DataSet` containing :class:`~ATK.Models.DataTable` objects
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
return get_datapage(layout)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from .defaults.alias_defaults import DEFAULTS, PATH
|
|
2
|
+
from .parser_config.ParserConfig import ParserConfig
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AliasConfig(ParserConfig):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__(PATH, DEFAULTS, None)
|
|
8
|
+
|
|
9
|
+
def _as_flattened_dict(self) -> None:
|
|
10
|
+
"""
|
|
11
|
+
Returns config as a single flattened dictionary of alias:id definitions
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
data = {}
|
|
15
|
+
for key, sub_dict in self._config.items():
|
|
16
|
+
for key, val in sub_dict.items():
|
|
17
|
+
data[key] = val
|
|
18
|
+
|
|
19
|
+
return data
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
ALIAS_CONFIG = AliasConfig()
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from .defaults.base_defaults import DEFAULTS, PATH
|
|
2
|
+
from .parser_config.ParserConfig import ParserConfig
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def translator(value):
|
|
6
|
+
# bool
|
|
7
|
+
if isinstance(value, bool):
|
|
8
|
+
return value
|
|
9
|
+
|
|
10
|
+
# string representation of None/bool
|
|
11
|
+
if isinstance(value, str) and value.lower() == "true":
|
|
12
|
+
return True
|
|
13
|
+
elif isinstance(value, str) and value.lower() == "false":
|
|
14
|
+
return False
|
|
15
|
+
elif isinstance(value, str) and value.lower() == "none":
|
|
16
|
+
return None
|
|
17
|
+
|
|
18
|
+
# floats/integers
|
|
19
|
+
try:
|
|
20
|
+
val = float(value)
|
|
21
|
+
if val.is_integer():
|
|
22
|
+
return int(val)
|
|
23
|
+
else:
|
|
24
|
+
return float(value)
|
|
25
|
+
except (ValueError, TypeError):
|
|
26
|
+
return value
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BaseConfig(ParserConfig):
|
|
30
|
+
def __init__(self):
|
|
31
|
+
super().__init__(PATH, DEFAULTS, translator)
|
|
32
|
+
|
|
33
|
+
def _set(self, section, key, value):
|
|
34
|
+
super()._set(section, key, value, True)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
BASE_CONFIG = BaseConfig()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
PATH = Path.home() / ".AstroToolkit" / "ATK_aliases.ini"
|
|
4
|
+
|
|
5
|
+
DEFAULTS = {
|
|
6
|
+
"vizier_aliases": {
|
|
7
|
+
"gaia": "I/355/gaiadr3",
|
|
8
|
+
"panstarrs": "II/349/ps1",
|
|
9
|
+
"skymapper": "II/379/smssdr4",
|
|
10
|
+
"galex": "II/335/galex_ais",
|
|
11
|
+
"rosat": "IX/11/rosatsrc",
|
|
12
|
+
"sdss": "V/154/sdss16",
|
|
13
|
+
"wise": "II/311/wise",
|
|
14
|
+
"2mass": "II/246/out",
|
|
15
|
+
"erosita": "J/A+A/682/A34/erass1-m",
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
PATH = Path.home() / ".AstroToolkit" / "ATK_config.ini"
|
|
4
|
+
|
|
5
|
+
DEFAULTS = {
|
|
6
|
+
"global_settings": {"unit_format": "symbol"},
|
|
7
|
+
"plot_settings": {
|
|
8
|
+
"cache_time": 3600,
|
|
9
|
+
"size": 500,
|
|
10
|
+
"backend": "canvas",
|
|
11
|
+
"toolbars": True,
|
|
12
|
+
"grids": True,
|
|
13
|
+
"titles": True,
|
|
14
|
+
"font": "Helvetica",
|
|
15
|
+
"font_size": 14,
|
|
16
|
+
},
|
|
17
|
+
"query_settings": {"query_radius": 3, "image_size": 30, "default_scale": "arcsec"},
|
|
18
|
+
"overlay_settings": {"crossmatch_radius": 5, "simbad_radius": 3},
|
|
19
|
+
"datapage_settings": {"grid_size": 200, "font": "Helvetica", "font_size": 12},
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
CONFIG_KEY_DEFS = {
|
|
24
|
+
"global_settings": {
|
|
25
|
+
"unit_format": "Sets the default format when printing an astropy :class:`~astropy.units.Quantity`, from (symbol, text)."
|
|
26
|
+
},
|
|
27
|
+
"plot_settings": {
|
|
28
|
+
"cache_time": "Sets the duration for which figures (i.e. HTML pages) are cached to the ``~/.AstroToolkit/cached_figures`` directory in seconds.",
|
|
29
|
+
"size": "Sets the default grid size of figures.",
|
|
30
|
+
"backend": "Sets the bokeh output backend (see `here <https://docs.bokeh.org/en/latest/docs/user_guide/output.html>`_)",
|
|
31
|
+
"toolbars": "Enables/Disables toolbars in figures.",
|
|
32
|
+
"grids": "Enables/Disables background grid in figures.",
|
|
33
|
+
"titles": "Enables/Disables figure titles.",
|
|
34
|
+
"font": "Sets the font to use in all figure text.",
|
|
35
|
+
"font_size": "Sets the font size to use in all figure text.",
|
|
36
|
+
},
|
|
37
|
+
"query_settings": {
|
|
38
|
+
"query_radius": "Sets the default ``radius`` in :func:`~ATK.Tools.query`.",
|
|
39
|
+
"image_size": "Sets the default ``size`` in image queries with :func:`~ATK.Tools.query`.",
|
|
40
|
+
"default_scale": "Sets the default positional scale for ``radius`` and ``size`` in :func:`~ATK.Tools.query`.",
|
|
41
|
+
},
|
|
42
|
+
"overlay_settings": {
|
|
43
|
+
"crossmatch_radius": "Radius to use when matching Gaia detections to non-Gaia detections when performing proper motion correction in image overlays.",
|
|
44
|
+
"simbad_radius": "Radius to use in SIMBAD searches for image overlays (e.g. when clicking on detection markers).",
|
|
45
|
+
},
|
|
46
|
+
"datapage_settings": {
|
|
47
|
+
"grid_size": "Size of grid used to scale all figures in **datapage** plotting.",
|
|
48
|
+
"font": "Font to apply to all text in **datapage** figures.",
|
|
49
|
+
"font_size": "Font size to apply to all text in **datapage** figures.",
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
PATH = Path.home() / ".AstroToolkit" / "ATK_epochs.ini"
|
|
4
|
+
|
|
5
|
+
DEFAULTS = {
|
|
6
|
+
"vizier_aliases": {
|
|
7
|
+
"gaia": "2016-01-01T00:00:00.000",
|
|
8
|
+
"panstarrs": "2012-01-01T00:00:00.000",
|
|
9
|
+
"skymapper": "2016-01-01T00:00:00.000",
|
|
10
|
+
"galex": "2006-08-01T00:00:00.000",
|
|
11
|
+
"rosat": "1991-01-01T00:00:00.000",
|
|
12
|
+
"sdss": "2006-01-01T00:00:00.000",
|
|
13
|
+
"wise": "2010-06-01T00:00:00.000",
|
|
14
|
+
"2mass": "1999-01-01T00:00:00.000",
|
|
15
|
+
"erosita": "2022-01-01T00:00:00.000",
|
|
16
|
+
},
|
|
17
|
+
"lightcurve_surveys": {
|
|
18
|
+
"ztf": "2019-01-01T00:00:00.000",
|
|
19
|
+
"gaia": "2016-01-01T00:00:00.000",
|
|
20
|
+
"asassn": "2015-01-01T00:00:00.000",
|
|
21
|
+
"crts": "2008-01-01T00:00:00.000",
|
|
22
|
+
"tess": "2020-01-01T00:00:00.000",
|
|
23
|
+
},
|
|
24
|
+
"spectrum_surveys": {"sdss": "2017-01-01T00:00:00.000", "desi": "2020-01-01T00:00:00.000"},
|
|
25
|
+
"image_surveys": {
|
|
26
|
+
"panstarrs": "2012-01-01T00:00:00.000",
|
|
27
|
+
"skymapper": "2016-01-01T00:00:00.000",
|
|
28
|
+
"dss1": "1955-01-01T00:00:00.000",
|
|
29
|
+
"dss2": "1990-01-01T00:00:00.000",
|
|
30
|
+
"wise": "2010-01-01T00:00:00.000",
|
|
31
|
+
"2mass": "1999-01-01T00:00:00.000",
|
|
32
|
+
"sdss": "2005-01-01T00:00:00.000",
|
|
33
|
+
},
|
|
34
|
+
}
|