hipercam.scripts.shiftadd¶
Functions¶
|
``shiftadd [source] (run first last twait tmax | flist) rfilen refccd |
Module Contents¶
- hipercam.scripts.shiftadd.shiftadd(args=None)¶
shiftadd [source] (run first last twait tmax | flist) rfilen refccd fthresh reprmethod [(reprorder | consflux reprkernel kwidth regwidth)] trim ([ncol nrow]) method [(sigma maxiters)] [overwrite] outputAverages images from a run using mean combination, but shifting each image based on the positions of stars.
Parameters:
- sourcestr [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‘hf’ is used to look at sets of frames generated by ‘grab’ or converted from foreign data formats. The standard start-off default for
sourcecan be set using the environment variable HIPERCAM_DEFAULT_SOURCE. e.g. in bashexport 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>:localor<instrument>:server.- runstr [if source ends ‘s’ or ‘l’]
run number to access, e.g. ‘run034’
- fliststr [if source ends ‘f’]
name of file list
- firstint [if source ends ‘s’ or ‘l’]
exposure number to start from. 1 = first frame (‘0’ is not supported).
- lastint [if source ends ‘s’ or ‘l’]
last exposure number must be >= first, or 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.
- rfilenstr
name of reduce file.
- refccdstr
reference CCD to use for finding offsets
- fthreshfloat
maximum FWHM to allow, in unbinned pixels on the reference CCD. frames with FWHM > fthresh will be ignored.
- reprmethodstr
Method to use for reprojecting the data, three options:
‘interp’: the fastest, but does not conserve flux‘adaptive’: slower, but conserves flux‘exact’: the slowest but most accurate, only available if the input data contains WCS info (currently HiPERCAM only)The default is ‘adaptive’. See https://reproject.readthedocs.io for details.
- reprorderint [if reprmethod is ‘interp’; hidden]
Order of interpolation to use. 0 is nearest neighbour, 1 is bilinear, 2 is quadratic, 3 is cubic. 1 is the default.
- consfluxbool [if reprmethod is ‘adaptive’; hidden]
conserve flux when reprojecting. True is the default.
- reprkernelstr [if reprmethod is ‘adaptive’; hidden]
The averaging kernel to use. Allowed values are ‘Hann’ and ‘Gaussian’. The Gaussian kernel produces better photometric accuracy and stronger anti-aliasing at the cost of some blurring (on the scale of a few pixels). If not specified, the Gaussain kernel is used by default.
- kwidthfloat [if reprmethod is ‘adaptive’; hidden]
The width of the kernel in pixels, expressed as the standard deviation of the Gaussian kernel. Is not used for the Hann kernel. Reducing this width may introduce photometric errors or leave input pixels under-sampled, while increasing it may improve the degree of anti-aliasing but will increase blurring of the output image. If this width is changed from the default, a proportional change should be made to the value of regwidth to maintain an equivalent degree of photometric accuracy. Default is 1.3.
- regwidthfloat [if reprmethod is ‘adaptive’; hidden]
The width in pixels of the output-image region which, when transformed to the input plane, defines the region to be sampled for each output pixel. Used only for the Gaussian kernel, which otherwise has infinite extent. This value sets a trade-off between accuracy and computation time, with better accuracy at higher values. The default value of 4, with the default kernel width, should limit the most extreme errors to less than one percent. Higher values will offer even more photometric accuracy.
- trimbool
True to trim columns and/or rows off the edges of windows nearest the readout. Useful for ULTRACAM particularly.
- ncolint [if trim, hidden]
Number of columns to remove (on left of left-hand window, and right of right-hand windows)
- nrowint [if trim, hidden]
Number of rows to remove (bottom of windows)
- methodstr [hidden, defaults to ‘m’]
‘m’ for median, ‘c’ for clipped mean.
- sigmafloat [hidden; if method == ‘c’]
With clipped mean combination, pixels that deviate by more than sigma RMS from the mean are kicked out. This is carried out in an iterative manner. sigma <= 0 implies no rejection, just a straight average. sigma=3 is typical.
- maxitersint [hidden; if method == ‘c’]
Maximum number of iterations in sigma clipping. 3 is typical.
- overwritebool [hidden]
overwrite any pre-existing output files
- outputstring
output file