Skip to content

Commit ac89db9

Browse files
authored
Cube Cutout Generalization
* Start on tests * Tests, style, more checks * test case for input file with no image data * Address PR comments * Slight restructuring * small typing changes * Delete ImageCutout tests from test_FITSCutout.py * ASDF Cutout Progress * pass in coordinates from asdf_cut as string * change gwcs version * parameter to return filepaths * Generalization restructuring * CubeCutout implementation * New approach * CubeCutout tests * Fix rebase issue * Separate TESS logic into child class * Update cube_cut to use TessCubeCutout * Move _build_tpf, add comments about backwards compatibility * Adding cube_cut function * style fix * Fix rebase issue
1 parent 306ed01 commit ac89db9

File tree

13 files changed

+1693
-1043
lines changed

13 files changed

+1693
-1043
lines changed

astrocut/ASDFCutout.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from . import log
2121
from .ImageCutout import ImageCutout
22-
from .exceptions import DataWarning, InvalidInputError
22+
from .exceptions import DataWarning, InvalidQueryError
2323

2424

2525
class ASDFCutout(ImageCutout):
@@ -327,7 +327,7 @@ def cutout(self) -> Union[str, List[str], List[fits.HDUList]]:
327327
328328
Raises
329329
------
330-
InvalidInputError
330+
InvalidQueryError
331331
If no cutouts contain data.
332332
"""
333333
# Track start time
@@ -339,7 +339,7 @@ def cutout(self) -> Union[str, List[str], List[fits.HDUList]]:
339339

340340
# If no cutouts contain data, raise exception
341341
if not self.cutouts:
342-
raise InvalidInputError('Cutout contains no data! (Check image footprint.)')
342+
raise InvalidQueryError('Cutout contains no data! (Check image footprint.)')
343343

344344
# Log total time elapsed
345345
log.debug('Total time: %.2f sec', monotonic() - start_time)

0 commit comments

Comments
 (0)