Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Oct 31, 2023
1 parent ba13e03 commit 8825167
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions xfaster/gcorr_tools.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import os
import glob
from configparser import ConfigParser
from . import parse_tools as pt
import numpy as np
from . import parse_tools as pt


def get_gcorr_config(filename):
"""
Return a ConfigParser for running the gcorr iteration scripts.
Return a dictionary of options for running the gcorr iteration scripts.
Arguments
---------
filename : str or ConfigParser
filename : str or dict
Filename to load.
Returns
-------
cfg : ConfigParser
cfg : dict
"""
if isinstance(filename, dict):
return filename

assert os.path.exists(filename), "Missing config file {}".format(filename)

from configparser import ConfigParser
from ast import literal_eval

cfg = ConfigParser()
cfg.read(filename)

from ast import literal_eval

out = {}
for sec, sec_items in cfg.items():
if not len(sec_items):
Expand Down Expand Up @@ -64,7 +64,7 @@ def run_xfaster_gcorr(
Arguments
---------
cfg : str or ConfigParser
cfg : str or dict
Configuration to use
output : str
Output root where the data product will be stored.
Expand Down Expand Up @@ -131,7 +131,7 @@ def compute_gcal(cfg, output="xfaster_gcal", output_tag=None, fit_hist=False):
Arguments
---------
cfg : str or ConfigParser
cfg : str or dict
Configuration to use
output : str
Output root where the data product will be stored.
Expand Down

0 comments on commit 8825167

Please sign in to comment.