Skip to content

Commit

Permalink
grab.py -- suppressed fringe verbose output for bad frames
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Marsh committed May 24, 2021
1 parent ff3d20c commit d2b13e3
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions hipercam/scripts/grab.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ def grab(args=None):
dexpose = dark.head["EXPTIME"]
for cnam in mccd:
ccd = mccd[cnam]
cexpose = ccd.head["EXPTIME"]
scale = (cexpose - bexpose) / dexpose
ccd -= scale * dark[cnam]
if ccd.is_data():
cexpose = ccd.head["EXPTIME"]
scale = (cexpose - bexpose) / dexpose
ccd -= scale * dark[cnam]

if flat is not None:
mccd /= flat
Expand All @@ -350,18 +351,19 @@ def grab(args=None):
for cnam in fmap:
if cnam in fpair:
ccd = mccd[cnam]
if verbose:
print(f' CCD {cnam}')
if ccd.is_data():
if verbose:
print(f' CCD {cnam}')

fscale = fpair[cnam].scale(
ccd, fmap[cnam], nhalf, rmin, rmax,
verbose=verbose
)
fscale = fpair[cnam].scale(
ccd, fmap[cnam], nhalf, rmin, rmax,
verbose=verbose
)

if verbose:
print(f' Median scale factor = {fscale}')
if verbose:
print(f' Median scale factor = {fscale}')

ccd -= fscale*fmap[cnam]
ccd -= fscale*fmap[cnam]

if dtype == "u16":
mccd.uint16()
Expand Down

0 comments on commit d2b13e3

Please sign in to comment.