roman-gladius 0.1.0a2__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.
- roman_gladius-0.1.0a2/.env.example +5 -0
- roman_gladius-0.1.0a2/.pre-commit-config.yaml +15 -0
- roman_gladius-0.1.0a2/.ruff.toml +5 -0
- roman_gladius-0.1.0a2/AI_POLICY.md +12 -0
- roman_gladius-0.1.0a2/CHANGES.rst +58 -0
- roman_gladius-0.1.0a2/CITATION.cff +8 -0
- roman_gladius-0.1.0a2/CODE_OF_CONDUCT.md +15 -0
- roman_gladius-0.1.0a2/CONTRIBUTING.md +19 -0
- roman_gladius-0.1.0a2/LICENSE.txt +30 -0
- roman_gladius-0.1.0a2/MANIFEST.in +19 -0
- roman_gladius-0.1.0a2/NOTICE.md +33 -0
- roman_gladius-0.1.0a2/PKG-INFO +311 -0
- roman_gladius-0.1.0a2/README.md +260 -0
- roman_gladius-0.1.0a2/TEMPLATE.json +14 -0
- roman_gladius-0.1.0a2/TESTING.md +60 -0
- roman_gladius-0.1.0a2/THIRD_PARTY.md +27 -0
- roman_gladius-0.1.0a2/docs/README.md +11 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-animation.gif +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-colour-composite.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-cutout-1.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-cutout-2.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-parent-1.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-parent-2.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/demo-stack.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/examples/gui.jpg +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/DM-Mono-LICENSE.txt +93 -0
- roman_gladius-0.1.0a2/docs/_static/family/Lato-LICENSE.txt +93 -0
- roman_gladius-0.1.0a2/docs/_static/family/README.txt +1 -0
- roman_gladius-0.1.0a2/docs/_static/family/Roboto-Slab-LICENSE.txt +202 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-0.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-1.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-2.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-3.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-4.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-font-5.ttf +0 -0
- roman_gladius-0.1.0a2/docs/_static/family/family-theme.js +14 -0
- roman_gladius-0.1.0a2/docs/_static/family/family.css +209 -0
- roman_gladius-0.1.0a2/docs/_static/family/fonts.css +42 -0
- roman_gladius-0.1.0a2/docs/_static/gladius-emblem.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/gladius-logo.png +0 -0
- roman_gladius-0.1.0a2/docs/_static/gladius.css +27 -0
- roman_gladius-0.1.0a2/docs/api.rst +166 -0
- roman_gladius-0.1.0a2/docs/conf.py +25 -0
- roman_gladius-0.1.0a2/docs/config.schema.json +475 -0
- roman_gladius-0.1.0a2/docs/configuration.md +522 -0
- roman_gladius-0.1.0a2/docs/headers.md +296 -0
- roman_gladius-0.1.0a2/docs/index.md +59 -0
- roman_gladius-0.1.0a2/docs/products.md +359 -0
- roman_gladius-0.1.0a2/docs/quickstart.md +184 -0
- roman_gladius-0.1.0a2/docs/science.md +266 -0
- roman_gladius-0.1.0a2/examples/config.yaml +57 -0
- roman_gladius-0.1.0a2/examples/targets.csv +2 -0
- roman_gladius-0.1.0a2/licenses/STSCI_TEMPLATE_LICENSE.txt +30 -0
- roman_gladius-0.1.0a2/notebooks/README.md +33 -0
- roman_gladius-0.1.0a2/notebooks/nexus_cutouts.ipynb +379 -0
- roman_gladius-0.1.0a2/pyproject.toml +49 -0
- roman_gladius-0.1.0a2/setup.cfg +4 -0
- roman_gladius-0.1.0a2/src/gladius/__init__.py +15 -0
- roman_gladius-0.1.0a2/src/gladius/__main__.py +3 -0
- roman_gladius-0.1.0a2/src/gladius/cli.py +143 -0
- roman_gladius-0.1.0a2/src/gladius/config.py +252 -0
- roman_gladius-0.1.0a2/src/gladius/core.py +213 -0
- roman_gladius-0.1.0a2/src/gladius/data/example.yaml +57 -0
- roman_gladius-0.1.0a2/src/gladius/demo.py +112 -0
- roman_gladius-0.1.0a2/src/gladius/environment.py +45 -0
- roman_gladius-0.1.0a2/src/gladius/inputs.py +252 -0
- roman_gladius-0.1.0a2/src/gladius/io.py +436 -0
- roman_gladius-0.1.0a2/src/gladius/pipeline.py +297 -0
- roman_gladius-0.1.0a2/src/gladius/py.typed +0 -0
- roman_gladius-0.1.0a2/src/gladius/quality.py +66 -0
- roman_gladius-0.1.0a2/src/gladius/stacks.py +320 -0
- roman_gladius-0.1.0a2/src/gladius/targets.py +113 -0
- roman_gladius-0.1.0a2/src/gladius/web.py +386 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/dependencies.html +256 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/dependency-licenses.txt +5477 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/DM-Mono-LICENSE.txt +93 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/Lato-LICENSE.txt +93 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/README.txt +1 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/Roboto-Slab-LICENSE.txt +202 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-0.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-1.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-2.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-3.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-4.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-font-5.ttf +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family-theme.js +14 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/family.css +185 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/family/fonts.css +42 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/gladius-emblem.png +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/gladius-logo.png +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/index.html +1423 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/license.txt +30 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/notices.txt +33 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/rges-pit.png +0 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/theme.css +58 -0
- roman_gladius-0.1.0a2/src/gladius/web_assets/theme.js +41 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/PKG-INFO +311 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/SOURCES.txt +118 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/dependency_links.txt +1 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/entry_points.txt +2 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/requires.txt +37 -0
- roman_gladius-0.1.0a2/src/roman_gladius.egg-info/top_level.txt +1 -0
- roman_gladius-0.1.0a2/tests/conftest.py +32 -0
- roman_gladius-0.1.0a2/tests/integration/test_mast_live.py +198 -0
- roman_gladius-0.1.0a2/tests/test_cli_setup.py +105 -0
- roman_gladius-0.1.0a2/tests/test_config.py +86 -0
- roman_gladius-0.1.0a2/tests/test_core.py +84 -0
- roman_gladius-0.1.0a2/tests/test_environment.py +48 -0
- roman_gladius-0.1.0a2/tests/test_gladius.py +10 -0
- roman_gladius-0.1.0a2/tests/test_inputs.py +179 -0
- roman_gladius-0.1.0a2/tests/test_notebooks.py +58 -0
- roman_gladius-0.1.0a2/tests/test_pipeline.py +272 -0
- roman_gladius-0.1.0a2/tests/test_products.py +109 -0
- roman_gladius-0.1.0a2/tests/test_quality.py +18 -0
- roman_gladius-0.1.0a2/tests/test_roman_datamodel.py +49 -0
- roman_gladius-0.1.0a2/tests/test_targets.py +80 -0
- roman_gladius-0.1.0a2/tests/test_web.py +311 -0
- roman_gladius-0.1.0a2/tools/build_doc_examples.py +132 -0
- roman_gladius-0.1.0a2/tools/check_distribution.py +50 -0
- roman_gladius-0.1.0a2/tox.ini +7 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Copy this file to .env and paste your MAST token after the equals sign.
|
|
2
|
+
# GUI: put .env in the --workspace directory, then restart the server.
|
|
3
|
+
# CLI: put .env beside the YAML passed to gladius run.
|
|
4
|
+
# Existing environment values take precedence. Do not commit your .env.
|
|
5
|
+
MAST_API_TOKEN=
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks:
|
|
4
|
+
- id: ruff
|
|
5
|
+
name: Ruff
|
|
6
|
+
entry: python -m ruff check
|
|
7
|
+
language: system
|
|
8
|
+
types: [python]
|
|
9
|
+
files: ^(src|tests|docs/conf.py)
|
|
10
|
+
- id: ruff-format
|
|
11
|
+
name: Ruff format
|
|
12
|
+
entry: python -m ruff format --check
|
|
13
|
+
language: system
|
|
14
|
+
types: [python]
|
|
15
|
+
files: ^(src|tests|docs/conf.py)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AI-assisted development
|
|
2
|
+
|
|
3
|
+
The initial package was developed with OpenAI Codex assistance at the maintainer's
|
|
4
|
+
request. This includes source, tests and documentation. Human maintainers remain
|
|
5
|
+
responsible for scientific correctness, licensing, explanations and releases.
|
|
6
|
+
Synthetic automated tests are evidence of behavior, not a replacement for review
|
|
7
|
+
of scientific assumptions or validation on representative Roman data.
|
|
8
|
+
|
|
9
|
+
Contributors should disclose substantial AI assistance in proposed changes and
|
|
10
|
+
be able to explain and maintain all submitted material. A human other than the
|
|
11
|
+
contributor should review changes before a public release. Do not submit private
|
|
12
|
+
data or third-party code to tools without appropriate authorization.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
0.1.0a2 (unreleased)
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
* Add ``gladius token`` with hidden input and private dotenv persistence, explicit
|
|
5
|
+
``--env-file`` selection, and a real-data ``gladius demo mast-demo`` command
|
|
6
|
+
with an advertised parent-size preflight and reusable YAML.
|
|
7
|
+
* Add Read the Docs build configuration, branded light/dark documentation and a
|
|
8
|
+
getting-started guide. Add a separate real-MAST Nexus notebook requiring an
|
|
9
|
+
explicit credential-file path; notebook outputs are excluded from distributions.
|
|
10
|
+
* Exclude internal handoff material from distributions, enforce archive content
|
|
11
|
+
checks in CI, and fix minimal-dependency
|
|
12
|
+
and Windows validation failures.
|
|
13
|
+
* Load local .env credentials at CLI/GUI startup without overriding shell values,
|
|
14
|
+
and document local MAST authentication in the GUI and configuration guide.
|
|
15
|
+
* Add a real-MAST GUI test preset, Galactic/ecliptic input conversion, zero/unlimited
|
|
16
|
+
stack limits, context-sensitive help, and icon-only theme controls.
|
|
17
|
+
* Rename the project to Gladius, distribution roman-gladius, import gladius
|
|
18
|
+
and CLI gladius.
|
|
19
|
+
* Add an opt-in authenticated live MAST download workflow with a 20 MiB cap,
|
|
20
|
+
generated-query checks, cleanup checks and explicit image/associated-product coverage.
|
|
21
|
+
* Add a bundled loopback web GUI with target CSV upload, configuration builder,
|
|
22
|
+
YAML import/export, run button and live progress.
|
|
23
|
+
* Generate target-based Roman MAST searches with calibrated Level 2 defaults,
|
|
24
|
+
configurable cone radius, query-level selections and deduplicated observations.
|
|
25
|
+
Require Astroquery 0.4.11 for Roman support and report archive authorization errors.
|
|
26
|
+
* Document direct Python configuration/run calls and export Target/CSV helpers.
|
|
27
|
+
* Add --targets CSV overrides for run and validate; preserve catalogue columns
|
|
28
|
+
as target metadata and embed imported targets in resolved configurations.
|
|
29
|
+
|
|
30
|
+
0.1.0a1 (unreleased)
|
|
31
|
+
===================
|
|
32
|
+
|
|
33
|
+
* Generate an independent package scaffold from the pinned STScI template.
|
|
34
|
+
* Add validated YAML, native SCI/ERR/DQ extraction, parent metadata retention,
|
|
35
|
+
exact astrometry translation, derived ASDF/FITS formats and checksum-based resume.
|
|
36
|
+
* Add local and optional Roman MAST inputs, supplied corrected GWCS support,
|
|
37
|
+
provisional autocorrelation screening and bounded display median stacks.
|
|
38
|
+
* Add offline examples, scientific regression tests, documentation and CI.
|
|
39
|
+
|
|
40
|
+
* Fix missing display-stack edge pixels caused by numerical WCS roundtrip errors.
|
|
41
|
+
Real off-image coordinates remain excluded. Increase the synthetic demo's
|
|
42
|
+
Gaussian background noise so its effect on the two-exposure median is visible.
|
|
43
|
+
|
|
44
|
+
* Add optional, timestamped GIF previews of sky-aligned exposures, with a shared
|
|
45
|
+
brightness stretch and configurable playback duration, independently of median
|
|
46
|
+
stacks. Add GUI controls, YAML settings and a synthetic documentation example.
|
|
47
|
+
|
|
48
|
+
* Add optional RGB colour composites with configurable channel filters, one
|
|
49
|
+
common sky grid, per-filter medians and independent Astropy z-scale display
|
|
50
|
+
limits, following the ICE dashboard's normalization approach. Record inputs,
|
|
51
|
+
display settings and missing-filter skips in the stack manifest.
|
|
52
|
+
|
|
53
|
+
* Support the GUI behind Jupyter Server Proxy with relative asset/API paths,
|
|
54
|
+
configured public origins, automatic JupyterHub URL detection, and --nexus /
|
|
55
|
+
--public-url launch options. Print named-server-aware browser links at startup.
|
|
56
|
+
|
|
57
|
+
* Use ``gladius`` as the Python import and CLI name, and ``roman-gladius`` as
|
|
58
|
+
the PyPI distribution name (normalized to ``roman_gladius`` in wheel filenames).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Code of conduct
|
|
2
|
+
|
|
3
|
+
We welcome contributors of every background and experience level. Be respectful,
|
|
4
|
+
assume good intent, give evidence-based technical feedback, and credit others'
|
|
5
|
+
work. Harassment, threats, discrimination and disclosure of private information
|
|
6
|
+
are unacceptable in project discussions, reviews or events.
|
|
7
|
+
|
|
8
|
+
Maintainers may moderate or remove inappropriate contributions and restrict
|
|
9
|
+
participation after considering the context and impact. Report concerns privately
|
|
10
|
+
to a maintainer through the project's hosting platform; do not post sensitive
|
|
11
|
+
reports publicly. A dedicated private reporting contact must be established when
|
|
12
|
+
the project opens to external contributors.
|
|
13
|
+
|
|
14
|
+
Adapted from the STScI package template's community guidance; see NOTICE.md and
|
|
15
|
+
the retained template license. This is an independent project policy.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Create a virtual environment and install `python -m pip install -e '.[dev,roman,mast]'`.
|
|
4
|
+
Run pytest, Ruff and the Sphinx documentation build before proposing changes.
|
|
5
|
+
TESTING.md describes the supported verification steps and their limits.
|
|
6
|
+
|
|
7
|
+
Keep extraction independent of services and UI. Add scientific regression tests
|
|
8
|
+
for changes to centering, flags, timing, GWCS, metadata and serialization. Document
|
|
9
|
+
new configuration keys and regenerate docs/config.schema.json. Changes to product
|
|
10
|
+
semantics require a schema/version decision and migration notes in CHANGES.rst.
|
|
11
|
+
Do not edit historical snapshots as if they were the active implementation.
|
|
12
|
+
|
|
13
|
+
Report bugs with package/dependency versions, a small redistributable example and
|
|
14
|
+
the resolved configuration. Remove credentials and private data before sharing.
|
|
15
|
+
Do not add external solver code without an explicit compatible license and
|
|
16
|
+
attribution. Contributions must follow CODE_OF_CONDUCT.md and AI_POLICY.md.
|
|
17
|
+
|
|
18
|
+
There is no hosted repository configured yet. When one is established, use its
|
|
19
|
+
issue tracker and pull requests; this file deliberately does not invent a URL.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gladius contributors
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following
|
|
13
|
+
disclaimer in the documentation and/or other materials provided
|
|
14
|
+
with the distribution.
|
|
15
|
+
|
|
16
|
+
3. The names of the copyright holders and contributors may not be used to
|
|
17
|
+
endorse or promote products derived from this software without
|
|
18
|
+
specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
21
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
22
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
24
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
25
|
+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
26
|
+
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
27
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|
28
|
+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
29
|
+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
30
|
+
DAMAGE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
include README.md LICENSE.txt NOTICE.md THIRD_PARTY.md TEMPLATE.json CITATION.cff CHANGES.rst
|
|
2
|
+
include .env.example
|
|
3
|
+
recursive-include tools *.py
|
|
4
|
+
include CONTRIBUTING.md CODE_OF_CONDUCT.md AI_POLICY.md TESTING.md tox.ini .ruff.toml .pre-commit-config.yaml
|
|
5
|
+
recursive-include licenses *.txt
|
|
6
|
+
recursive-include src *.py *.typed *.yaml *.html *.css *.js *.png *.txt *.ttf
|
|
7
|
+
recursive-include tests *.py
|
|
8
|
+
recursive-include docs *.md *.rst *.py *.json *.css *.png *.jpg *.gif *.js *.ttf *.txt
|
|
9
|
+
recursive-include notebooks *.md *.ipynb
|
|
10
|
+
recursive-include examples *.yaml *.csv
|
|
11
|
+
prune local-snapshot
|
|
12
|
+
prune nexus-snapshot
|
|
13
|
+
prune .agents
|
|
14
|
+
prune .gladius-gui
|
|
15
|
+
prune .github
|
|
16
|
+
prune docs/_build
|
|
17
|
+
exclude nexus-source-snapshot.zip
|
|
18
|
+
exclude docs/commissioning-handoff.md
|
|
19
|
+
global-exclude __pycache__ *.py[cod] .DS_Store
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Attribution and license scope
|
|
2
|
+
|
|
3
|
+
The new installable package under src/gladius, its tests and project
|
|
4
|
+
documentation are licensed under BSD-3-Clause (LICENSE.txt). The distribution is
|
|
5
|
+
independent: no Astropy affiliation, STScI ownership or institutional endorsement
|
|
6
|
+
is claimed. The contributor copyright label does not override any underlying
|
|
7
|
+
rights held by contributors or their employers.
|
|
8
|
+
|
|
9
|
+
The scaffold was generated with Cookiecutter from the STScI package template.
|
|
10
|
+
TEMPLATE.json records its exact commit and options. The original boilerplate
|
|
11
|
+
license is retained in licenses/STSCI_TEMPLATE_LICENSE.txt. Institutional
|
|
12
|
+
branding and project-specific administrative workflows were adapted or removed.
|
|
13
|
+
|
|
14
|
+
The native geometry convention was adapted from the commissioning extraction
|
|
15
|
+
helper supplied with this project. The new autocorrelation implementation is
|
|
16
|
+
independent and does not import roman_ice_sim or assert identical metrics.
|
|
17
|
+
|
|
18
|
+
local-snapshot/, nexus-snapshot/, nexus-source-snapshot.zip and .agents/ are
|
|
19
|
+
historical/reference or working material and are excluded from built packages.
|
|
20
|
+
This package license does not relicense those collections. In particular,
|
|
21
|
+
nexus-snapshot/external_reference/gaia_wcs_correction.py is not distributed or
|
|
22
|
+
imported by the package; its separate ownership/licensing remains unresolved.
|
|
23
|
+
No external Gaia solving code was incorporated.
|
|
24
|
+
|
|
25
|
+
The Gladius logo drafts in assets/brand were generated from the user-supplied
|
|
26
|
+
concept. The bundled RGES-PIT logo was supplied through the team's local website
|
|
27
|
+
source. Project branding retains its respective ownership; the package's BSD
|
|
28
|
+
license is not a grant of rights to RGES-PIT names or logos.
|
|
29
|
+
|
|
30
|
+
Direct runtime dependency acknowledgements are recorded in THIRD_PARTY.md and
|
|
31
|
+
the GUI Dependencies & acknowledgements page. Reviewed dependency license texts
|
|
32
|
+
identify their corresponding versions; they do not replace notices provided by
|
|
33
|
+
the dependencies installed or redistributed with a particular environment.
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: roman-gladius
|
|
3
|
+
Version: 0.1.0a2
|
|
4
|
+
Summary: Native Roman detector cutouts with parent metadata and explicit astrometry provenance
|
|
5
|
+
Author: Gladius contributors
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/AmberLee2427/gladius
|
|
8
|
+
Project-URL: Repository, https://github.com/AmberLee2427/gladius
|
|
9
|
+
Project-URL: Issues, https://github.com/AmberLee2427/gladius/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE.txt
|
|
17
|
+
License-File: NOTICE.md
|
|
18
|
+
License-File: licenses/STSCI_TEMPLATE_LICENSE.txt
|
|
19
|
+
Requires-Dist: numpy>=1.24
|
|
20
|
+
Requires-Dist: astropy>=6
|
|
21
|
+
Requires-Dist: asdf>=4.1
|
|
22
|
+
Requires-Dist: asdf-astropy>=0.6
|
|
23
|
+
Requires-Dist: gwcs>=0.21
|
|
24
|
+
Requires-Dist: scipy>=1.10
|
|
25
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
26
|
+
Requires-Dist: PyYAML>=6
|
|
27
|
+
Requires-Dist: filelock>=3.12
|
|
28
|
+
Requires-Dist: python-dotenv>=1.0
|
|
29
|
+
Requires-Dist: Pillow>=10
|
|
30
|
+
Provides-Extra: roman
|
|
31
|
+
Requires-Dist: roman_datamodels>=0.25; extra == "roman"
|
|
32
|
+
Provides-Extra: mast
|
|
33
|
+
Requires-Dist: astroquery>=0.4.11; extra == "mast"
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
36
|
+
Requires-Dist: pytest-cov>=4; extra == "test"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: sphinx>=7; extra == "docs"
|
|
39
|
+
Requires-Dist: myst-parser>=2; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-rtd-theme>=3; extra == "docs"
|
|
41
|
+
Provides-Extra: notebook
|
|
42
|
+
Requires-Dist: ipykernel>=6; extra == "notebook"
|
|
43
|
+
Requires-Dist: matplotlib>=3.8; extra == "notebook"
|
|
44
|
+
Provides-Extra: dev
|
|
45
|
+
Requires-Dist: roman-gladius[docs,test]; extra == "dev"
|
|
46
|
+
Requires-Dist: ruff>=0.9; extra == "dev"
|
|
47
|
+
Requires-Dist: build>=1; extra == "dev"
|
|
48
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
49
|
+
Requires-Dist: tox>=4; extra == "dev"
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
|
|
52
|
+
# Gladius
|
|
53
|
+
|
|
54
|
+
Native image cutouts for the Roman Space Telescope.
|
|
55
|
+
|
|
56
|
+
Python import and command: `gladius`. Distribution name: `roman-gladius`
|
|
57
|
+
(`roman_gladius` is the equivalent PyPI spelling).
|
|
58
|
+
|
|
59
|
+
Native detector cutouts from calibrated Roman images, with explicit parent-pixel
|
|
60
|
+
mapping, separately retained parent metadata, exact stored astrometry, and optional
|
|
61
|
+
display stacks. An independent alpha package built from the STScI Cookiecutter
|
|
62
|
+
scaffold; it is not affiliated with or endorsed by STScI or Astropy.
|
|
63
|
+
|
|
64
|
+
## Install and run
|
|
65
|
+
|
|
66
|
+
Python 3.11 or newer and Git are required. Gladius is not yet on PyPI; install
|
|
67
|
+
from the public repository:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
git clone https://github.com/AmberLee2427/gladius.git gladius
|
|
71
|
+
cd gladius
|
|
72
|
+
python -m venv .venv
|
|
73
|
+
source .venv/bin/activate
|
|
74
|
+
python -m pip install -e '.[roman,mast]'
|
|
75
|
+
gladius gui --workspace .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
On Windows, activate with `.venv\Scripts\activate` instead. Open the printed
|
|
79
|
+
GUI URL to add targets, choose images and processing, and download a YAML file or
|
|
80
|
+
make cutouts. For the manual YAML workflow:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
gladius init-config config.yaml
|
|
84
|
+
# Edit targets and inputs in config.yaml.
|
|
85
|
+
gladius validate config.yaml
|
|
86
|
+
gladius run config.yaml
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For archive access, set `inputs.mode: mast`. Searches use your targets by default;
|
|
90
|
+
`mast_criteria` adds optional archive constraints. Restricted data use
|
|
91
|
+
`MAST_API_TOKEN` from the environment.
|
|
92
|
+
Directory mode does not perform archive queries or downloads.
|
|
93
|
+
|
|
94
|
+
Try a complete offline example with no credentials or mission data:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
gladius demo /tmp/my-gladius-demo
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
This creates two synthetic ASDF exposures, a YAML file, native ASDF/FITS cutouts,
|
|
101
|
+
a display stack, an exposure GIF, a resolved configuration and a run manifest. Choose a new demo
|
|
102
|
+
folder; existing demo inputs are not overwritten.
|
|
103
|
+
|
|
104
|
+
Or, with the `roman` and `mast` extras installed, try a real archive image.
|
|
105
|
+
First sign in at the [MAST token page](https://auth.mast.stsci.edu/tokens), create
|
|
106
|
+
an API token, and copy it for the hidden prompt below. The token identifies your
|
|
107
|
+
account; restricted observations still require permission for that account:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
gladius token # Hidden prompt; saves MAST_API_TOKEN in .env here.
|
|
111
|
+
gladius demo mast-demo # Queries MAST, downloads one parent, and makes cutouts.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The MAST demo writes `mast-demo/demo.yaml` and ASDF/FITS cutouts under
|
|
115
|
+
`mast-demo/output/`. It rejects parents advertised above 512 MiB before download;
|
|
116
|
+
use `--max-parent-mib` to change that limit. It uses an explicit 0.01-pixel WCS
|
|
117
|
+
round-trip tolerance and makes no display stack. See the
|
|
118
|
+
[real-data quickstart](docs/quickstart.md#try-one-real-image-from-mast).
|
|
119
|
+
|
|
120
|
+
## Configuration
|
|
121
|
+
|
|
122
|
+
[examples/config.yaml](examples/config.yaml) documents every option. Paths are
|
|
123
|
+
relative to the configuration file. Unknown keys, duplicate YAML keys, invalid
|
|
124
|
+
coordinates and inconsistent settings are rejected before input discovery.
|
|
125
|
+
`gladius config-schema schema.json` writes JSON Schema for editor support.
|
|
126
|
+
|
|
127
|
+
- Select exposure-start dates in a UTC `[start, end)` interval, detectors 1–18,
|
|
128
|
+
and filters. Empty detector/filter lists mean all; missing metadata needed for
|
|
129
|
+
a requested selection causes an explicit error.
|
|
130
|
+
- Choose square cutout size, padding/strict edges and fully off-detector policy.
|
|
131
|
+
- Use supplied WCS, validate its numerical consistency, or require a separately
|
|
132
|
+
supplied corrected GWCS. Validation does **not** establish absolute sky accuracy.
|
|
133
|
+
- Enable an autocorrelation elongation screen and decide whether failures enter
|
|
134
|
+
display stacks. Native cutouts remain available regardless of quality flags.
|
|
135
|
+
- Retain full parent images or keep only their derived products. Local input
|
|
136
|
+
files are never deleted. Archive parents are staged one at a time.
|
|
137
|
+
- Create median display stacks, exposure GIFs and configurable false-colour composites.
|
|
138
|
+
- Choose ASDF, FITS or both; configure bounded display stacks, resume and failure
|
|
139
|
+
handling. Resolved defaults and dependency versions are recorded for each run.
|
|
140
|
+
|
|
141
|
+
See [configuration](docs/configuration.md), [outputs](docs/products.md),
|
|
142
|
+
[scientific conventions](docs/science.md), and [Python API](docs/api.rst).
|
|
143
|
+
|
|
144
|
+
## Scientific contract
|
|
145
|
+
|
|
146
|
+
SCI and ERR are unresampled floating-point pixels with NaN padding. DQ flags stay
|
|
147
|
+
integer; missing pixels are DO_NOT_USE (1), and existing saturation flags survive.
|
|
148
|
+
Centering follows the commissioning convention `floor(position) - (size - 1)//2`,
|
|
149
|
+
including odd sizes. Coordinates are zero-based `(x, y)` on the calibrated SCI
|
|
150
|
+
array, with `array[y, x]` indexing. Origins can be negative.
|
|
151
|
+
|
|
152
|
+
The cutout WCS is a translation of the chosen parent WCS. The original WCS and
|
|
153
|
+
metadata are retained under `parent_wcs` and `parent_metadata`; derived footprints
|
|
154
|
+
are in `cutout_metadata`. Spatial arrays are cropped using the shared mapping,
|
|
155
|
+
with descriptors recording their original paths, shapes and types. Non-spatial
|
|
156
|
+
metadata arrays and custom fields are retained, including FITS header ordering,
|
|
157
|
+
comments and duplicate HISTORY cards.
|
|
158
|
+
|
|
159
|
+
ASDF stores the exact GWCS. FITS provides SCI/ERR/DQ extensions, a measured TAN-SIP
|
|
160
|
+
approximation where necessary, auxiliary arrays and a package-specific ASDFMETA
|
|
161
|
+
extension retaining full metadata and exact WCS. These are **derived products**,
|
|
162
|
+
not schema-valid Roman mission datamodels. Read them with `read_cutout`.
|
|
163
|
+
|
|
164
|
+
## Current boundaries
|
|
165
|
+
|
|
166
|
+
The first version handles 2D calibrated detector images, not raw ramps, mosaics,
|
|
167
|
+
spectral products or moving-target ephemerides. A supplied correction can be
|
|
168
|
+
applied, but the separately authored Gaia solver is not bundled. The new
|
|
169
|
+
independent autocorrelation method is provisional; its threshold must be
|
|
170
|
+
calibrated, and the old commissioning threshold is not assumed equivalent.
|
|
171
|
+
Stacks are resampled display products, not photometrically or PSF-matched science
|
|
172
|
+
coadds. They do not propagate uncertainties. Execution is sequential and portable.
|
|
173
|
+
|
|
174
|
+
MAST staging is covered by mocked service tests; real archive access depends on
|
|
175
|
+
service availability, permissions and input metadata. See TESTING.md for actual
|
|
176
|
+
validation scope. No automatic upload, publication or external solver invocation
|
|
177
|
+
occurs.
|
|
178
|
+
|
|
179
|
+
## Development and provenance
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
python -m pip install -e '.[dev,roman,mast]'
|
|
183
|
+
python -m pytest
|
|
184
|
+
python -m ruff check src tests docs/conf.py
|
|
185
|
+
python -m sphinx -W -b html docs docs/_build/html
|
|
186
|
+
python -m build
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Historical source snapshots are local reference material and are excluded from
|
|
190
|
+
distributions. [TEMPLATE.json](TEMPLATE.json) records the
|
|
191
|
+
Cookiecutter template and exact commit; [NOTICE.md](NOTICE.md) explains license
|
|
192
|
+
scope and attribution. The copied external Gaia solver has not been incorporated
|
|
193
|
+
into the package.
|
|
194
|
+
|
|
195
|
+
New package code is BSD-3-Clause. Template attribution is retained separately.
|
|
196
|
+
See [contributing](CONTRIBUTING.md), [conduct](CODE_OF_CONDUCT.md),
|
|
197
|
+
[AI disclosure](AI_POLICY.md), and [citation](CITATION.cff). The project has not yet
|
|
198
|
+
been published to PyPI or assigned a DOI.
|
|
199
|
+
|
|
200
|
+
## Local web GUI and target CSVs
|
|
201
|
+
|
|
202
|
+
The separate [Nexus notebook](notebooks/README.md) queries real MAST data and
|
|
203
|
+
requires an explicit path to your credential file. It is not part of the docs
|
|
204
|
+
site. Install its plotting/kernel dependencies with `pip install -e '.[roman,mast,notebook]'`.
|
|
205
|
+
|
|
206
|
+
For restricted MAST access, run `gladius token` in your workspace to save the
|
|
207
|
+
token through a hidden prompt. Alternatively copy `.env.example` to `.env`
|
|
208
|
+
and set `MAST_API_TOKEN=your_token_here`. The GUI loads that file when the server
|
|
209
|
+
starts; restart the server after editing it. Existing shell variables take
|
|
210
|
+
precedence. For `gladius run config.yaml`, place `.env` beside the YAML instead.
|
|
211
|
+
Use `--env-file /path/to/credentials.env` with `token`, `run`, `gui`, or the MAST
|
|
212
|
+
demo to select a different credential file.
|
|
213
|
+
Keep `.env` private and out of Git; the repository already ignores it. GitHub
|
|
214
|
+
Actions secrets do not populate this local file. See the
|
|
215
|
+
[authentication instructions](docs/configuration.md#local-mast-authentication).
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
gladius gui --workspace . --port 8768
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Open the printed local URL. The GUI builds the same validated configuration used
|
|
222
|
+
by the CLI, imports target CSVs, downloads self-contained YAML, and runs the
|
|
223
|
+
pipeline with live progress. It includes a YAML editor/importer for existing
|
|
224
|
+
configurations. Relative paths resolve from the directory shown in the builder;
|
|
225
|
+
downloaded YAML contains absolute paths. The server binds only to loopback.
|
|
226
|
+
Keep its terminal open during runs; closing a browser tab does not cancel a run.
|
|
227
|
+
|
|
228
|
+
```sh
|
|
229
|
+
gladius validate config.yaml --targets targets.csv
|
|
230
|
+
gladius run config.yaml --targets targets.csv
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`--targets` replaces YAML targets before validation, so the YAML may omit targets
|
|
234
|
+
when that option is supplied. The CSV path is relative to the CLI working
|
|
235
|
+
directory; other paths retain their YAML-relative meaning.
|
|
236
|
+
|
|
237
|
+
```csv
|
|
238
|
+
id,ra,dec,catalogue
|
|
239
|
+
OGLE-2019-BLG-0011,270.123,-29.456,OGLE
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Use decimal ICRS degrees (`ra,dec`) or zero-based pixels (`x,y`), never both.
|
|
243
|
+
`ra_deg/dec_deg` and `name/target_id` aliases are supported. IDs can be omitted to
|
|
244
|
+
generate stable row-order IDs such as `target-000001`. Extra columns are retained
|
|
245
|
+
as strings under each target's `metadata`, including in cutout provenance.
|
|
246
|
+
Invalid rows and duplicate IDs fail explicitly. The GUI preview shows the first
|
|
247
|
+
50 targets; all rows are included in the configuration and run.
|
|
248
|
+
|
|
249
|
+
Each GUI submission saves its resolved YAML and progress record in
|
|
250
|
+
`.gladius-gui/` under the workspace; scientific outputs still go to the
|
|
251
|
+
configured output directory. Only one GUI-owned run is active at a time. Reloading
|
|
252
|
+
the page reconnects to the last run while the server remains open. After a server
|
|
253
|
+
restart, run history remains on disk rather than being automatically restarted.
|
|
254
|
+
|
|
255
|
+
On Nexus, start the GUI in a JupyterLab terminal with
|
|
256
|
+
`gladius gui --workspace /path/on/nexus/to/work --nexus` and open the printed
|
|
257
|
+
proxy link. Gladius detects a supplied JupyterHub public URL automatically;
|
|
258
|
+
`--public-url` provides an explicit override. See the
|
|
259
|
+
[Nexus and SSH instructions](docs/configuration.md#roman-research-nexus-and-jupyterhub).
|
|
260
|
+
|
|
261
|
+
## Python API
|
|
262
|
+
|
|
263
|
+
The CLI and GUI use the same importable functions:
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
from pathlib import Path
|
|
267
|
+
|
|
268
|
+
from gladius import RunConfig, load_config, load_environment, read_targets_csv, run
|
|
269
|
+
|
|
270
|
+
# Folder containing this example's YAML, targets, and optional .env file.
|
|
271
|
+
workspace = Path.cwd()
|
|
272
|
+
|
|
273
|
+
# Python callers explicitly load credentials for restricted MAST access.
|
|
274
|
+
# Reads workspace/.env if present; existing environment variables take precedence.
|
|
275
|
+
load_environment(workspace)
|
|
276
|
+
|
|
277
|
+
# Existing YAML, with an optional CSV override: returns a validated RunConfig.
|
|
278
|
+
config = load_config(workspace / "config.yaml", targets_path=workspace / "targets.csv")
|
|
279
|
+
manifest_path = run(config, progress=print)
|
|
280
|
+
|
|
281
|
+
# Or construct the configuration directly:
|
|
282
|
+
config = RunConfig(
|
|
283
|
+
targets=read_targets_csv(workspace / "targets.csv"),
|
|
284
|
+
inputs={"mode": "mast"},
|
|
285
|
+
extraction={"size": 150, "no_overlap": "skip"},
|
|
286
|
+
).resolved(workspace)
|
|
287
|
+
# manifest_path = run(config)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
MAST sky searches are generated from target RA/Dec, with Level 2 calibrated
|
|
291
|
+
images and a configurable 6 arcminute candidate radius by default. Additional
|
|
292
|
+
criteria are optional for sky targets; pixel-only targets need an archive
|
|
293
|
+
constraint such as a program ID. See the configuration guide for authentication,
|
|
294
|
+
query limits and overlap conventions. `make_cutout()` also accepts in-memory
|
|
295
|
+
SCI/ERR/DQ arrays, a WCS and a `Target`; see the Python API documentation.
|
|
296
|
+
|
|
297
|
+
## Live archive tests in GitHub Actions
|
|
298
|
+
|
|
299
|
+
Add `MAST_API_TOKEN` under **Settings → Secrets and variables → Actions**.
|
|
300
|
+
The **Live Roman MAST download** workflow runs on default-branch code changes,
|
|
301
|
+
or manually from Actions. It downloads one product capped at 20 MiB and reports
|
|
302
|
+
whether it tested a calibrated image/cutout or a small associated product.
|
|
303
|
+
The manual calibrated-image option requires full extraction coverage within the
|
|
304
|
+
same cap. Downloaded science data are not uploaded as artifacts. Normal tests
|
|
305
|
+
remain offline. See the configuration guide for the exact coverage and limits.
|
|
306
|
+
|
|
307
|
+
## Publishing releases
|
|
308
|
+
|
|
309
|
+
Pushing a matching `v<version>` tag runs the checked PyPI release workflow.
|
|
310
|
+
Store the PyPI upload token as the repository Actions secret `PYPI_API_TOKEN`.
|
|
311
|
+
See [release instructions](TESTING.md#publish-a-release-to-pypi) before pushing a tag.
|