Skip to content

Commit

Permalink
Merge branch 'master' into tap_coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Mar 4, 2022
2 parents e0acd7b + 8f82aba commit 1ef9062
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: &exclude_pattern '^LIGO_skymaps/'
- id: trailing-whitespace
exclude: *exclude_pattern
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 22.1.0
hooks:
- id: black
exclude: *exclude_pattern
Expand Down
9 changes: 5 additions & 4 deletions nuztf/base_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def wrap_around_180(ra_deg: float):
ra_deg = np.rad2deg(ra_rad)
return ra_deg

def ampel_object_search(self, ztf_ids: list, with_history: bool = True) -> list:
def ampel_object_search(self, ztf_ids: list) -> list:
""" """
all_results = []

Expand Down Expand Up @@ -739,8 +739,6 @@ def __init__(self, data):
for i, obs_time in enumerate(tqdm(obs_times)):

field = data["field"].iat[i]
ra = data["ra"].iat[i]
dec = data["dec"].iat[i]

flat_pix = field_pix[field]

Expand Down Expand Up @@ -776,6 +774,7 @@ def __init__(self, data):
single_no_plane_pixels = []

overlapping_fields = []

for i, p in enumerate(tqdm(hp.nest2ring(self.nside, self.pixel_nos))):

if p in pix_obs_times.keys():
Expand Down Expand Up @@ -819,10 +818,12 @@ def __init__(self, data):
self.last_obs.utc.format = "isot"

except ValueError:
raise Exception(
err = (
f"No observations of this field were found at any time between {self.t_min} and"
f"{obs_times[-1]}. Coverage overlap is 0%, but recent observations might be missing!"
)
self.logger.error(err)
raise ValueError(err)

self.logger.info(f"Observations started at {self.first_obs.jd}")

Expand Down

0 comments on commit 1ef9062

Please sign in to comment.