hipercam.scripts.makemovie ========================== .. py:module:: hipercam.scripts.makemovie Functions --------- .. autoapisummary:: hipercam.scripts.makemovie.makemovie Module Contents --------------- .. py:function:: 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))]`` ``makemovie`` is 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: source : str [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 ``source`` can be set using the environment variable HIPERCAM_DEFAULT_SOURCE. e.g. in bash :code:`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 ``:local`` or ``:server``. run : str [if source ends 's' or 'l'] run number to access, e.g. 'run034' flist : str [if source ends 'f'] name of file list first : int [if source ends 's' or 'l'] exposure number to start from. 1 = first frame. last : int [if source ends 's' or 'l'] last exposure trim : bool [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. ncol : int [if trim, hidden] Number of columns to remove (on left of left-hand window, and right of right-hand windows) nrow : int [if trim, hidden] Number of rows to remove (bottom of windows) ccd : str 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. nx : int [if more than 1 CCD] number of panels across to display for the image display. bias : str Name of bias frame to subtract, 'none' to ignore. dark : str Name of dark frame to subtract, 'none' to ignore. flat : str 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. defect : str Name of defect file, 'none' to ignore. fmap : str Name of fringe map (see e.g. `makefringe`), 'none' to ignore. fpair : str [if fringe is not 'none'] Name of fringe pair file (see e.g. `setfringe`). Required if a fringe map has been specified. nhalf : int [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. rmin : float [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. rmax : float [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. log : str Name of reduce log file for light curve plot, 'none' to ignore targ : str [if log defined] Target aperture comp : str [if log defined] Comparison aperture ymin : float [if log defined] Minimum Y value for light curve plot ymax : float [if log defined] Maximum Y value for light curve plot ynorm : list(float) [if log defined] Normalisation factors, one per CCD for light curve plot yoffset : list(float) [if log defined] Offsets, one per CCD for light curve plot location : str [if log defined] Offsets, one per CCD for light curve plot fraction : float [if log defined] Fraction of figure to occupy, by height if location is South, by width if it is East lpad : tuple(float) [if log defined] padding on left, bottom, right and top of light curve plot as fraction of allocated width and height cmap : str 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. width : float plot width in inches. height : float plot height in inches. dstore : str root directory for plot files. Will get names like dstore/run003_001.png. ndigit : int number of digits in frame counter, i.e. the '001' of the previous section. fext : str file extension 'png', 'jpeg' for images generated msub : bool subtract the median from each window before scaling for the image display or not. This happens after any bias subtraction. iset : str [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. ilo : list(float) [if iset='d'] lower intensity level, one per image ihi : list(float) [if iset='d'] upper intensity level, one per image plo : float [if iset='p'] lower percentile level phi : float [if iset='p'] upper percentile level xlo : float 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. xhi : float right-hand X-limit for plot (can be < xlo to invert the display) ylo : float lower Y-limit for plot yhi : float upper Y-limit for plot (can be < ylo) dpi : int [hidden] dots per inch of output. Default 72. Allows control over font size versus image size, in combination with width and height. style : str [hidden, if log defined] style for light curves 'dots', 'line', 'both'. The line will be grey for the 'both' option. ms : float [hidden, if log defined and style==dots or both] markersize. Controls dot size which is useful when fiddling with dpi lw : float [hidden, if log defined and style==line or both] line width .. !! processed by numpydoc !!