Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/

nn.pro


Routines

top source nn

result = nn(data, time, x=x, y=y, v=v)

NAME: nn PURPOSE: Find the index of the data point(s) nearest to the specified time(s) CALLING SEQUENCE: ind=nn(data,time) INPUTS: data: a data structure, a tplot variable name/index, or a time array time: (double) seconds from 1970-01-01, scalar or array if not present, "ctime" is called to get time(s) OPTIONAL INPUTS: none KEYWORD PARAMETERS: x, y, & v: set to named keywords to return the values of the x, y, & v arrays, if applicable OUTPUTS: a long scalar index or long array of indicies on failure, returns: -2 if bad inputs, -1 if nearest neighbor not found EXAMPLE: ctime,times,npoints=2 inds=nn('Np',times) get_data,'Np',data=dens & get_data,'Tp',data=temp plot,dens.y(inds(0):inds(1)),temp(inds(0):inds(1)) LAST MODIFICATION: @(#)nn.pro 1.8 02/04/17 CREATED BY: Frank Marcoline

Parameters

data
time

Keywords

x
y
v

File attributes

Modification date: Thu Feb 13 16:43:48 2014
Lines: 37