Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
adding relative path code to generate_waveforms
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgunny committed Aug 29, 2022
1 parent 59a7544 commit ff15493
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion projects/sandbox/generate_waveforms/generate_waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@typeo
def main(
prior_file: str,
prior_file: Path,
n_samples: int,
logdir: Path,
datadir: Path,
Expand Down Expand Up @@ -56,6 +56,11 @@ def main(
)
return signal_file

# if prior file is a relative path,
# make it relative to this script
if not prior_file.is_absolute():
prior_file = Path(__file__).resolve().parent / prior_file

# log and print out some simulation parameters
logging.info("Simulation parameters")
logging.info("Number of samples : {}".format(n_samples))
Expand Down
2 changes: 1 addition & 1 deletion projects/sandbox/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ verbose = true
commands.resnet = "${base.resnet}"

[tool.typeo.scripts.timeslide_injections]
start = 1262620622
start = "${base.stop}"
stop = 1262751694
datadir = "${base.basedir}/timeslide_injections/"
logdir = "${base.logdir}"
Expand Down

0 comments on commit ff15493

Please sign in to comment.