From 79ba18a58fb1155a1b3fe390f10e4d2cab8bc86a Mon Sep 17 00:00:00 2001 From: Lukas Nickel Date: Tue, 9 May 2023 13:38:25 +0000 Subject: [PATCH] Adress review comments --- README.md | 2 +- scripts/calc_flux_points.py | 8 +++----- workflow/Snakefile | 4 ---- workflow/envs/snakemake.yml | 3 +-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ff372b1..4c2897f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You need configuration files. Check [our example repository](https://github.com/ git clone https://github.com/nbiederbeck/lst-analysis-config.git ../lst-analysis-config ``` -You need snakemake and astropy installed. If you do not have that, you can create an enviroment with only snakemake like this: +You need snakemake and astropy installed. If you do not have that, you can create an enviroment with only these packages like this: ``` mamba env create -f workflow/envs/snakemake.yml diff --git a/scripts/calc_flux_points.py b/scripts/calc_flux_points.py index c49c56e..1f4e7a0 100644 --- a/scripts/calc_flux_points.py +++ b/scripts/calc_flux_points.py @@ -6,11 +6,9 @@ def select_timeframe(datasets, t_start, t_stop): - if t_start or t_stop: - t_start = Time(t_start, format="mjd") if t_start else datasets.gti.time_start[0] - t_stop = Time(t_stop, format="mjd") if t_stop else datasets.gti.time_stop[-1] - datasets = datasets.select_time(t_start, t_stop) - return datasets + t_start = Time(t_start, format="mjd") if t_start else datasets.gti.time_start[0] + t_stop = Time(t_stop, format="mjd") if t_stop else datasets.gti.time_stop[-1] + return datasets.select_time(t_start, t_stop) def main( # noqa: PLR0913 diff --git a/workflow/Snakefile b/workflow/Snakefile index b3cc318..6939072 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -56,7 +56,3 @@ rule all: dl3_plots, dl4_plots, irf_plots, - - -localrules: - link_paths, diff --git a/workflow/envs/snakemake.yml b/workflow/envs/snakemake.yml index 7ae14b2..aefc1bf 100644 --- a/workflow/envs/snakemake.yml +++ b/workflow/envs/snakemake.yml @@ -1,7 +1,6 @@ name: snakemake channels: - - bioconda - conda-forge dependencies: - - snakemake + - bioconda::snakemake - astropy