Skip to content

Commit

Permalink
streamlined handling of grab arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
trmrsh committed May 26, 2021
1 parent 203f272 commit 4d5ae4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
9 changes: 2 additions & 7 deletions hipercam/scripts/makedark.py
Expand Up @@ -169,15 +169,10 @@ def makedark(args=None):

print("\nCalling 'grab' ...")

args = [None, "prompt", source, "yes"]
args = [None, "prompt", source, "yes", resource]

if server_or_local:
args += [
resource, str(first), str(last),
str(twait), str(tmax)
]
else:
args += [flist]
args += [str(first), str(last), str(twait), str(tmax)]

args += [
"no",
Expand Down
11 changes: 2 additions & 9 deletions hipercam/scripts/makeflat.py
Expand Up @@ -288,16 +288,9 @@ def makeflat(args=None):

print("\nCalling 'grab' ...")

args = [None, "prompt", source, "yes"]

args = [None, "prompt", source, "yes", resource]
if server_or_local:
args += [
resource, str(first), str(last),
str(twait), str(tmax)
]
else:
args += [flist]

args += [str(first), str(last),str(twait), str(tmax)]
args += [
"no",
"none" if bias is None else bias,
Expand Down
11 changes: 3 additions & 8 deletions hipercam/scripts/makefringe.py
Expand Up @@ -152,7 +152,7 @@ def makefringe(args=None):
cl.register("dark", Cline.LOCAL, Cline.PROMPT)
cl.register("flat", Cline.LOCAL, Cline.PROMPT)
cl.register("fpair", Cline.LOCAL, Cline.PROMPT)
cl.register("nhalf", Cline.LOCAL, Cline.HIDE)
cl.register("nhalf", Cline.LOCAL, Cline.PROMPT)
cl.register("ccd", Cline.LOCAL, Cline.PROMPT)
cl.register("fwhm", Cline.LOCAL, Cline.PROMPT)
cl.register("clobber", Cline.LOCAL, Cline.HIDE)
Expand Down Expand Up @@ -256,14 +256,9 @@ def makefringe(args=None):

print("\nCalling 'grab' ...")

args = [None, "prompt", source, "yes"]
args = [None, "prompt", source, "yes", resource]
if server_or_local:
args += [
resource, str(first), str(last),
str(twait), str(tmax)
]
else:
args += [flist]
args += [str(first), str(last), str(twait), str(tmax)]
args += [
"no",
"none" if bias is None else bias,
Expand Down

0 comments on commit 4d5ae4e

Please sign in to comment.