;+ ; This procedure is used to specify how many channels at the beginning of ; the spectrum should be ignored, when plotting. It is useful to ignore ; the bad autoscaling that can result when the edge of the spectrum contains ; bad values. ; ; Note that the values are applied in channel space, so depending on whether the ; plot is shown in channels, frequency, or velocity, a bdrop value may ; affect the left or right side of the plotted spectrum ; ; @param nchan {in}{required}{type=int} number of channels to drop from the ; beginning of the plot ; ; @examples ; bdrop,10 ; show ; ; @version $Id: bdrop.pro,v 1.3 2005/04/29 06:02:19 bgarwood Exp $ ;- pro bdrop,nchan compile_opt idl2 common gbtplot_common,mystate,xarray if n_params() ne 1 then begin message,"Usage: bdrop, nchans",/info return end datalen = data_valid(!g.s[0]) if datalen le 0 then begin message,'No data has been plotted yet.',/info return endif if ((nchan lt 0) or (nchan ge datalen)) then $ message, 'Bad value. Must be between 0 and ',datalen mystate.bdrop = nchan if !g.frozen eq 0 then show,/reshow end