Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions obstools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
#
# @author: tbowers

"""Init File
"""
"""Init File"""


# Imports for signal and log handling
Expand Down
2 changes: 1 addition & 1 deletion obstools/neocp_ephem.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
.. warning::

This module is not yet functional!

"""

# Built-In Libraries
Expand Down
5 changes: 4 additions & 1 deletion obstools/scrub_deveny_pickup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import ccdproc.utils.slices
import matplotlib.pyplot as plt
import numpy as np

# from pypeit import msgs
import pypeit.spec2dobj
import scipy.fft
Expand Down Expand Up @@ -1012,7 +1013,9 @@ def package_into_fits(
suffix (Default: False)
"""
# Add a little history
time_str = datetime.datetime.now(datetime.UTC).isoformat(sep=" ", timespec="seconds")
time_str = datetime.datetime.now(datetime.UTC).isoformat(
sep=" ", timespec="seconds"
)
history_str = f"Written by package obstools: {time_str} UTC"
# For the image HDUs, include a basic header
img_hdr = astropy.io.fits.Header({"BUNIT": "ADU", "HISTORY": history_str})
Expand Down
3 changes: 1 addition & 2 deletions obstools/tests/test_celestial_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# @author: tbowers
# pylint: disable=missing-function-docstring

"""Celestial Time Utilities TEST Module
"""
"""Celestial Time Utilities TEST Module"""

import numpy as np
import pytest
Expand Down
3 changes: 1 addition & 2 deletions obstools/tests/test_deveny_grangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# @author: tbowers
# pylint: disable=missing-function-docstring

"""DeVeny Grating Angle Calculator TEST Module
"""
"""DeVeny Grating Angle Calculator TEST Module"""

import numpy as np

Expand Down
3 changes: 1 addition & 2 deletions obstools/tests/test_lmi_etc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# @author: tbowers
# pylint: disable=missing-function-docstring

"""LMI Exposure Time Calculator TEST Module
"""
"""LMI Exposure Time Calculator TEST Module"""

import numpy as np
import pytest
Expand Down
9 changes: 7 additions & 2 deletions obstools/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# @author: tbowers
# pylint: disable=missing-function-docstring

"""Utility TEST Module
"""
"""Utility TEST Module"""

from obstools import utils

Expand Down Expand Up @@ -40,6 +39,12 @@ def test_flatten_comprehension():
pass


def test_flatten_itertools():
nested_str = [["a", "b", "c"], ["d"], ["e"], ["f"], ["g"]]
flat_str = utils.flatten_itertools(nested_str)
assert flat_str == ["a", "b", "c", "d", "e", "f", "g"]
# Add other types of tests here...

def test_gaussfit():
pass

Expand Down
2 changes: 1 addition & 1 deletion obstools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def flatten_itertools(nested_list: list[list]) -> list:
:obj:`list`
The flattened list
"""
return [itertools.chain.from_iterable(nested_list)]
return [item for item in itertools.chain.from_iterable(nested_list)]


def gaussfit(
Expand Down