hipercam.scripts.makedark

Command line script to create a dark frame

Functions

makedark([args])

``makedark [source] (run first last [twait tmax] | flist) bias

Module Contents

hipercam.scripts.makedark.makedark(args=None)

makedark [source] (run first last [twait tmax] | flist) bias sigma output

Combines the frames of a single run into a single frame using clipped-mean averaging. This uses grab to get the frames and combine to combine them. It subtracts a bias and corrects the exposure time by the exposure time of the bias.

Parameters:

sourcestring [hidden]

Data source, five options for built-in sources:

‘hs’ : HiPERCAM server
‘hl’ : local HiPERCAM FITS file
‘us’ : ULTRACAM server
‘ul’ : local ULTRACAM .xml/.dat files
‘hf’ : list of HiPERCAM hcm FITS-format files

The standard start-off default for source can be set using the environment variable HIPERCAM_DEFAULT_SOURCE. e.g. in bash export HIPERCAM_DEFAULT_SOURCE="us" would ensure it always started with the ULTRACAM server by default. If unspecified, it defaults to ‘hl’.

Any instruments installed via plugins can be used as a source by specifying either <instrument>:local or <instrument>:server.

runstr [if source ends ‘s’ or ‘l’]

run name to access

firstint [if source ends ‘s’ or ‘l’]

First frame to access

lastint [if source ends ‘s’ or ‘l’]

Last frame to access, 0 for the lot

twaitfloat [[if source ends ‘s’ or ‘l’, hidden]

time to wait between attempts to find a new exposure, seconds.

tmaxfloat [[if source ends ‘s’ or ‘l’, hidden]

maximum time to wait between attempts to find a new exposure, seconds.

fliststr [if source ends ‘f’]

name of file list. Assumed that these are dias and dark corrected.

biasstr

Names of bias frame (made e.g. with |makebias|). This is so that the counts left in the dark frame are genuine dark counts which can be scaled by the ratio of exposure lengths during dark subtraction.

sigmafloat

The value of ‘sigma’ to pass to the clipped mean combination in ‘combine’

outputstr

name of final combined file

Note

This routine writes the files returned by ‘grab’ to automatically generated files, typically in .hipercam/tmp, to avoid polluting the working directory. These are removed at the end, but may not be if you ctrl-C. You should check .hipercam/tmp for redundant files every so often