fitscube 2.1.0__tar.gz → 2.2.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.
- {fitscube-2.1.0 → fitscube-2.2.0}/.pre-commit-config.yaml +2 -2
- {fitscube-2.1.0 → fitscube-2.2.0}/PKG-INFO +1 -1
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/_version.py +2 -2
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/combine_fits.py +14 -4
- {fitscube-2.1.0 → fitscube-2.2.0}/.github/CONTRIBUTING.md +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/.github/dependabot.yml +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/.github/release.yml +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/.github/workflows/cd.yml +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/.github/workflows/ci.yml +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/.gitignore +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/CHANGELOG.md +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/LICENSE +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/README.md +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/__init__.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/asyncio.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/cli.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/exceptions.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/extract.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/logging.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/fitscube/version.pyi +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/noxfile.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/pyproject.toml +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/__init__.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/conftest.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/data/cube.zip +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/data/images.zip +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/data/time_images.zip +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/data/timecube.zip +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/test_extract.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/test_frequencies.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/test_package.py +0 -0
- {fitscube-2.1.0 → fitscube-2.2.0}/tests/test_times.py +0 -0
|
@@ -33,14 +33,14 @@ repos:
|
|
|
33
33
|
- id: rst-inline-touching-normal
|
|
34
34
|
|
|
35
35
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
36
|
-
rev: "v0.12.
|
|
36
|
+
rev: "v0.12.7"
|
|
37
37
|
hooks:
|
|
38
38
|
- id: ruff
|
|
39
39
|
args: ["--fix", "--show-fixes"]
|
|
40
40
|
- id: ruff-format
|
|
41
41
|
|
|
42
42
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
43
|
-
rev: "v1.17.
|
|
43
|
+
rev: "v1.17.1"
|
|
44
44
|
hooks:
|
|
45
45
|
- id: mypy
|
|
46
46
|
files: src|tests
|
|
@@ -160,7 +160,13 @@ async def create_cube_from_scratch_coro(
|
|
|
160
160
|
if output_file.exists() and overwrite:
|
|
161
161
|
output_file.unlink()
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
try:
|
|
164
|
+
output_wcs = WCS(output_header)
|
|
165
|
+
except Exception as e:
|
|
166
|
+
logger.error("Error creating new header")
|
|
167
|
+
for k in output_header:
|
|
168
|
+
logger.error(f"{k} = {output_header[k]}")
|
|
169
|
+
raise e
|
|
164
170
|
output_shape = output_wcs.array_shape
|
|
165
171
|
msg = f"Creating a new FITS file with shape {output_shape}"
|
|
166
172
|
logger.info(msg)
|
|
@@ -324,6 +330,13 @@ async def create_output_cube_coro(
|
|
|
324
330
|
key = f"{k}{fits_idx}"
|
|
325
331
|
logger.debug(f"{key}={new_header[key]}")
|
|
326
332
|
|
|
333
|
+
# Add extra transform fields for consistency
|
|
334
|
+
if ("CD1_1" in new_header or "PC1_1" in new_header) and fits_idx != 1:
|
|
335
|
+
transform_type = "CD" if "CD1_1" in new_header else "PC"
|
|
336
|
+
pv1 = f"{transform_type}{fits_idx}_{fits_idx}"
|
|
337
|
+
logger.info(f"Adding {pv1} to header")
|
|
338
|
+
new_header[pv1] = 1.0
|
|
339
|
+
|
|
327
340
|
if ignore_spec or not even_spec:
|
|
328
341
|
logger.info(
|
|
329
342
|
f"Ignore the specrency information, {ignore_spec=} or {not even_spec=}"
|
|
@@ -345,9 +358,6 @@ async def create_output_cube_coro(
|
|
|
345
358
|
)
|
|
346
359
|
del new_header["BMAJ"], new_header["BMIN"], new_header["BPA"]
|
|
347
360
|
|
|
348
|
-
if time_domain_mode:
|
|
349
|
-
new_header["COMMENT"] = "The frequency/chan axis in this cube represents TIME."
|
|
350
|
-
|
|
351
361
|
plane_shape = list(old_data.shape)
|
|
352
362
|
cube_shape = plane_shape.copy()
|
|
353
363
|
if is_2d:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|