roman-snpit-snappl 0.8.0__tar.gz → 0.9.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.
Potentially problematic release.
This version of roman-snpit-snappl might be problematic. Click here for more details.
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.cruft.json +4 -3
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/run_labeler.yml +4 -5
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/run_snappl_tests.yml +10 -1
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/sphinx-deploy.yml +1 -1
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/CITATION.cff +1 -1
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/LICENSE +1 -1
- {roman_snpit_snappl-0.8.0/roman_snpit_snappl.egg-info → roman_snpit_snappl-0.9.0}/PKG-INFO +11 -2
- roman_snpit_snappl-0.9.0/changes/29.feature.rst +1 -0
- roman_snpit_snappl-0.9.0/changes/47.feature.rst +1 -0
- roman_snpit_snappl-0.9.0/changes/49.docs.rst +1 -0
- roman_snpit_snappl-0.9.0/docs/api.rst +15 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/conf.py +34 -3
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/index.rst +1 -1
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/installation.rst +4 -4
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/pyproject.toml +10 -1
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0/roman_snpit_snappl.egg-info}/PKG-INFO +11 -2
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/SOURCES.txt +6 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/requires.txt +9 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/_version.py +3 -3
- roman_snpit_snappl-0.9.0/snappl/diaobject.py +231 -0
- roman_snpit_snappl-0.9.0/snappl/image.py +1127 -0
- roman_snpit_snappl-0.9.0/snappl/imagecollection.py +266 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/psf.py +362 -202
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/sed.py +2 -0
- roman_snpit_snappl-0.9.0/snappl/wcs.py +345 -0
- roman_snpit_snappl-0.8.0/snappl/image.py +0 -615
- roman_snpit_snappl-0.8.0/snappl/wcs.py +0 -180
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/CODEOWNERS +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/ISSUE_TEMPLATE/PR_TEMPLATE.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/dependabot.yml +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/labeler.yml +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/changelog.yml +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/sub_package_update.yml +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.gitignore +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.pre-commit-config.yaml +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/CHANGES.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/CODE_OF_CONDUCT.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/CONTRIBUTING.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/MANIFEST.in +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/README.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/.gitkeep +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/10.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/13.bugfix.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/14.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/15.feature.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/16.feature.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/18.feature.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/20.bugfix.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/23.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/26.feature.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/3.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/31.feature.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/35.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/36.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/37.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/40.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/41.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/43.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/5.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/8.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/changes/9.snappl.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/codespell-ignore.txt +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/Makefile +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/_static/logo_black_filled.png +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/changes.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/make.bat +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/docs/usage.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/experimentation/README.md +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/experimentation/play_with_photutils.py +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/licenses/.DS_Store +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/licenses/LICENSE.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/licenses/README.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/licenses/TEMPLATE_LICENSE.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/dependency_links.txt +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/not-zip-safe +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/top_level.txt +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/setup.cfg +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/setup.py +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/__init__.py +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/_dev/__init__.py +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/_dev/scm_version.py +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/snappl/data/README.rst +0 -0
- {roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/tox.ini +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"template": "https://github.com/Roman-Supernova-PIT/package-template",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "b234ef0121cba44b08e9f9095e1bd66380c043be",
|
|
4
4
|
"checkout": null,
|
|
5
5
|
"context": {
|
|
6
6
|
"cookiecutter": {
|
|
7
7
|
"package_name": "roman_snpit_snappl",
|
|
8
8
|
"module_name": "snappl",
|
|
9
|
+
"github_snpit_repo_name": "snappl",
|
|
9
10
|
"short_description": "Photometry utilities for the Roman SNPIT",
|
|
10
11
|
"author_name": "Roman SN PIT",
|
|
11
12
|
"author_email": "raknop@lbl.gov",
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
"include_github_workflows": "y",
|
|
17
18
|
"_project_url": "https://github.com/Roman-Supernova-PIT",
|
|
18
19
|
"_pit_github_org": "Roman-Supernova-PIT",
|
|
19
|
-
"_pit_name": "Roman
|
|
20
|
+
"_pit_name": "Roman Supernova Project Infrastructure Team",
|
|
20
21
|
"_sphinx_theme": "alabaster",
|
|
21
22
|
"_parent_project": "",
|
|
22
23
|
"install_requires": "",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
".github/"
|
|
28
29
|
],
|
|
29
30
|
"_template": "https://github.com/Roman-Supernova-PIT/package-template",
|
|
30
|
-
"_commit": "
|
|
31
|
+
"_commit": "b234ef0121cba44b08e9f9095e1bd66380c043be"
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
"directory": null
|
|
@@ -15,8 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
steps:
|
|
17
17
|
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
with:
|
|
19
|
+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
20
|
+
sync-labels: true # removes labels when files reverted
|
|
21
|
+
configuration-path: .github/labeler.yml
|
{roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/.github/workflows/run_snappl_tests.yml
RENAMED
|
@@ -33,7 +33,16 @@ jobs:
|
|
|
33
33
|
with:
|
|
34
34
|
repository: Roman-Supernova-PIT/photometry_test_data
|
|
35
35
|
path: photometry_test_data
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
- name: lfs pull photometry test data
|
|
38
|
+
run: |
|
|
39
|
+
git lfs install --local
|
|
40
|
+
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
|
|
41
|
+
git config --local --unset http.${{ github.server_url }}/.extraheader
|
|
42
|
+
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
|
|
43
|
+
git lfs pull
|
|
44
|
+
working-directory: photometry_test_data
|
|
45
|
+
|
|
37
46
|
- name: log into github container registry
|
|
38
47
|
uses: docker/login-action@v3
|
|
39
48
|
with:
|
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
contents: write
|
|
14
14
|
steps:
|
|
15
15
|
- id: deployment
|
|
16
|
-
uses: sphinx-notes/pages@
|
|
16
|
+
uses: sphinx-notes/pages@23ef64097ef9b00d8f71e978bc518ee32ca98651 # v3.2
|
|
17
17
|
with:
|
|
18
18
|
publish: false
|
|
19
19
|
documentation_path: ./docs
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: roman_snpit_snappl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Photometry utilities for the Roman SNPIT
|
|
5
|
-
Author: Roman
|
|
5
|
+
Author: Roman Supernova Project Infrastructure Team
|
|
6
6
|
Maintainer-email: Roman SN PIT <raknop@lbl.gov>
|
|
7
7
|
Project-URL: repository, https://github.com/Roman-Supernova-PIT
|
|
8
8
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -10,6 +10,14 @@ Classifier: Programming Language :: Python
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/x-rst
|
|
12
12
|
License-File: LICENSE
|
|
13
|
+
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: scipy
|
|
15
|
+
Requires-Dist: astropy
|
|
16
|
+
Requires-Dist: photutils
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: h5py
|
|
19
|
+
Requires-Dist: roman-datamodels
|
|
20
|
+
Requires-Dist: snpit_utils
|
|
13
21
|
Requires-Dist: towncrier
|
|
14
22
|
Requires-Dist: setuptools_scm
|
|
15
23
|
Requires-Dist: cruft
|
|
@@ -26,6 +34,7 @@ Requires-Dist: sphinx; extra == "docs"
|
|
|
26
34
|
Requires-Dist: sphinx-automodapi; extra == "docs"
|
|
27
35
|
Requires-Dist: matplotlib; extra == "docs"
|
|
28
36
|
Requires-Dist: sphinx; extra == "docs"
|
|
37
|
+
Requires-Dist: mock; extra == "docs"
|
|
29
38
|
Requires-Dist: tomli; extra == "docs"
|
|
30
39
|
Requires-Dist: graphviz; extra == "docs"
|
|
31
40
|
Dynamic: license-file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Add RomanDatamodelImage, GWCS
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Add DiaObject, ImageFinder, and ImageCollection
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Update code and docs so that API is included in docs
|
|
@@ -16,18 +16,47 @@ import sphinx
|
|
|
16
16
|
|
|
17
17
|
from sphinx.ext.autodoc import AttributeDocumenter
|
|
18
18
|
|
|
19
|
+
# -- Getting docs to build outside the SNPIT docker image --------------------
|
|
20
|
+
|
|
21
|
+
# See section "Previewing your Documentation" in the package template
|
|
22
|
+
# docs. The addition to sys.path is needed to find your module's code
|
|
23
|
+
# if you aren't able to `pip install -e .` your module in a venv. The
|
|
24
|
+
# autodock_mock_imports and/or things_to_mock variable tells Sphinx not
|
|
25
|
+
# to try to import those specific modules.
|
|
26
|
+
|
|
27
|
+
# sys.path.insert( 0, str( pathlib.Path( '..' ).resolve() ) )
|
|
28
|
+
# autodoc_mock_imports = [ 'roman_imsim' ]
|
|
29
|
+
|
|
30
|
+
# ...unfortunately, while autodoc_mock_imports works the autmodule
|
|
31
|
+
# directive, it does not work with the automodapi directive. See
|
|
32
|
+
# https://github.com/astropy/sphinx-automodapi/issues/148
|
|
33
|
+
#
|
|
34
|
+
# So, instead, we do it manually. You will need to add mock to
|
|
35
|
+
# the docs list in [project.optional-dependencies] in pyproject.toml.
|
|
36
|
+
import mock
|
|
37
|
+
things_to_mock = [ 'galsim', 'galsim.roman', 'roman_imsim', 'roman_imsim.utils' ]
|
|
38
|
+
for mod in things_to_mock:
|
|
39
|
+
sys.modules[ mod ] = mock.MagicMock()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
19
43
|
# -- Project information -----------------------------------------------------
|
|
20
44
|
|
|
21
45
|
# to populate metadata from the pyproject.toml file so that changes are picked
|
|
22
46
|
# up for things in the project section of the toml
|
|
23
47
|
with open("../pyproject.toml", "rb") as metadata_file:
|
|
24
|
-
|
|
25
|
-
project =
|
|
48
|
+
pyptoml = tomli.load( metadata_file )
|
|
49
|
+
project = pyptoml['project']['name']
|
|
50
|
+
# In the Roman SNPIT pyproject.tom, the module to include
|
|
51
|
+
# is in tool.setuptools.packages.find.include, which is
|
|
52
|
+
# a list; the first element of the list is the module
|
|
53
|
+
# name, but it ends in a *. Strip that.
|
|
54
|
+
module_name = pyptoml['tool']['setuptools']['packages']['find']['include'][0][:-1]
|
|
26
55
|
author = 'Roman Supernova PIT'
|
|
27
56
|
|
|
28
57
|
copyright = f'{datetime.datetime.today().year}, {author}'
|
|
29
58
|
|
|
30
|
-
package = importlib.import_module(
|
|
59
|
+
package = importlib.import_module(module_name)
|
|
31
60
|
try:
|
|
32
61
|
version = package.__version__.split('-', 1)[0]
|
|
33
62
|
# The full version, including alpha/beta/rc tags.
|
|
@@ -109,6 +138,8 @@ html_theme_options = {
|
|
|
109
138
|
'logo_text_align': "left",
|
|
110
139
|
'description': "Software developed by the Roman SNPIT",
|
|
111
140
|
'sidebar_width':'250px',
|
|
141
|
+
'page_width':'75%',
|
|
142
|
+
'body_max_width':'120ex',
|
|
112
143
|
'show_relbars':True,
|
|
113
144
|
}
|
|
114
145
|
|
|
@@ -32,13 +32,13 @@ You can either clone the public repository:
|
|
|
32
32
|
|
|
33
33
|
.. code-block:: console
|
|
34
34
|
|
|
35
|
-
$ git clone git@github.com:Roman-Supernova-PIT/
|
|
35
|
+
$ git clone git@github.com:Roman-Supernova-PIT/snappl.git
|
|
36
36
|
|
|
37
37
|
Or download the `tarball`_:
|
|
38
38
|
|
|
39
39
|
.. code-block:: console
|
|
40
40
|
|
|
41
|
-
$ curl -OJL https://github.com/Roman-Supernova-PIT/
|
|
41
|
+
$ curl -OJL https://github.com/Roman-Supernova-PIT/snappl/tarball/master
|
|
42
42
|
|
|
43
43
|
Once you have a copy of the source, you can install it with:
|
|
44
44
|
|
|
@@ -54,5 +54,5 @@ If you would like to do an editable install:
|
|
|
54
54
|
$ pip install -e .[docs] # install document build packages during install
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
.. _Github repo: https://github.com/Roman-Supernova-PIT/
|
|
58
|
-
.. _tarball: https://github.com/Roman-Supernova-PIT/
|
|
57
|
+
.. _Github repo: https://github.com/Roman-Supernova-PIT/snappl
|
|
58
|
+
.. _tarball: https://github.com/Roman-Supernova-PIT/snappl/tarball/master
|
|
@@ -3,7 +3,7 @@ name = "roman_snpit_snappl"
|
|
|
3
3
|
description = "Photometry utilities for the Roman SNPIT"
|
|
4
4
|
requires-python = ">=3.11"
|
|
5
5
|
dynamic = ["version"]
|
|
6
|
-
authors = [{ name = "Roman
|
|
6
|
+
authors = [{ name = "Roman Supernova Project Infrastructure Team"}]
|
|
7
7
|
|
|
8
8
|
maintainers = [
|
|
9
9
|
{name = "Roman SN PIT", email = "raknop@lbl.gov"}
|
|
@@ -17,6 +17,14 @@ classifiers = [
|
|
|
17
17
|
"Programming Language :: Python"
|
|
18
18
|
]
|
|
19
19
|
dependencies = [
|
|
20
|
+
"numpy",
|
|
21
|
+
"scipy",
|
|
22
|
+
"astropy",
|
|
23
|
+
"photutils",
|
|
24
|
+
"pandas",
|
|
25
|
+
"h5py",
|
|
26
|
+
"roman-datamodels",
|
|
27
|
+
"snpit_utils",
|
|
20
28
|
"towncrier",
|
|
21
29
|
"setuptools_scm",
|
|
22
30
|
"cruft",
|
|
@@ -48,6 +56,7 @@ docs = [
|
|
|
48
56
|
"sphinx-automodapi",
|
|
49
57
|
"matplotlib",
|
|
50
58
|
"sphinx",
|
|
59
|
+
"mock",
|
|
51
60
|
"tomli",
|
|
52
61
|
"graphviz"
|
|
53
62
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: roman_snpit_snappl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Photometry utilities for the Roman SNPIT
|
|
5
|
-
Author: Roman
|
|
5
|
+
Author: Roman Supernova Project Infrastructure Team
|
|
6
6
|
Maintainer-email: Roman SN PIT <raknop@lbl.gov>
|
|
7
7
|
Project-URL: repository, https://github.com/Roman-Supernova-PIT
|
|
8
8
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -10,6 +10,14 @@ Classifier: Programming Language :: Python
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/x-rst
|
|
12
12
|
License-File: LICENSE
|
|
13
|
+
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: scipy
|
|
15
|
+
Requires-Dist: astropy
|
|
16
|
+
Requires-Dist: photutils
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: h5py
|
|
19
|
+
Requires-Dist: roman-datamodels
|
|
20
|
+
Requires-Dist: snpit_utils
|
|
13
21
|
Requires-Dist: towncrier
|
|
14
22
|
Requires-Dist: setuptools_scm
|
|
15
23
|
Requires-Dist: cruft
|
|
@@ -26,6 +34,7 @@ Requires-Dist: sphinx; extra == "docs"
|
|
|
26
34
|
Requires-Dist: sphinx-automodapi; extra == "docs"
|
|
27
35
|
Requires-Dist: matplotlib; extra == "docs"
|
|
28
36
|
Requires-Dist: sphinx; extra == "docs"
|
|
37
|
+
Requires-Dist: mock; extra == "docs"
|
|
29
38
|
Requires-Dist: tomli; extra == "docs"
|
|
30
39
|
Requires-Dist: graphviz; extra == "docs"
|
|
31
40
|
Dynamic: license-file
|
{roman_snpit_snappl-0.8.0 → roman_snpit_snappl-0.9.0}/roman_snpit_snappl.egg-info/SOURCES.txt
RENAMED
|
@@ -33,6 +33,7 @@ changes/18.feature.rst
|
|
|
33
33
|
changes/20.bugfix.rst
|
|
34
34
|
changes/23.snappl.rst
|
|
35
35
|
changes/26.feature.rst
|
|
36
|
+
changes/29.feature.rst
|
|
36
37
|
changes/3.snappl.rst
|
|
37
38
|
changes/31.feature.rst
|
|
38
39
|
changes/35.snappl.rst
|
|
@@ -41,10 +42,13 @@ changes/37.snappl.rst
|
|
|
41
42
|
changes/40.snappl.rst
|
|
42
43
|
changes/41.snappl.rst
|
|
43
44
|
changes/43.snappl.rst
|
|
45
|
+
changes/47.feature.rst
|
|
46
|
+
changes/49.docs.rst
|
|
44
47
|
changes/5.snappl.rst
|
|
45
48
|
changes/8.snappl.rst
|
|
46
49
|
changes/9.snappl.rst
|
|
47
50
|
docs/Makefile
|
|
51
|
+
docs/api.rst
|
|
48
52
|
docs/changes.rst
|
|
49
53
|
docs/conf.py
|
|
50
54
|
docs/index.rst
|
|
@@ -66,7 +70,9 @@ roman_snpit_snappl.egg-info/requires.txt
|
|
|
66
70
|
roman_snpit_snappl.egg-info/top_level.txt
|
|
67
71
|
snappl/__init__.py
|
|
68
72
|
snappl/_version.py
|
|
73
|
+
snappl/diaobject.py
|
|
69
74
|
snappl/image.py
|
|
75
|
+
snappl/imagecollection.py
|
|
70
76
|
snappl/psf.py
|
|
71
77
|
snappl/sed.py
|
|
72
78
|
snappl/wcs.py
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.9.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 9, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gf264c1a86'
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
__all__ = [ 'DiaObject', 'DiaObjectOU2024', 'DiaObjectManual' ]
|
|
2
|
+
|
|
3
|
+
from snpit_utils.http import retry_post
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DiaObject:
|
|
7
|
+
"""Encapsulate a single supernova (or other transient).
|
|
8
|
+
|
|
9
|
+
Standard properties:
|
|
10
|
+
|
|
11
|
+
ra : ra in degrees (ICRS)
|
|
12
|
+
dec : dec in degrees (ICRS)
|
|
13
|
+
|
|
14
|
+
mjd_discovery : when the object was first discovered; may be None if unknown (float MJD)
|
|
15
|
+
mjd_peak : peak of the object's lightcurve; may be None if unknown (float MJD)
|
|
16
|
+
|
|
17
|
+
mjd_start : MJD when the lightcurve first exists. Definition of this
|
|
18
|
+
is class-dependent; it may be when it was actively
|
|
19
|
+
simulated, but it may be when the lightcurve is above some
|
|
20
|
+
cutoff. May be None if unknown.
|
|
21
|
+
|
|
22
|
+
mjd_end : MJD when the lightcurve stops existing. Definition like
|
|
23
|
+
mjd_start. May be None if unknown.
|
|
24
|
+
|
|
25
|
+
Some subclasses may support additional properties, but use those
|
|
26
|
+
with care, as you are making your code less generral when you use
|
|
27
|
+
them.
|
|
28
|
+
|
|
29
|
+
This is an abstract base class. If you must, instantiate subclass
|
|
30
|
+
objects directly. If you want to find an existing object, use the
|
|
31
|
+
find_objects class method.
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__( self, id=None, ra=None, dec=None, mjd_discovery=None, mjd_peak=None,
|
|
36
|
+
mjd_start=None, mjd_end=None, _called_from_find_objects=False ):
|
|
37
|
+
"""Don't call a DiaObject or subclass constructor. Use DiaOjbect.find_objects."""
|
|
38
|
+
if not _called_from_find_objects:
|
|
39
|
+
raise RuntimeError( "Don't call a DiaObject or subclass constructor. Use DiaObject.find_objects." )
|
|
40
|
+
self.id = id
|
|
41
|
+
self.ra = ra
|
|
42
|
+
self.dec = dec
|
|
43
|
+
self.mjd_discovery = mjd_discovery
|
|
44
|
+
self.mjd_peak = mjd_peak
|
|
45
|
+
self.mjd_start = mjd_start
|
|
46
|
+
self.mjd_end = mjd_end
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def find_objects( cls, collection=None, subset=None, **kwargs ):
|
|
50
|
+
"""Find objects.
|
|
51
|
+
|
|
52
|
+
Parameters
|
|
53
|
+
----------
|
|
54
|
+
collection : str
|
|
55
|
+
Which collection of object to search. Currently only
|
|
56
|
+
"ou2024" and "manuasl" are implemented, but others will be later.
|
|
57
|
+
|
|
58
|
+
subset : str
|
|
59
|
+
Subset of collection to search. Many collections (including
|
|
60
|
+
ou2024) will ignore this.
|
|
61
|
+
|
|
62
|
+
id : <something>
|
|
63
|
+
The ID of the object. Should work as a str. This is an
|
|
64
|
+
opaque thing that will be different for different
|
|
65
|
+
collections.
|
|
66
|
+
|
|
67
|
+
ra: float
|
|
68
|
+
RA in degrees to search.
|
|
69
|
+
|
|
70
|
+
dec: float
|
|
71
|
+
Dec in degrees to search.
|
|
72
|
+
|
|
73
|
+
radius: float, default 1.0
|
|
74
|
+
Radius in arcseconds to search. Ignored unless ra and dec are given.
|
|
75
|
+
|
|
76
|
+
mjd_peak_min, mjd_peak_max: float
|
|
77
|
+
Only return objects whose mjd_peak is between these limits.
|
|
78
|
+
Specify as MJD. Will not return any objects with unknown
|
|
79
|
+
mjd_peak.
|
|
80
|
+
|
|
81
|
+
mjd_discovery_min, mjd_discovery_max: float
|
|
82
|
+
Only return objects whose mjd_discovery is between these
|
|
83
|
+
limits. Specify as MJD. Wil not return any objects with
|
|
84
|
+
unknown mjd_discovery.
|
|
85
|
+
|
|
86
|
+
mjd_start_min, mjd_start_max: float
|
|
87
|
+
|
|
88
|
+
mjd_end_min, mjd_end_max: float
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
list of DiaObject
|
|
94
|
+
|
|
95
|
+
In reality, it will be a list of objects of a subclass of
|
|
96
|
+
DiaObject, but the calling code should not know or depend on
|
|
97
|
+
that, it should treat them all as just DiaObject objects.
|
|
98
|
+
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
if collection == 'ou2024':
|
|
102
|
+
return DiaObjectOU2024._find_objects( subset=subset, **kwargs )
|
|
103
|
+
elif collection == 'manual':
|
|
104
|
+
return DiaObjectManual._find_objects( subset=subset, **kwargs )
|
|
105
|
+
else:
|
|
106
|
+
raise ValueError( f"Unknown collection {collection}" )
|
|
107
|
+
|
|
108
|
+
@classmethod
|
|
109
|
+
def _find_objects( cls, subset=None, **kwargs ):
|
|
110
|
+
raise NotImplementedError( f"{cls.__name__} needs to implement _find_objects" )
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# ======================================================================
|
|
114
|
+
|
|
115
|
+
class DiaObjectOU2024( DiaObject ):
|
|
116
|
+
"""A transient from the OpenUniverse 2024 sims."""
|
|
117
|
+
|
|
118
|
+
def __init__( self, *args, **kwargs ):
|
|
119
|
+
"""Don't call a DiaObject or subclass constructor. Use DiaOjbect.find_objects."""
|
|
120
|
+
super().__init__( *args, **kwargs )
|
|
121
|
+
|
|
122
|
+
# Non-standard fields
|
|
123
|
+
self.host_id = None
|
|
124
|
+
self.gentype = None
|
|
125
|
+
self.model_name = None
|
|
126
|
+
self.start_mjd = None
|
|
127
|
+
self.end_mjd = None
|
|
128
|
+
self.z_cmb = None
|
|
129
|
+
self.mw_ebv = None
|
|
130
|
+
self.mw_extinction_applied = None
|
|
131
|
+
self.av = None
|
|
132
|
+
self.rv = None
|
|
133
|
+
self.v_pec = None
|
|
134
|
+
self.host_ra = None
|
|
135
|
+
self.host_dec = None
|
|
136
|
+
self.host_mag_g = None
|
|
137
|
+
self.host_mag_i = None
|
|
138
|
+
self.host_mag_f = None
|
|
139
|
+
self.host_sn_sep = None
|
|
140
|
+
self.peak_mag_g = None
|
|
141
|
+
self.peak_mag_i = None
|
|
142
|
+
self.peak_mag_f = None
|
|
143
|
+
self.lens_dmu = None
|
|
144
|
+
self.lens_dmu_applied = None
|
|
145
|
+
self.model_params = None
|
|
146
|
+
|
|
147
|
+
@classmethod
|
|
148
|
+
def _find_objects( cls, subset=None,
|
|
149
|
+
id=None,
|
|
150
|
+
ra=None,
|
|
151
|
+
dec=None,
|
|
152
|
+
radius=1.0,
|
|
153
|
+
mjd_peak_min=None,
|
|
154
|
+
mjd_peak_max=None,
|
|
155
|
+
mjd_discovery_min=None,
|
|
156
|
+
mjd_discovery_max=None,
|
|
157
|
+
mjd_start_min=None,
|
|
158
|
+
mjd_start_max=None,
|
|
159
|
+
mjd_end_min=None,
|
|
160
|
+
mjd_end_max=None,
|
|
161
|
+
):
|
|
162
|
+
if any( i is not None for i in [ mjd_peak_min, mjd_peak_max, mjd_discovery_min, mjd_discovery_max ] ):
|
|
163
|
+
raise NotImplementedError( "DiaObjectOU2024 doesn't support searching on mjd_peak or mjd_discovery" )
|
|
164
|
+
|
|
165
|
+
params = {}
|
|
166
|
+
|
|
167
|
+
if ( ra is None ) != ( dec is None ):
|
|
168
|
+
raise ValueError( "Pass both or neither of ra/dec, not just one." )
|
|
169
|
+
|
|
170
|
+
if ra is not None:
|
|
171
|
+
if radius is None:
|
|
172
|
+
raise ValueError( "ra/dec requires a radius" )
|
|
173
|
+
params['ra'] = float( ra )
|
|
174
|
+
params['dec'] = float( dec )
|
|
175
|
+
params['radius'] = float( radius )
|
|
176
|
+
|
|
177
|
+
if id is not None:
|
|
178
|
+
params['id'] = int( id )
|
|
179
|
+
|
|
180
|
+
if mjd_start_min is not None:
|
|
181
|
+
params['mjd_start_min'] = float( mjd_start_min )
|
|
182
|
+
|
|
183
|
+
if mjd_start_max is not None:
|
|
184
|
+
params['mjd_start_max'] = float( mjd_start_max )
|
|
185
|
+
|
|
186
|
+
if mjd_end_min is not None:
|
|
187
|
+
params['mjd_end_min'] = float( mjd_end_min )
|
|
188
|
+
|
|
189
|
+
if mjd_end_min is not None:
|
|
190
|
+
params['mjd_end_max'] = float( mjd_end_max )
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
res = retry_post( 'https://roman-desc-simdex.lbl.gov/findtransients', json=params )
|
|
194
|
+
objinfo = res.json()
|
|
195
|
+
|
|
196
|
+
diaobjects = []
|
|
197
|
+
for i in range( len( objinfo['id'] ) ):
|
|
198
|
+
diaobj = DiaObjectOU2024( id=objinfo['id'][i],
|
|
199
|
+
ra=objinfo['ra'][i],
|
|
200
|
+
dec=objinfo['dec'][i],
|
|
201
|
+
mjd_peak=objinfo['peak_mjd'][i],
|
|
202
|
+
mjd_start=objinfo['start_mjd'][i],
|
|
203
|
+
mjd_end=objinfo['end_mjd'][i],
|
|
204
|
+
_called_from_find_objects=True
|
|
205
|
+
)
|
|
206
|
+
for prop in ( [ 'healpix', 'host_id', 'gentype', 'model_name', 'z_cmb', 'mw_ebv', 'mw_extinction_applied',
|
|
207
|
+
'av', 'rv', 'v_pec', 'host_ra', 'host_dec', 'host_mag_g', 'host_mag_i', 'host_mag_f',
|
|
208
|
+
'host_sn_sep', 'peak_mag_g', 'peak_mag_i', 'peak_mag_f', 'lens_dmu',
|
|
209
|
+
'lens_dmu_applied', 'model_params' ] ):
|
|
210
|
+
setattr( diaobj, prop, objinfo[prop][i] )
|
|
211
|
+
diaobjects.append( diaobj )
|
|
212
|
+
|
|
213
|
+
return diaobjects
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
# ======================================================================
|
|
217
|
+
|
|
218
|
+
class DiaObjectManual( DiaObject ):
|
|
219
|
+
"""A manually-specified object that's not saved anywhere."""
|
|
220
|
+
|
|
221
|
+
def __init__( self, *args, **kwargs ):
|
|
222
|
+
"""Don't call a DiaObject or subclass constructor. Use DiaOjbect.find_objects."""
|
|
223
|
+
super().__init__( *args, **kwargs )
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
@classmethod
|
|
227
|
+
def _find_objects( cls, collection=None, subset=None, **kwargs ):
|
|
228
|
+
if any( ( i not in kwargs ) or ( kwargs[i] is None ) for i in ('id', 'ra', 'dec') ):
|
|
229
|
+
raise ValueError( "finding a manual DiaObject requires all of id, ra, and dec" )
|
|
230
|
+
|
|
231
|
+
return [ DiaObjectManual( _called_from_find_objects=True, **kwargs ) ]
|