Skip to content

Commit

Permalink
Fix issue with FITS file checking even when option was False
Browse files Browse the repository at this point in the history
  • Loading branch information
aymgal committed Apr 5, 2024
1 parent 07d4471 commit 9ec8d26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions coolest/template/classes/grid.py
Original file line number Diff line number Diff line change
@@ -94,7 +94,8 @@ def __init__(self,
**kwargs_file) -> None:
super().__init__(fits_path, **kwargs_file)
self.set_grid(None, field_of_view_x, field_of_view_y,
num_pix_x, num_pix_y)
num_pix_x, num_pix_y,
check_fits_file=kwargs_file.get('check_fits_file', True))

@property
def shape(self):
@@ -122,7 +123,7 @@ def set_grid(self, fits_path,
super().set_grid(fits_path, check_fits_file)
self.field_of_view_x = field_of_view_x
self.field_of_view_y = field_of_view_y
if self.fits_file.exists():
if self.fits_file.exists() and check_fits_file:
self.num_pix_x, self.num_pix_y = self.read_fits()
# if number of pixels is also given, check that it is consistent
if num_pix_x != 0 and self.num_pix_x != num_pix_x:

0 comments on commit 9ec8d26

Please sign in to comment.