Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Aug 6, 2024
1 parent eba562c commit 8f1fef6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
11 changes: 4 additions & 7 deletions nuztf/observations/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@
# The following functions are used to get the coverage from the cache


def get_coverage(
jds: [int], backend="best", master_log: pd.DataFrame | None = None
) -> pd.DataFrame | None:
def get_coverage(jds: [int], backend="best") -> pd.DataFrame | None:
"""
Get a dataframe of the coverage for a list of JDs
Will use the cache if available, otherwise will query the depot, and lastly TAP
:param jds: JDs
:param backend: "best" or "depot" or "tap" or "skyvision" or "masterlog"
:param master_log: Master log dataframe
:return: Coverage dataframe
"""

Expand Down Expand Up @@ -66,7 +63,7 @@ def get_coverage(
if len(df) > 0:
covered_jds.append(jd)

missing_logs = list(set(jds) - set(covered_jds))
missing_logs = sorted(set(jds) - set(covered_jds))

if len(missing_logs) > 0:
logger.info(
Expand All @@ -84,7 +81,7 @@ def get_coverage(
if len(df) > 0:
covered_jds.append(jd)

missing_logs = list(set(jds) - set(covered_jds))
missing_logs = sorted(set(jds) - set(covered_jds))

if len(missing_logs) > 0:
logger.info(
Expand All @@ -104,7 +101,7 @@ def get_coverage(
if len(df) > 0:
covered_jds.append(jd)

missing_logs = list(set(jds) - set(covered_jds))
missing_logs = sorted(set(jds) - set(covered_jds))

if len(missing_logs) > 0:
logger.info(
Expand Down
2 changes: 1 addition & 1 deletion nuztf/observations/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ztfquery.io import LOCALSOURCE

coverage_dir = Path(LOCALSOURCE).joinpath("all_obs")
coverage_dir.mkdir(exist_ok=True)
coverage_dir.mkdir(exist_ok=True, parents=True)

partial_flag = "_PARTIAL"

Expand Down
5 changes: 3 additions & 2 deletions nuztf/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
SKYMAP_DIR.mkdir(exist_ok=True, parents=True)

RESULTS_DIR = NUZTF_OUTPUT_DIR / "results"
RESULTS_DIR.mkdir(exist_ok=True, parents=True)
CACHE_DIR = NUZTF_OUTPUT_DIR / "cache"
CACHE_DIR.mkdir(exist_ok=True, parents=True)
BASE_CANDIDATE_DIR = CACHE_DIR / "candidates"
BASE_CANDIDATE_DIR.mkdir(exist_ok=True, parents=True)

CROSSMATCH_CACHE = CACHE_DIR / "crossmatch"
CROSSMATCH_CACHE.mkdir(exist_ok=True, parents=True)
Expand All @@ -28,5 +31,3 @@

PREPROCESSED_CACHE_DIR = CACHE_DIR / "preprocessed"
PREPROCESSED_CACHE_DIR.mkdir(exist_ok=True, parents=True)

ZTF_LOG_PATH = CACHE_DIR / "allexp.tbl"

0 comments on commit 8f1fef6

Please sign in to comment.