This page was created by the IDL library routine
mk_html_help2
.
Last modified: Fri Apr 1 11:58:51 2022.
FUNCTION average(array,d [,STDEV=stdev] [,/NAN]) PURPOSE: Returns the average value of an array. The input array can be an array of structures Similar to TOTAL, but returns the average over the given dimension. Also returns standard deviation via an optional keyword argument. Works with structures only if d eq 0 Notes: $LastChangedBy: ali $ $LastChangedDate: 2017-05-01 12:37:30 -0700 (Mon, 01 May 2017) $ $LastChangedRevision: 23254 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_5_0/general/tools/misc/average.pro $
(See general/tools/misc/average.pro)
FUNCTION average_hist(d,x [,STDEV=stdev]) returns the average of d binned according to x See "HISTBINS" for a description of keywords USAGE: assuming: x = randomu(seed,1000)*10 y = 10-.1*x^2 + randomn(seed,1000) d = y avg = average_hist(d,x,xbins=xc) avg = average_hist(d,x,xbins=xc,range=[2,8],binsize=.25) plot,x,y,psym=3 oplot,xc,avg,psym=-4 NOTE: d can be an array of structures: d=replicate({x:0.,y:0.},1000) d.x = x d.y = y plot,d.x,d.y,psym=3 avg = average_hist(d,d.x) oplot,avg.x,avg.y,psym=-4
(See general/tools/misc/average_hist.pro)
FUNCTION: dgen(n) PURPOSE: returns an array of n doubles that are scaled between two limits. INPUT: n: number of data points. (uses 100 if no value is passed) KEYWORDS: one of the next 3 keywords should be set: XRANGE: uses !x.crange (current x limits) for the scaling. YRANGE: uses !y.crange (current y limits) for the scaling. RANGE: user selectable range. LOG: user selectable log scale (Used with RANGE) EXAMPLES: x = dgen(/x) ; Returns 100 element array of points evenly distributed along ; the x-axis.
(See general/tools/misc/dgen.pro)
Written by Davin Larson - August 2016 $LastChangedBy: davin-mac $ $LastChangedDate: 2022-02-16 18:54:30 -0800 (Wed, 16 Feb 2022) $ $LastChangedRevision: 30593 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_5_0/general/tools/misc/dynamicarray__define.pro $ Purpose: Object that provides an efficient means of concatenating arrays da= DynamicArray([InitialArray][,name='name1') Purpose: Returns a "dynamic array" object. This dynamic array can have any number of elements and can be efficiently appended to. This routine is particularly useful when appending to large arrays on numerous occassions. This is especially useful when the final size of the array is not known when first initialized. It is functionally equivalent to: a= findgen(10) b = 1. a = [a,b] but considerably more effiecient because the array size does not need to be increased at every append operation. Because one can produce arrays of objects, it is a conveniant way of constructing arrays of arrays containing different things. Works with multidimensional arrays too. USAGE: da = dynamicarray(findgen(1000000), name='Test1') Or da.array = findgen(1000000) ; equivalent Or da = dynamicarray() & da.append, findgen(1000000) da.append, findgen(1000) ; append some data da.append, !values.f_nan ; add a NAN at the end. da.name = 'NewName' ; change name a = da.array ; retrieve a copy of the array print,da.size ; print the number of elements in the array (first dimension of multidimensional arrays) help,da.name ; display the optional user name object_destroy, da ; cleanup when done.
(See general/tools/misc/dynamicarray__define.pro)
FUNCTION: w = enclosed(x,y [cx,cy],NCIRCS=NCIRCS,COUNT=COUNT) PURPOSE: Returns the indices of a set of x,y points that are inside a contour. INPUT: x,y: data set of points. (x and y must be the same dimension) cx,cy: vector of x,y pairs that describe a closed contour. if cx,cy are not provided then the cursor is used to obtain it. OUTPUT: W: Array of indices of x (& y) that are within the contour cx,cy. NCIRCS: Same dimension as x (& y); integer array giving the number of times each point is encircled. COUNT: Size of array W
(See general/tools/misc/enclosed.pro)
WIDGET Procedure: EXEC PURPOSE: Widget tool that executes a user specified routine. This tool runs in the background. Author: Davin Larson - Feb 2012 $LastChangedBy: $ $LastChangedDate: $ $LastChangedRevision: $ $URL: $
(See general/tools/misc/exec.pro)
NAME: getxy PURPOSE: Routine that uses the cursor to select points.
(See general/tools/misc/getxy.pro)
PROCEDURE: print_struct, data, tags=tags PURPOSE: prints data in an array of structures. CALLING PROCEDURE: print_struct, data KEYWORDS: TAGS: tagnames of structure to print CREATED BY: Davin Larson, 1997
(See general/tools/misc/print_struct.pro)
FUNCTION: data=read_asc(filename) PURPOSE: Reads data from an ascii file and puts data in an array of structures. Columns of data should be delimited by spaces. Data is returned as an array of structures. The elements of the structure correspond to the columns of the file. CALLING PROCEDURE: read_ascii,data,'file.dat' KEYWORDS: TAGS: If set then the labels in the text line preceeding the data will be used for the default struct tag names. (There should be one label per column of data) FORMAT: a structure that specifies the output format of the data. For example if the input file has the following data: Year Day secs Vx Vy Vz N 1996 123 13.45 512.3 -10.3 10.5 5.3 the format could be specified as: FORMAT={year:0,day:0,sec:0.d,v:fltarr(3),n:0.} if this keyword is not specified then a default structure will be created. NHEADER: set to number of header lines CREATED BY: Davin Larson $LastChangedBy: davin-mac $ $LastChangedDate: 2021-11-08 16:33:53 -0800 (Mon, 08 Nov 2021) $ $LastChangedRevision: 30411 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_5_0/general/tools/misc/read_asc.pro $
(See general/tools/misc/read_asc.pro)
WIDGET Procedure: RECORDER PURPOSE: Widget tool that opens a socket and records streaming data from a server (host) and can save it to a file or send to a user specified routine. This tool runs in the background. Keywords: SET_FILE_TIMERES : defines how often the current output file will be closed and a new one will be opened DIRECTORY: string prepended to fileformat when opening an output file. Author: Davin Larson - April 2011 $LastChangedBy: ali $ $LastChangedDate: 2021-09-24 16:07:57 -0700 (Fri, 24 Sep 2021) $ $LastChangedRevision: 30319 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_5_0/general/tools/misc/recorder.pro $
(See general/tools/misc/recorder.pro)
PROCEDURE: xy_edit,x,y,bins PURPOSE: Interactively select data points
(See general/tools/misc/xy_edit.pro)
FUNCTION: yymmdd_to_time PURPOSE: Returns time (seconds since 1970) given date in format: YYMMDD HHMM USAGE: t = yymmdd_to_time(yymmdd [,hhmm]) (yymmdd can be either a long or a string) Examples: t = yymmdd_to_time(990421,1422) print,t,' ',time_string(t) Created by: Davin Larson, April 1999
(See general/tools/misc/yymmdd_to_time.pro)