Skip to content

Commit

Permalink
deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall committed Dec 18, 2024
1 parent b7c3108 commit 14dcbee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
20 changes: 20 additions & 0 deletions deprecated/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,23 @@ def match_qa(arc_spec, tcent, line_list, IDs, scores, outfile = None, title=None

plt.close()
return


def gen_timestamp():
""" Generate a simple time stamp including the current user
Returns
-------
timestamp : str
user_datetime
"""
tstamp = datetime.datetime.today().strftime('%Y-%m-%d-T%Hh%Mm%Ss')
try:
import getpass
user = getpass.getuser()
except ModuleNotFoundError:
# there appears to be a bug in getpass in windows systems where the pwd module doesn't load
user = os.getlogin()
# Return
return '{:s}_{:s}'.format(user, tstamp)

13 changes: 0 additions & 13 deletions pypeit/core/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,6 @@ def get_dimen(x, maxp=25):
return pages, npp


# THIS IS ONLY USED BY DEPRECATED FUNCTIONS
#def gen_timestamp():
# """ Generate a simple time stamp including the current user
#
# Returns
# -------
# timestamp : str
# user_datetime
# """
# tstamp = datetime.datetime.today().strftime('%Y-%m-%d-T%Hh%Mm%Ss')
# return '{:s}_{:s}'.format(pypeit_user, tstamp)


def html_header(title):
"""
Generate a simple HTML header
Expand Down

0 comments on commit 14dcbee

Please sign in to comment.