hyper-py-photometry 0.1.3__py3-none-any.whl → 0.1.4__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.
hyper_py/__init__.py CHANGED
@@ -11,7 +11,7 @@ from importlib.metadata import version, PackageNotFoundError
11
11
  from .hyper import start_hyper
12
12
 
13
13
  try:
14
- __version__ = version("hyper-py")
14
+ __version__ = version("hyper-py-photometry")
15
15
  except PackageNotFoundError:
16
16
  __version__ = "0.0.0-dev"
17
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper-py-photometry
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: HYPER: Hybrid Photometry Photometry and Extraction Routine
5
5
  Author-email: Alessio Traficante <alessio.traficante@inaf.it>
6
6
  Project-URL: Homepage, https://github.com/alessio-traficante/hyper-py
@@ -62,7 +62,7 @@ Hyper-py now supports **parallel execution** over multiple maps or datacube slic
62
62
  - Maintain **individual log files** for each map
63
63
  - Merge the final outputs (tables and diagnostics) into a single, combined summary
64
64
 
65
- To enable parallelism, set the following parameters in your `config.yaml` file under the `control` section:
65
+ To enable parallelism, set the following parameters in your `hyper_config.yaml` file under the `control` section:
66
66
 
67
67
  ```yaml
68
68
  control:
@@ -73,30 +73,16 @@ control:
73
73
  If `parallel_maps` is set to `false`, the pipeline will run in serial mode.
74
74
 
75
75
 
76
+ ## 🛠️ Installation
77
+ You can install and use `Hyper-py` in two different ways, depending on your needs:
76
78
 
77
- ## 🚀 Prerequisites
78
-
79
- Before using `Hyper-py`, make sure you have all the necessary Python dependencies installed. The following core libraries are required:
80
- • astropy
81
- • photutils
82
- • matplotlib
83
- • lmfit
84
- • pyyaml
85
- • numpy
86
- • scipy
87
- • scikit-learn>=1.4,<1.6
88
-
89
- This will install the necessary packages using `pip`:
90
-
79
+ ### Option 1: Install via `pip` (for direct usage)
80
+ Install via PyPI:
91
81
  ```bash
92
- astropy photutils matplotlib lmfit
82
+ pip install hyper-py-photometry
93
83
  ```
94
84
 
95
-
96
- ## 🛠️ Installation
97
- You can install and use `Hyper-py` in two different ways, depending on your needs:
98
-
99
- ### Option 1: Use the Source Code (for development or integration)
85
+ ### Option 2: Use the Source Code (for development or integration)
100
86
 
101
87
  If you want to modify, extend, or integrate `Hyper-py` in your own projects:
102
88
 
@@ -116,27 +102,71 @@ export PYTHONPATH=$(pwd)/src
116
102
  import sys
117
103
  sys.path.insert(0, "/absolute/path/to/hyper_py/src")
118
104
  ```
119
- ### Option 2: Install via `pip` (for direct usage)
120
- Install via PyPI:
105
+
106
+
107
+ ## ✅ Requirements
108
+
109
+ Before using `Hyper-py`, make sure you have all the necessary Python dependencies installed.
110
+
111
+ If you have installed `Hyper-py` via pip, all the requirements are automatically installed.
112
+ Otherwise, you can use the `requirements.txt` file, this will install the necessary packages using `pip`::
121
113
  ```bash
122
- pip install hyper-py-photometry
114
+ pip install -r requirements.txt
123
115
  ```
124
116
 
125
117
 
126
- ## 🎯 Usage
118
+ ## 📄 Configuration File
119
+
120
+
121
+ `Hyper-py` requires a configuration file named **`hyper_config.yaml`** in order to run.
122
+
123
+ >The first time you run `Hyper-py` a new hyper_config.yaml will be created automatically in the CWD, then you must setup all paths and paramenters.<br>
124
+ >If you already have a configuration file ready or you have moved the new configuration file to a different folder, provide the path as argument.
125
+
126
+ If no path is provided, the application will look for it in this order:
127
+ 1. Path passed as CLI argument
128
+ 2. `hyper_config.yaml` in the current working directory (CWD)
129
+ 3. User configuration directory
130
+ - Linux/macOS: `~/.config/hyper-py/hyper_config.yaml`
131
+ - Windows: `%APPDATA%\HyperPy\hyper_config.yaml`
132
+ 4. If not found, a new `hyper_config.yaml` will be created automatically in the CWD, copied from the package template (`assets/default_config.yaml`).
127
133
 
