hipercam.scripts.makemovie¶
Functions¶
|
``makemovie [source] (run first last | flist) trim ([ncol nrow]) |
Module Contents¶
- hipercam.scripts.makemovie.makemovie(args=None)¶
makemovie [source] (run first last | flist) trim ([ncol nrow]) (ccd (nx)) bias flat defect log (targ comp ymin ymax yscales yoffset location fraction lpad) cmap width height dstore ndigit fext msub iset (ilo ihi | plo phi) xlo xhi ylo yhi [dpi (style (ms lw))]makemovieis for generating stills to combine into a movie for presentations. It can optionally also read a log file from the run to display an evolving light curve. There are lots of fiddly parameters mostly to do with the plot positioning, so try it out on a small number of frames first before going mad.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.
- lastint [if source ends ‘s’ or ‘l’]
last exposure
- trimbool [if source starts with ‘u’]
True to trim columns and/or rows off the edges of windows nearest the readout which can sometimes contain bad data.
- 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)
- ccdstr
CCD(s) to plot, ‘0’ for all, ‘1 3’ to plot ‘1’ and ‘3’ only, etc. If you plot more than one, then a legend is added to any light curve panel to distinguish the light curves.
- nxint [if more than 1 CCD]
number of panels across to display for the image display.
- biasstr
Name of bias frame to subtract, ‘none’ to ignore.
- darkstr
Name of dark frame to subtract, ‘none’ to ignore.
- flatstr
Name of flat field to divide by, ‘none’ to ignore. Should normally only be used in conjunction with a bias, although it does allow you to specify a flat even if you haven’t specified a bias.
- defectstr
Name of defect file, ‘none’ to ignore.
- fmapstr
Name of fringe map (see e.g. makefringe), ‘none’ to ignore.
- fpairstr [if fringe is not ‘none’]
Name of fringe pair file (see e.g. setfringe). Required if a fringe map has been specified.
- nhalfint [if fringe is not ‘none’, hidden]
When calculating the differences for fringe measurement, a region extending +/-nhalf binned pixels will be used when measuring the amplitudes. Basically helps the stats.
- rminfloat [if fringe is not ‘none’, hidden]
Minimum individual ratio to accept prior to calculating the overall median in order to reduce the effect of outliers. Although all ratios should be positive, you might want to set this a little below zero to allow for some statistical fluctuation.
- rmaxfloat [if fringe is not ‘none’, hidden]
Maximum individual ratio to accept prior to calculating the overall median in order to reduce the effect of outliers. Probably typically < 1 if fringe map was created from longer exposure data.
- logstr
Name of reduce log file for light curve plot, ‘none’ to ignore
- targstr [if log defined]
Target aperture
- compstr [if log defined]
Comparison aperture
- yminfloat [if log defined]
Minimum Y value for light curve plot
- ymaxfloat [if log defined]
Maximum Y value for light curve plot
- ynormlist(float) [if log defined]
Normalisation factors, one per CCD for light curve plot
- yoffsetlist(float) [if log defined]
Offsets, one per CCD for light curve plot
- locationstr [if log defined]
Offsets, one per CCD for light curve plot
- fractionfloat [if log defined]
Fraction of figure to occupy, by height if location is South, by width if it is East
- lpadtuple(float) [if log defined]
padding on left, bottom, right and top of light curve plot as fraction of allocated width and height
- cmapstr
The matplotlib colour map to use. “Greys” gives the usual greyscale. “none” will give whatever the current default is. Many other choices: “viridis”, “jet”, “hot”, “Oranges”, etc. Enter an invalid one and the program will fail but return a huge list of possibles in the process.
- widthfloat
plot width in inches.
- heightfloat
plot height in inches.
- dstorestr
root directory for plot files. Will get names like dstore/run003_001.png.
- ndigitint
number of digits in frame counter, i.e. the ‘001’ of the previous section.
- fextstr
file extension ‘png’, ‘jpeg’ for images generated
- msubbool
subtract the median from each window before scaling for the image display or not. This happens after any bias subtraction.
- isetstr [single character]
determines how the intensities are determined. There are three options: ‘a’ for automatic simply scales from the minimum to the maximum value found on a per CCD basis. ‘d’ for direct just takes two numbers from the user. ‘p’ for percentile dtermines levels based upon percentiles determined from the entire CCD on a per CCD basis.
- ilolist(float) [if iset=’d’]
lower intensity level, one per image
- ihilist(float) [if iset=’d’]
upper intensity level, one per image
- plofloat [if iset=’p’]
lower percentile level
- phifloat [if iset=’p’]
upper percentile level
- xlofloat
left-hand X-limit for plot, initially at least since it is possible to re-size. For iset=’p’ these limits also set the region of the frame over which the percentil will be calculated. You will usually want yhi-ylo ~ xhi-xlo in magnitude because the aspect ratio is preserved.
- xhifloat
right-hand X-limit for plot (can be < xlo to invert the display)
- ylofloat
lower Y-limit for plot
- yhifloat
upper Y-limit for plot (can be < ylo)
- dpiint [hidden]
dots per inch of output. Default 72. Allows control over font size versus image size, in combination with width and height.
- stylestr [hidden, if log defined]
style for light curves ‘dots’, ‘line’, ‘both’. The line will be grey for the ‘both’ option.
- msfloat [hidden, if log defined and style==dots or both]
markersize. Controls dot size which is useful when fiddling with dpi
- lwfloat [hidden, if log defined and style==line or both]
line width