From 0287ac4e7aaff1478b801df4043a40a66a27870c Mon Sep 17 00:00:00 2001 From: John ZuHone Date: Fri, 14 Apr 2023 13:20:06 -0400 Subject: [PATCH] Last doc bits --- pyxsim/source_models/power_law_sources.py | 2 +- pyxsim/utils.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyxsim/source_models/power_law_sources.py b/pyxsim/source_models/power_law_sources.py index f8523788..21b02948 100644 --- a/pyxsim/source_models/power_law_sources.py +++ b/pyxsim/source_models/power_law_sources.py @@ -10,7 +10,7 @@ class PowerLawSourceModel(SourceModel): - r""" + """ Initialize a source model from a power-law spectrum. Parameters diff --git a/pyxsim/utils.py b/pyxsim/utils.py index cf62b27e..a859ff2a 100644 --- a/pyxsim/utils.py +++ b/pyxsim/utils.py @@ -88,8 +88,9 @@ def validate_parameters(first, second, skip=None): def merge_files(input_files, output_file, overwrite=False, add_exposure_times=False): - r""" + """ Helper function for merging PhotonList or EventList HDF5 files. + Parameters ---------- input_files : list of strings @@ -97,16 +98,18 @@ def merge_files(input_files, output_file, overwrite=False, add_exposure_times=Fa output_file : string Name of the merged file to be outputted. overwrite : boolean, default False - If a the output file already exists, set this to True to + If the output file already exists, set this to True to overwrite it. add_exposure_times : boolean, default False If set to True, exposure times will be added together. Otherwise, the exposure times of all of the files must be the same. + Examples -------- >>> from pyxsim import merge_files >>> merge_files(["events_0.h5","events_1.h5","events_3.h5"], "events.h5", ... overwrite=True, add_exposure_times=True) + Notes ----- Currently, to merge files it is mandated that all of the parameters have the