128
- You can use `Hyper-py` either by importing and running it directly from Python, or via command line.
129
134
  > [!IMPORTANT]
130
- > `Hyper-py` needs a configuration file in order to run. If no configuration file path is provided, the default file located in the `src/` folder will be used.
135
+ > <span style="font-weight:bold;">Before running the pipeline, you <span style="color:red; font-weight:bold;">must</span> edit **`hyper_config.yaml`** and set the correct parameters and paths.</span>
136
+
137
+
138
+ ### Configuration file lookup order
139
+
140
+ | Priority | Location | Description |
141
+ |----------|--------------------------------------------|-----------------------------------------------------------------------------|
142
+ | 1 | CLI argument | Path explicitly provided by the user, e.g. `hyper-py /path/to/hyper_config.yaml`. |
143
+ | 2 | Current Working Directory (CWD) | Looks for `./hyper_config.yaml` in the folder where the command is executed. |
144
+ | 3 | User configuration directory | - **Linux/macOS:** `~/.config/hyper-py/hyper_config.yaml`<br> - **Windows:** `%APPDATA%\HyperPy\hyper_config.yaml` |
145
+ | 4 | Auto-generated in CWD if none is found | A new `hyper_config.yaml` is created, copied from the package template (`assets/default_config.yaml`). |
146
+
147
+ ### 💡 Tips & Tricks
148
+
149
+ - **Use different configs**
150
+ You can maintain multiple configuration files (e.g., `hyper_config.dev.yaml` and `hyper_config.prod.yaml`) and choose which one to run.
151
+ <br>Eg. If you have installed via pip:
152
+ ```bash
153
+ hyper-py ./hyper_config.dev.yaml
154
+ hyper-py ./hyper_config.prod.yaml
155
+ ```
156
+
157
+
158
+ ## 🚀 Usage
159
+
160
+ You can use `Hyper-py` either by importing and running it directly from Python, or via command line.
131
161
 
132
162
  ### 1. From Python
133
163
 
134
- Import and run the `start_hyper` function, passing the path to your YAML configuration file.
164
+ Import and run the `run_hyper` function, passing the path to your YAML configuration file.
135
165
 
136
166
  ```python
137
167
  from hyper_py import run_hyper
138
168
 
139
- run_hyper("path/to/config.yaml")
169
+ run_hyper("path/to/hyper_config.yaml")
140
170
  ```
141
171
  This is the recommended approach if you want to integrate `Hyper-py` into a larger Python application or workflow.
142
172
 
@@ -146,7 +176,7 @@ I) Using the source code:
146
176
 
147
177
  You can execute the tool from the terminal:
148
178
  ```bash
149
- python -m hyper_py path/to/config.yaml
179
+ python -m hyper_py path/to/hyper_config.yaml
150
180
  ```
151
181
  This runs the main process using the configuration file specified.
152
182
 
@@ -154,18 +184,18 @@ II) If installed via pip:
154
184
 
155
185
  Once the .whl package is installed (e.g., via pip install hyper_py-X.X.X-py3-none-any.whl), you can run it directly:
156
186
  ```bash
157
- hyper_py path/to/config.yaml
187
+ hyper_py path/to/hyper_config.yaml
158
188
  ```
159
189
  OR
160
190
  ```bash
161
- hyper-py path/to/config.yaml
191
+ hyper-py path/to/hyper_config.yaml
162
192
  ```
163
193
  OR
164
194
  ```bash
165
- hyper path/to/config.yaml
195
+ hyper path/to/hyper_config.yaml
166
196
  ```
167
197
 
168
- ## Using the Source Code in Visual Studio Code
198
+ ## 💻 Using the Source Code in Visual Studio Code
169
199
  To run or debug the source code using Visual Studio Code:
170
200
  ### 1. Open the project
171
201
  - Open the project folder in VS Code.
@@ -194,7 +224,7 @@ Optional: You can add this to `.vscode/launch.json` for convenience:
194
224
  "request": "launch",
195
225
  "program": "${workspaceFolder}/src/hyper_py/run_hyper.py",
196
226
  "console": "integratedTerminal",
197
- "args": ["path/to/config.yaml"], // Specify a different config file
227
+ "args": ["path/to/hyper_config.yaml"],
198
228
  }
199
229
  ]
200
230
  }
@@ -203,9 +233,9 @@ Optional: You can add this to `.vscode/launch.json` for convenience:
203
233
  <br/><br/>
