Skip to content

Commit

Permalink
re-ordered dark and flat in genred
Browse files Browse the repository at this point in the history
dark first, flat second. Also some doc updates, and a minor re-format of nrplot
  • Loading branch information
trmrsh committed Jun 2, 2021
1 parent 0ca3d89 commit 7b1113c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
43 changes: 25 additions & 18 deletions hipercam/scripts/genred.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


def genred(args=None):
"""``genred apfile rfile bias flat dark fmap fpair seeing (binfac)
"""``genred apfile rfile bias dark flat fmap fpair seeing (binfac)
template (inst (nccd (ccd) nonlin sat scale readout gain))``
Generates a reduce file as needed by |reduce| or |psf_reduce|. You
Expand All @@ -38,10 +38,18 @@ def genred(args=None):
It is assumed that the target is called '1', the main comparison '2'.
genred does not prompt for all parameters but accepts a "template"
file which can just be from a previous run of genred where such
parameters can be altered.
To avoid endless prompts, genred does not prompt for all
parameters but accepts a "template" file which can just be from a
previous run of genred where such parameters can be altered by
editing with a standard text editor before running genred. genred
recognises some standard instrument telescope combinations which
it uses to set parameters such as the pixel scale and readout
noise, but if you choose other, you will be prompted for these
details. The main parameters it does prompt for are calibration
files, and it allows you to define a "seeing" which then controls
the setting of various profile fit parameters. This can be ignored
by setting = 0, in which case any template parameters will be passed
unchanged.
Parameters:
Expand All @@ -66,12 +74,12 @@ def genred(args=None):
bias : str
Name of bias frame; 'none' to ignore.
flat : str
Name of flat field frame; 'none' to ignore.
dark : str
Name of dark frame; 'none' to ignore.
flat : str
Name of flat field frame; 'none' to ignore.
fmap : str
Name of fringe frame; 'none' to ignore.
Expand Down Expand Up @@ -141,8 +149,8 @@ def genred(args=None):
cl.register("rfile", Cline.GLOBAL, Cline.PROMPT)
cl.register("comment", Cline.LOCAL, Cline.PROMPT)
cl.register("bias", Cline.LOCAL, Cline.PROMPT)
cl.register("flat", Cline.LOCAL, Cline.PROMPT)
cl.register("dark", Cline.LOCAL, Cline.PROMPT)
cl.register("flat", Cline.LOCAL, Cline.PROMPT)
cl.register("fmap", Cline.LOCAL, Cline.PROMPT)
cl.register("fpair", Cline.LOCAL, Cline.PROMPT)
cl.register("seeing", Cline.LOCAL, Cline.PROMPT)
Expand Down Expand Up @@ -182,14 +190,6 @@ def genred(args=None):
ignore="none",
)

# flat field frame
flat = cl.get_value(
"flat",
"flat field frame ['none' to ignore]",
cline.Fname("flat", hcam.HCAM),
ignore="none",
)

# dark frame
dark = cl.get_value(
"dark",
Expand All @@ -198,6 +198,14 @@ def genred(args=None):
ignore="none",
)

# flat field frame
flat = cl.get_value(
"flat",
"flat field frame ['none' to ignore]",
cline.Fname("flat", hcam.HCAM),
ignore="none",
)

# fringe frame
fmap = cl.get_value(
"fmap",
Expand Down Expand Up @@ -1220,4 +1228,3 @@ def genred(args=None):
)

print("Reduce file written to {:s}".format(rfile))

7 changes: 5 additions & 2 deletions hipercam/scripts/nrtplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,11 @@ def nrtplot(args=None):
else:
drurl = None

# Some settings for the imaghe plots
cmap = cl.get_value("cmap", "colour map to use ['none' for mpl default]", "Greys")
# Some settings for the image plots
cmap = cl.get_value(
"cmap",
"colour map to use ['none' for mpl default]", "Greys"
)
cmap = None if cmap == "none" else cmap

imwidth = cl.get_value(
Expand Down

0 comments on commit 7b1113c

Please sign in to comment.