# @(#)fa_fields_list 1.7 09/14/99 FAST FIELDS LIST FUNCTION/PROCEDURE GENERAL USE / COMMENT HIGH LEVEL ROUTINES - INPUT DATA STRUCTURES fa_fields_bufs Determines stretches of data with no change in dt. Uses an external 'C' call. Very fast. fa_fields_combine Merges to data sets into the same time array. Can also interpolate. Spline will be added. Uses an external 'C' call. Very fast. fa_fields_cross A high level routine which produces FFT spectrum of time series data. Result is a spectrogram as a function of time. fa_fields_despin Easy to use, high-level pro. Point-by-point despin, nothcing, etc. of DCE. Works now. Changes will be made. Just type 'fa_fields_despin' and you're done! fa_fields_filter Filters data to pass-band. Has two methods, convol is default, /recursive uses 'C' call and is much faster - but introduces phase shifts. Has special /mag option for smoothing DC mag data. fa_fields_magdc Gets mag data and calibrates accurately. Still in development, frequently improved and updated. fa_fields_phase Produces monotonically increasing Bphase and Sphase. Will get phase data from SDT if no arguements are supplied. fa_fields_units Calibrates many of the fields data. Uses an external 'C' call. Fast. fa_fields_spin_ave Spin-by-spin boxcar or line fit (svdfit). Good for smoothing summary data. Handles nans/notch. Can be slow. fa_fields_reduce Fa_fields_reduce,dat,t1,t2 - Reduces data to times t1 to t2. Useful when overwhelmed by burst/HSBM data. Can be slow. fa_fields_store Stores fields data structures for tplot. Useful for displaying fields data that has been manipulated in some way. Merely a convenience, *NOT* for producing publication or presentation quality plots! GET ROUTINES get_fa_fields Gets any fields data. The cornerstone of FAST FIELDS IDL. get_fa_flds Simplified GET_FA_FIELDS. For looking only! get_density Easy to use, high-level pro that gets density data. /spin option will smooth for plotting. get_fields_mode gets modes and times when each was started, in fields structure format USEFUL UTILITIES bmean plots the mean of one array, binned according to another. curvout An outlier-rejection wrapper for IDL's CURVEFIT. fa_shadow stores a tplot quantity indicating when the spacecraft is in shadow or sun. ff_magfix Ff_magfix, MagDC will remove spin tone in Z component and smooth data. Good for AGU plots. Will be done in SDT eventually. ff_dat_to_ptr Changes comp* tags in fields structures into pointers. IDL >= 5 needed. ff_fixtime Fixes time reversals! WARNING: Time array is changed - only use with /fix option! Uses an external 'C' call. Very fast. ff_info Contains rotation angles, notch arrays, and potential - mV/m conversions. All constants should be put here. Make your own version if you do not like the defaults. ff_interp Replaces interp.pro. WARNING: The array order is NOT the same as interp. BOTH TIME ARRAYS MUST BE MONOTONIC (see ff_fixtime). Runs 10x faster. Uses an external 'C' call. ff_notch Provides a byte array of where to notch data (on sun or mag phase). Can interpolate through a notch or fnan the notched data. Uses ff_info to find notch angles. Mag angles tested - sun angles NOT TESTED. ff_potential Calculates the SC potential. If not supplied, fuction will get V58, V14, V8, and V4. The /save_mem option blows away V58, V14 etc after they are no longer needed. ff_ptr_to_dat The inverse of ff_dat_to_ptr! Need to do this sometimes if a new routine returns a structure to be used by an older routine. ff_quickfit Lightning fast (~1s) spinfit of DCE data. You get what you pay for. I would not publish output. Very useful for quick look. ff_smooth A weighted smoother, with some nice features. Handles ends sensibly. files_exist Given an array of strings, returns the ones that name existing files. find_gaps This takes either a structure or an array and picks out the indices where gaps *start*. A gap is an abrupt and temporary increase in the time between adjacent points. fa_fields_bufs() is similar. geoc2geod converts between geocentric and geodetic latitudes and altitudes. geomag Gets geomag data kp, ap, and dsp for given times. get_dqds returns a list of quantities currently loaded in SDT. See SHOW_DQIS. get_fa_fdf_att Returns uncorrected attitude information from FDF files. Fine for most things. deltas Computes the 3-point difference between adjacent array elements, ignoring NaN's. frac_indices Returns fractional indices of one array with respect to another. get_fa_orbit_times This is a function which returns the start and stop times given an orbit number. The actual return value is a status code, the times are returned in the parameters. get_fa_orbit_geomag Gets geomagnetic parameters for a specified orbit. inreal A way to prompt the user for a number and not crash if the user flubs up. fa_mean Computes the mean of an array, with NaN rejection. missing_tags Given a structure and a list of required tags, returns the number that are missing. missing_dqds Checks SDT setup for a list of required DQDS. pdqplot Makes a plot of what's in a fields structure, without storing, etc. Ugly, but sometimes handy. reduce_resolution Decimates arrays to a certain minimum delta t. It does it by knocking out every other point, until none are closer than what's asked for. select_range Returns indices where the values of an array lie in a specified range. show_dqis Displays information about data currently in SDT. svdout Svdfit with outlier tossing algorithm from Forrest. var_range Returns the max and min of an array as a two element deal: [min, max]. NaN's are ignored. wcopy opens a new window and copies the current plot into it. Use it to save what you've got; then you can change something, replot, and compare. what_orbit_is Dedicated to Dr. Robert Pfaff, this function returns the orbit number when given a string or double for the time. OTHER UTILITIES ask function that gets the answer to yes-or-no questions add_btot Calculates |B| and B_angle from spin plane and adds to MagDC structure. cumdist plots cumulative distribution of a variable cumdist_compare overplot two cumulative distributions for comparison extract_buf Reduces the size of data structure. Can be useful for burst and HSBM data. (Becoming obsolete see fa_fields_reduce). ff_dce_fix Used by fa_fields_despin. Not general utility. getspec Gets a single power or amplitude spectrum when given two arrays...time and data. Several keywords. The units and normalization are documented. helpfast access the WWW help pages for FAST IDL software. Can also be called fasthelp! hist makes a histogram plot of an array, in a manner analogous to IDL's plot command. Does the bins right. hist_compare superimposes two histogram plots. If you superimpose them by hand, you could easily bin them differently by mistake, trust me. hist_norm Histogram of x subject to some condition, divided by a histogram of x. int_up_to Given T and X, returns the integral of X up to T. So the first element of the returned array is always zero. legendre Legendre polynomials , suitable for SVDOUT use. mag_to_geo converts between geocentric and geomagnetic lat and lon. make_data_double Used with mag data. Will convert data from float to double precision in structure. nan_gap puts NaN's into time gaps of specified size. poly_eval Evaluates a polynomial, given coefficients and x's poly_out Outlier rejection wrapper for POLY_FIT, eclipsed by SVDOUT. matfrombas Builds a rotation matrix from two sets of basis vectors. Not a latin dance. noise Gives noise levels of SFA and DSP. power_spec Wrapper to FFT data. Recommend to use this routine to keep units correct. unwrap Removes the wrap from quanitites which have been modulo'd. Useful for converting the output of atan to a constantly increasing phase angle, for example.