204
234
 
205
235
 
206
- ## ⚙️ Configuration File Reference (`config.yaml`)
236
+ ## ⚙️ Configuration File Reference (`hyper_config.yaml`)
207
237
 
208
- The `config.yaml` file controls all aspects of the Hyper-py pipeline. Below is a detailed explanation of every entry, including its purpose, accepted values, default, and type.
238
+ The `hyper_config.yaml` file controls all aspects of the Hyper-py pipeline. Below is a detailed explanation of every entry, including its purpose, accepted values, default, and type.
209
239
 
210
240
  ### File Paths
211
241
 
@@ -355,7 +385,7 @@ The `config.yaml` file controls all aspects of the Hyper-py pipeline. Below is a
355
385
  ---
356
386
 
357
387
  **Tip:**
358
- All entries can be customized in your `config.yaml`. If an entry is omitted, the default value will be used.
388
+ All entries can be customized in your `hyper_config.yaml`. If an entry is omitted, the default value will be used.
359
389
 
360
390
 
361
391
 
@@ -1,4 +1,4 @@
1
- hyper_py/__init__.py,sha256=9qj4yOKnDfeqKdMOHB4a7qVmPgTAxWYxSq_Zr_yugwc,458
1
+ hyper_py/__init__.py,sha256=11pucLbbhjgiTjT0_HYsgSXqtRje5XtbbI-blW-DZ9g,469
2
2
  hyper_py/__main__.py,sha256=VEzRWxxjj8Jja0FY5TiqDWaYkqYsFhHirbAK2gxRFTg,208
3
3
  hyper_py/bkg_multigauss.py,sha256=SuVlEMkPOccqOuATCaoEBU_WpQARAlHJa2qwAkglHII,22778
4
4
  hyper_py/bkg_single.py,sha256=stGiZIAFabOW3QHxakA2pJ0__HjgyvcPD2TnB3ARbZc,20269
@@ -20,9 +20,9 @@ hyper_py/single_map.py,sha256=YXlMiixK-CLfiFjmLiqP8RkKu6JkekEDjVi-3bQu05w,28831
20
20
  hyper_py/survey.py,sha256=ymOJk-H4Bf515OwSNFkmODKk7x3MteT6l51ylaYy9Cg,2807
21
21
  hyper_py/visualization.py,sha256=AJRuR_Y-_AaZ2NwX1w07lRABV0C2-w8QP1tSqs9_kvk,5662
22
22
  hyper_py/assets/default_config.yaml,sha256=64DJtYhwHX6XkbOyuGMmn51WwjK0uJpNafRe8CwkkO4,10616
23
- hyper_py_photometry-0.1.3.dist-info/licenses/LICENSE,sha256=aB7cqE2-X_8mxy-EmQuVMkKmP8DQA2BnQaqD5k5C5nE,584
24
- hyper_py_photometry-0.1.3.dist-info/METADATA,sha256=EDVdEHJ5BM9MGlP_m7JJiKX7GfXsVBzmxlaM_0mmfZk,32412
25
- hyper_py_photometry-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- hyper_py_photometry-0.1.3.dist-info/entry_points.txt,sha256=0AVwuatL0ri5juy_Ccgt_9Bd4V0McpOrWSSnNX8cCzs,120
27
- hyper_py_photometry-0.1.3.dist-info/top_level.txt,sha256=Pw-Iuf0SQwcibLdOwx4RkmEas3I6s0Ym_D0_oUnXEr4,9
28
- hyper_py_photometry-0.1.3.dist-info/RECORD,,
23
+ hyper_py_photometry-0.1.4.dist-info/licenses/LICENSE,sha256=aB7cqE2-X_8mxy-EmQuVMkKmP8DQA2BnQaqD5k5C5nE,584
24
+ hyper_py_photometry-0.1.4.dist-info/METADATA,sha256=5UAU7QFSUTBQvj69foClDPRWSmeMdKSFSmprRENP-Rc,34599
25
+ hyper_py_photometry-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ hyper_py_photometry-0.1.4.dist-info/entry_points.txt,sha256=0AVwuatL0ri5juy_Ccgt_9Bd4V0McpOrWSSnNX8cCzs,120
27
+ hyper_py_photometry-0.1.4.dist-info/top_level.txt,sha256=Pw-Iuf0SQwcibLdOwx4RkmEas3I6s0Ym_D0_oUnXEr4,9
28
+ hyper_py_photometry-0.1.4.dist-info/RECORD,,