Skip to content

Commit

Permalink
pastembargohours is now a float
Browse files Browse the repository at this point in the history
  • Loading branch information
beckynevin committed Jun 11, 2024
1 parent 0759362 commit 5bfe058
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/move_embargo_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def parse_args():
Path to the Butler repository to which data is transferred.
instrument : `str`
Instrument name. Default is 'LATISS'.
pastembargohours : `str`, optional
pastembargohours : `float`, optional
Time to search past the embargo period in hours.
Useful for transferring limited data during initial testing.
embargohours : `list` [`float`], optional
Expand Down Expand Up @@ -87,15 +87,6 @@ def parse_args():
default="LATISS",
help="Instrument. Input str",
)
parser.add_argument(
"--pastembargohours",
type=str,
required=False,
help="Time to search past the embargo time period in hours. \
Input str. Defines a window of data that will be transferred. \
This is helpful for transferring a limited amount of data \
during the initial testing of the deployment.",
)
parser.add_argument(
"--embargohours",
nargs="+",
Expand All @@ -104,6 +95,15 @@ def parse_args():
# default=80.0,
help="Embargo time period in hours. Input float or list",
)
parser.add_argument(
"--pastembargohours",
type=float,
required=False,
help="Time to search past the embargo time period in hours. \
Input float. Defines a window of data that will be transferred. \
This is helpful for transferring a limited amount of data \
during the initial testing of the deployment.",
)
parser.add_argument(
"--use_dataquery_config",
required=False,
Expand Down Expand Up @@ -258,7 +258,7 @@ def parse_args():
# if this argument is specified, we're placing a limit on the
# amount of data before that to be transferred
past_embargo_period = astropy.time.TimeDelta(
float(namespace.pastembargohours) * 3600.0, format="sec"
namespace.pastembargohours * 3600.0, format="sec"
)
timespan_pastembargo = Timespan(
now - embargo_period - past_embargo_period, now - embargo_period
Expand Down Expand Up @@ -298,7 +298,7 @@ def parse_args():
# amount of data before that to be transferred
past_embargo_periods = [
astropy.time.TimeDelta(
float(namespace.pastembargohours) * 3600.0, format="sec"
namespace.pastembargohours * 3600.0, format="sec"
)
for hours in embargo_hours
]
Expand Down

0 comments on commit 5bfe058

Please sign in to comment.