snid-sage 0.1.1.dev0__py3-none-any.whl
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.
- snid_sage/__init__.py +52 -0
- snid_sage/_version.py +21 -0
- snid_sage/interfaces/__init__.py +31 -0
- snid_sage/interfaces/cli/__init__.py +43 -0
- snid_sage/interfaces/cli/batch.py +1282 -0
- snid_sage/interfaces/cli/config.py +280 -0
- snid_sage/interfaces/cli/identify.py +931 -0
- snid_sage/interfaces/cli/main.py +166 -0
- snid_sage/interfaces/cli/template.py +457 -0
- snid_sage/interfaces/gui/__init__.py +12 -0
- snid_sage/interfaces/gui/components/__init__.py +16 -0
- snid_sage/interfaces/gui/components/analysis/__init__.py +9 -0
- snid_sage/interfaces/gui/components/analysis/analysis_plotter.py +615 -0
- snid_sage/interfaces/gui/components/analysis/interactive_line_tools.py +385 -0
- snid_sage/interfaces/gui/components/dialogs/__init__.py +50 -0
- snid_sage/interfaces/gui/components/dialogs/cluster_selection_dialog.py +1340 -0
- snid_sage/interfaces/gui/components/dialogs/configuration_dialog.py +1295 -0
- snid_sage/interfaces/gui/components/dialogs/continuum_editor_dialog.py +391 -0
- snid_sage/interfaces/gui/components/dialogs/enhanced_ai_assistant_dialog.py +1021 -0
- snid_sage/interfaces/gui/components/dialogs/manual_redshift_dialog.py +1567 -0
- snid_sage/interfaces/gui/components/dialogs/mask_manager_dialog.py +274 -0
- snid_sage/interfaces/gui/components/dialogs/multi_step_emission_dialog.py +2933 -0
- snid_sage/interfaces/gui/components/dialogs/preprocessing_dialog.py +2074 -0
- snid_sage/interfaces/gui/components/dialogs/preprocessing_selection_dialog.py +267 -0
- snid_sage/interfaces/gui/components/dialogs/redshift_mode_dialog.py +351 -0
- snid_sage/interfaces/gui/components/dialogs/results_dialog.py +694 -0
- snid_sage/interfaces/gui/components/dialogs/settings_dialog.py +760 -0
- snid_sage/interfaces/gui/components/dialogs/shortcuts_dialog.py +306 -0
- snid_sage/interfaces/gui/components/dialogs/snid_analysis_dialog.py +439 -0
- snid_sage/interfaces/gui/components/dialogs/wind_velocity_dialog.py +825 -0
- snid_sage/interfaces/gui/components/forms/__init__.py +14 -0
- snid_sage/interfaces/gui/components/forms/input_controls.py +323 -0
- snid_sage/interfaces/gui/components/forms/toggle_controls.py +465 -0
- snid_sage/interfaces/gui/components/plots/__init__.py +17 -0
- snid_sage/interfaces/gui/components/plots/interactive_tools.py +390 -0
- snid_sage/interfaces/gui/components/plots/preview_plot_manager.py +665 -0
- snid_sage/interfaces/gui/components/plots/spectrum_plotter.py +401 -0
- snid_sage/interfaces/gui/components/plots/summary_plotter.py +432 -0
- snid_sage/interfaces/gui/components/widgets/__init__.py +39 -0
- snid_sage/interfaces/gui/components/widgets/advanced_controls.py +572 -0
- snid_sage/interfaces/gui/components/widgets/config_widgets.py +554 -0
- snid_sage/interfaces/gui/components/widgets/custom_toggles.py +446 -0
- snid_sage/interfaces/gui/components/widgets/interactive_continuum_widget.py +757 -0
- snid_sage/interfaces/gui/components/widgets/progress_widgets.py +656 -0
- snid_sage/interfaces/gui/components/widgets/theme_widgets.py +351 -0
- snid_sage/interfaces/gui/controllers/__init__.py +21 -0
- snid_sage/interfaces/gui/controllers/app_controller.py +572 -0
- snid_sage/interfaces/gui/controllers/dialog_controller.py +454 -0
- snid_sage/interfaces/gui/controllers/file_controller.py +707 -0
- snid_sage/interfaces/gui/controllers/plot_controller.py +1192 -0
- snid_sage/interfaces/gui/controllers/view_controller.py +221 -0
- snid_sage/interfaces/gui/dialogs/__init__.py +6 -0
- snid_sage/interfaces/gui/features/__init__.py +9 -0
- snid_sage/interfaces/gui/features/analysis/__init__.py +22 -0
- snid_sage/interfaces/gui/features/analysis/analysis_controller.py +1578 -0
- snid_sage/interfaces/gui/features/analysis/cluster_summary.py +555 -0
- snid_sage/interfaces/gui/features/analysis/emission_line_overlay_controller.py +390 -0
- snid_sage/interfaces/gui/features/analysis/games_integration.py +357 -0
- snid_sage/interfaces/gui/features/analysis/line_detection.py +826 -0
- snid_sage/interfaces/gui/features/analysis/manual_selection_controller.py +564 -0
- snid_sage/interfaces/gui/features/analysis/wind_velocity_controller.py +485 -0
- snid_sage/interfaces/gui/features/configuration/__init__.py +18 -0
- snid_sage/interfaces/gui/features/configuration/config_controller.py +594 -0
- snid_sage/interfaces/gui/features/configuration/gui_settings_controller.py +544 -0
- snid_sage/interfaces/gui/features/preprocessing/__init__.py +16 -0
- snid_sage/interfaces/gui/features/preprocessing/preprocessing_controller.py +351 -0
- snid_sage/interfaces/gui/features/preprocessing/preview_calculator.py +535 -0
- snid_sage/interfaces/gui/features/preprocessing/spectrum_preprocessor.py +630 -0
- snid_sage/interfaces/gui/features/results/__init__.py +9 -0
- snid_sage/interfaces/gui/features/results/llm_integration.py +479 -0
- snid_sage/interfaces/gui/features/results/results_manager.py +539 -0
- snid_sage/interfaces/gui/preprocessing_gui.py +56 -0
- snid_sage/interfaces/gui/sage_gui.py +1923 -0
- snid_sage/interfaces/gui/utils/__init__.py +39 -0
- snid_sage/interfaces/gui/utils/cross_platform_window.py +871 -0
- snid_sage/interfaces/gui/utils/event_handlers.py +412 -0
- snid_sage/interfaces/gui/utils/gui_helpers.py +472 -0
- snid_sage/interfaces/gui/utils/import_manager.py +236 -0
- snid_sage/interfaces/gui/utils/improved_button_workflow.py +378 -0
- snid_sage/interfaces/gui/utils/layout_utils.py +1245 -0
- snid_sage/interfaces/gui/utils/logo_manager.py +240 -0
- snid_sage/interfaces/gui/utils/no_title_plot_manager.py +348 -0
- snid_sage/interfaces/gui/utils/spectrum_reset_manager.py +622 -0
- snid_sage/interfaces/gui/utils/startup_manager.py +366 -0
- snid_sage/interfaces/gui/utils/state_manager.py +497 -0
- snid_sage/interfaces/gui/utils/unified_font_manager.py +312 -0
- snid_sage/interfaces/gui/utils/unified_theme_manager.py +794 -0
- snid_sage/interfaces/gui/utils/universal_window_manager.py +419 -0
- snid_sage/interfaces/gui/utils/window_event_handlers.py +222 -0
- snid_sage/interfaces/gui/utils/workflow_integration.py +295 -0
- snid_sage/interfaces/gui/widgets/__init__.py +6 -0
- snid_sage/interfaces/llm/__init__.py +12 -0
- snid_sage/interfaces/llm/analysis/__init__.py +6 -0
- snid_sage/interfaces/llm/analysis/llm_utils.py +660 -0
- snid_sage/interfaces/llm/llm_integration.py +444 -0
- snid_sage/interfaces/llm/openrouter/__init__.py +6 -0
- snid_sage/interfaces/llm/openrouter/openrouter_llm.py +901 -0
- snid_sage/interfaces/llm/openrouter/openrouter_summary.py +774 -0
- snid_sage/interfaces/llm/ui/__init__.py +14 -0
- snid_sage/shared/__init__.py +38 -0
- snid_sage/shared/constants/__init__.py +80 -0
- snid_sage/shared/constants/physical.py +405 -0
- snid_sage/shared/exceptions/__init__.py +41 -0
- snid_sage/shared/exceptions/core_exceptions.py +127 -0
- snid_sage/shared/types/__init__.py +53 -0
- snid_sage/shared/types/result_types.py +197 -0
- snid_sage/shared/types/spectrum_types.py +209 -0
- snid_sage/shared/utils/__init__.py +15 -0
- snid_sage/shared/utils/config/__init__.py +26 -0
- snid_sage/shared/utils/config/configuration_manager.py +563 -0
- snid_sage/shared/utils/config/platform_config.py +253 -0
- snid_sage/shared/utils/data_io/__init__.py +6 -0
- snid_sage/shared/utils/data_io/spectrum_loader.py +480 -0
- snid_sage/shared/utils/line_detection/__init__.py +133 -0
- snid_sage/shared/utils/line_detection/fwhm_analysis.py +432 -0
- snid_sage/shared/utils/line_detection/interactive_fwhm_analyzer.py +503 -0
- snid_sage/shared/utils/line_detection/line_analysis.py +170 -0
- snid_sage/shared/utils/line_detection/line_detection_utils.py +1158 -0
- snid_sage/shared/utils/line_detection/line_presets.py +282 -0
- snid_sage/shared/utils/line_detection/line_selection_utils.py +298 -0
- snid_sage/shared/utils/line_detection/nist_search.py +684 -0
- snid_sage/shared/utils/line_detection/spectrum_utils.py +186 -0
- snid_sage/shared/utils/logging/__init__.py +104 -0
- snid_sage/shared/utils/logging/config.py +317 -0
- snid_sage/shared/utils/logging/snid_logger.py +392 -0
- snid_sage/shared/utils/mask_utils/__init__.py +6 -0
- snid_sage/shared/utils/mask_utils/mask_utils.py +301 -0
- snid_sage/shared/utils/math_utils/__init__.py +39 -0
- snid_sage/shared/utils/math_utils/weighted_statistics.py +365 -0
- snid_sage/shared/utils/plotting/__init__.py +45 -0
- snid_sage/shared/utils/plotting/plot_theming.py +513 -0
- snid_sage/shared/utils/plotting/spectrum_utils.py +259 -0
- snid_sage/shared/utils/results_formatter.py +630 -0
- snid_sage/shared/utils/simple_template_finder.py +397 -0
- snid_sage/shared/utils/wind_analysis/__init__.py +36 -0
- snid_sage/shared/utils/wind_analysis/pcygni_fitting.py +503 -0
- snid_sage/shared/utils/wind_analysis/wind_calculations.py +455 -0
- snid_sage/snid/__init__.py +28 -0
- snid_sage/snid/core/__init__.py +36 -0
- snid_sage/snid/core/config.py +420 -0
- snid_sage/snid/core/integration.py +510 -0
- snid_sage/snid/cosmological_clustering.py +1039 -0
- snid_sage/snid/fft_tools.py +521 -0
- snid_sage/snid/games.py +1892 -0
- snid_sage/snid/io.py +1455 -0
- snid_sage/snid/optimization_integration.py +224 -0
- snid_sage/snid/plotting.py +2290 -0
- snid_sage/snid/plotting_3d.py +474 -0
- snid_sage/snid/preprocessing.py +763 -0
- snid_sage/snid/snid.py +2483 -0
- snid_sage/snid/snid_test.py +232 -0
- snid_sage/snid/snidtype.py +656 -0
- snid_sage/snid/template_fft_storage.py +868 -0
- snid_sage/snid/template_manager.py +399 -0
- snid_sage/snid/vectorized_peak_finder.py +441 -0
- snid_sage/templates/template_index.json +7936 -0
- snid_sage/templates/templates_AGN.hdf5 +0 -0
- snid_sage/templates/templates_GAP.hdf5 +0 -0
- snid_sage/templates/templates_Galaxy.hdf5 +0 -0
- snid_sage/templates/templates_II.hdf5 +0 -0
- snid_sage/templates/templates_Ia.hdf5 +0 -0
- snid_sage/templates/templates_Ib.hdf5 +0 -0
- snid_sage/templates/templates_Ibn.hdf5 +0 -0
- snid_sage/templates/templates_Ic.hdf5 +0 -0
- snid_sage/templates/templates_Icn.hdf5 +0 -0
- snid_sage/templates/templates_KN.hdf5 +0 -0
- snid_sage/templates/templates_LFBOT.hdf5 +0 -0
- snid_sage/templates/templates_SLSN.hdf5 +0 -0
- snid_sage/templates/templates_Star.hdf5 +0 -0
- snid_sage/templates/templates_TDE.hdf5 +0 -0
- snid_sage-0.1.1.dev0.dist-info/METADATA +217 -0
- snid_sage-0.1.1.dev0.dist-info/RECORD +176 -0
- snid_sage-0.1.1.dev0.dist-info/WHEEL +5 -0
- snid_sage-0.1.1.dev0.dist-info/entry_points.txt +5 -0
- snid_sage-0.1.1.dev0.dist-info/licenses/LICENSE +35 -0
- snid_sage-0.1.1.dev0.dist-info/top_level.txt +1 -0
snid_sage/__init__.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SNID SAGE - SuperNova IDentification with Spectrum Analysis and Guided Enhancement
|
|
3
|
+
================================================================================
|
|
4
|
+
|
|
5
|
+
A comprehensive Python package for supernova spectrum identification and analysis,
|
|
6
|
+
based on the original Fortran SNID by Stéphane Blondin & John L. Tonry.
|
|
7
|
+
|
|
8
|
+
Features:
|
|
9
|
+
- Spectrum identification and classification
|
|
10
|
+
- Template library management
|
|
11
|
+
- Batch processing capabilities
|
|
12
|
+
- Modern GUI interface
|
|
13
|
+
- Command-line interface
|
|
14
|
+
- LLM integration for enhanced analysis
|
|
15
|
+
|
|
16
|
+
Author: Fiorenzo Stoppa
|
|
17
|
+
Email: fiorenzo.stoppa@physics.ox.ac.uk
|
|
18
|
+
License: MIT
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
# Get version from setuptools_scm
|
|
22
|
+
try:
|
|
23
|
+
from ._version import version as __version__
|
|
24
|
+
except ImportError:
|
|
25
|
+
# Fallback for development installs
|
|
26
|
+
try:
|
|
27
|
+
from setuptools_scm import get_version
|
|
28
|
+
__version__ = get_version(root='..', relative_to=__file__)
|
|
29
|
+
except (ImportError, LookupError):
|
|
30
|
+
__version__ = "unknown"
|
|
31
|
+
|
|
32
|
+
__author__ = "Fiorenzo Stoppa"
|
|
33
|
+
__email__ = "fiorenzo.stoppa@physics.ox.ac.uk"
|
|
34
|
+
__license__ = "MIT"
|
|
35
|
+
|
|
36
|
+
# Import main modules
|
|
37
|
+
try:
|
|
38
|
+
from . import snid
|
|
39
|
+
except ImportError:
|
|
40
|
+
snid = None
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
from . import interfaces
|
|
44
|
+
except ImportError:
|
|
45
|
+
interfaces = None
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
from . import shared
|
|
49
|
+
except ImportError:
|
|
50
|
+
shared = None
|
|
51
|
+
|
|
52
|
+
__all__ = ['snid', 'interfaces', 'shared']
|
snid_sage/_version.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
6
|
+
TYPE_CHECKING = False
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
11
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
12
|
+
else:
|
|
13
|
+
VERSION_TUPLE = object
|
|
14
|
+
|
|
15
|
+
version: str
|
|
16
|
+
__version__: str
|
|
17
|
+
__version_tuple__: VERSION_TUPLE
|
|
18
|
+
version_tuple: VERSION_TUPLE
|
|
19
|
+
|
|
20
|
+
__version__ = version = '0.1.1.dev0'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 1, 1, 'dev0')
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SNID SAGE Interfaces Package
|
|
3
|
+
============================
|
|
4
|
+
|
|
5
|
+
This package contains all user interfaces for SNID SAGE:
|
|
6
|
+
- GUI: Modern graphical user interface
|
|
7
|
+
- CLI: Command-line interface
|
|
8
|
+
- LLM: Large Language Model integration interface
|
|
9
|
+
- API: REST API interface (future)
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "1.0.0"
|
|
13
|
+
__author__ = "Fiorenzo Stoppa"
|
|
14
|
+
|
|
15
|
+
# Import main interface modules
|
|
16
|
+
try:
|
|
17
|
+
from . import gui
|
|
18
|
+
except ImportError:
|
|
19
|
+
gui = None
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
from . import cli
|
|
23
|
+
except ImportError:
|
|
24
|
+
cli = None
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
from . import llm
|
|
28
|
+
except ImportError:
|
|
29
|
+
llm = None
|
|
30
|
+
|
|
31
|
+
__all__ = ['gui', 'cli', 'llm']
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SNID SAGE CLI Interface
|
|
3
|
+
======================
|
|
4
|
+
|
|
5
|
+
Command-line interface for SNID SAGE spectrum analysis.
|
|
6
|
+
|
|
7
|
+
This module provides command-line tools for:
|
|
8
|
+
- Spectrum identification
|
|
9
|
+
- Template management
|
|
10
|
+
- Batch processing
|
|
11
|
+
- Configuration management
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
__version__ = "1.0.0"
|
|
15
|
+
|
|
16
|
+
# Import main CLI components
|
|
17
|
+
try:
|
|
18
|
+
from .main import main
|
|
19
|
+
except ImportError:
|
|
20
|
+
main = None
|
|
21
|
+
|
|
22
|
+
# Import command modules individually
|
|
23
|
+
try:
|
|
24
|
+
from . import identify
|
|
25
|
+
except ImportError:
|
|
26
|
+
identify = None
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
from . import template
|
|
30
|
+
except ImportError:
|
|
31
|
+
template = None
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
from . import batch
|
|
35
|
+
except ImportError:
|
|
36
|
+
batch = None
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
from . import config
|
|
40
|
+
except ImportError:
|
|
41
|
+
config = None
|
|
42
|
+
|
|
43
|
+
__all__ = ['main', 'identify', 'template', 'batch', 'config']
|