This page was created by the IDL library routine
mk_html_help2.
Last modified: Thu Oct 7 03:01:25 1999.
FUNCTION: CALC_ESA_GEOM DESCRIPTION: function to get esa geometry factors CALLING SEQUENCE: data = calc_esa_geom(esa_data_struct) ARGUMENTS: esa_data_struct This is a struct return by a get_?esa_* () routine. This must contain the header_bytes and time structure tag. RETURN VALUE: Upon success, an array of floats containing the geometry factor for each energy bin. else a scaler -1 is returned. REVISION HISTORY: @(#)calc_fa_esa_geom.pro 1.2 03/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '96
(See fastDataToIdl/esaUtil/calc_fa_esa_geom.pro)
This code contains the default limits for DC fields summary plots. There are separate limits for electric field, magnetic field, probe current, spin angle, and spacecraft potential. Within those categories, the limits are all the same. There are several choices for each limit, the data determine which choice is used. At least MIN_ON_SCALE of the points must be on scale, otherwise the next larger choice is tried.
(See fastDataToIdl/batch/default_dc_limits.pro)
FUNCTION: EIESA_UNPACK_SURV_HDR DESCRIPTION: function to unpack the Eesa and Iesa packet headers A structure of the following format is returned: DATA_NAME STRING 'E[I]esa Survey Header' VALID INT 1 PROJECT_NAME STRING 'FAST' UNITS_NAME STRING 'Raw' TIME DOUBLE 8.0118726e+08 SPIN_NUMBER INT 0 SPIN_PHASE INT 0 MAG_PHASE INT 0 SWEEP_MODE INT 0 RETRACE INT 0 TOP_ENERGY INT 0 DIRECTION INT 0 AMPLITUDE INT 0 CALIBRATE_MODE INT 0 LOW_ENERGY INT 0 DWELL INT 0 ACCUM INT 0 MODE INT 0 NENERGY_MODE INT 0 DESPUN INT 0 SWEEPS_PER_AVERAGE INT 0 BLOCKS_PER_PACKET INT 0 NENERGY INT 0 NANGLE INT 0 NBINS INT 0 TYPE INT 0 SC INT 0 MARRAY_HDR_IDX INT 0 MARRAY_HDR_SUBCNT INT 0 BLKS_FROM_OLD_SWP INT 0 BLKS_REM_IN_PNDING_SWP INT 0 NON_TTAGED_DATA_IDX INT 0 DATA_INDICES INTARR(32) SECS_PER_BLOCK DOUBLE 0 SPIN_RATE DOUBLE 0 CALLING SEQUENCE: data = eiesa_unpack_surv_hdr (eiesa_surv_data_struct) ARGUMENTS: eiesa_surv_data_struct This is a struct return by get_eesa_surv () for Eesa data, or get_iesa_surv () for Iesa data. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)eiesa_unpack_surv_hdr.pro 1.3 03/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/esaUtil/eiesa_unpack_surv_hdr.pro)
PROCEDURE: esa_anode_calib,orbit
reads in data from individual angle bins from esa burst data,
asks user to click on boundaries of loss cone, and averages
remaining points
INPUT:
orbit the orbit number (used in the filename) which you are calibrating
OUTPUT:
prints calibration values (nomalized to 1.0) for 32 angle bins
KEYWORDS:
ENERGY passed onto get_2dt. If not set, default is [1000,20000]
DIR set this keyword to the directory in which tplot files
are stored. Default is current directory.
DATASRC set this keyword to the string passed by get_2dt (i.e. 'fa_eeb',
'fa_ieb', 'fa_seb1','fa_seb2', etc) If this keyword is
not set it defaults to 'fa_eeb'
SHOW4 set this keyword to show plots of 4 bins and the losscones
SHOW8 set this keyword to show plots of 8 bins and the losscones
SHOWALL set this keyword to show plots of all bins and the losscones
SDT set this keyword to get esa data directly from SDT
(default is to read in tplot files) Note that SDT needs to
be running anyways, because of the fa_fields_phase
Need to have phase (1032) in SDT. If SDT keyword set, need also to
have EesaBurstAggregate in SDT.
Written 97-4-15 by Y-K Tung
Modified 98-2-11 by Y-K Tung added keyword DIR
Modified 98-2-20 by Y-K Tung added keyword ENERGY
(See fastDataToIdl/esaUtil/esa_anode_calib.pro)
PROCEDURE: FAST_BATCH DESCRIPTION: This is the fast idl batch processing file. It is used to produce plots for day to day production runs. It is meant to called from sdt. It runs as the main procedure calling the routines which produce plots for the various instruments. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_batch REVISION HISTORY: @(#)fast_batch.pro 1.6 11/11/96 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. July '96
(See fastDataToIdl/batch/fast_batch.pro)
PROCEDURE: fast_ef_summary.pro INPUT: none PURPOSE: Generates ps, gif, cdf summary plots of FAST electron data. Plot 1: Electron Differential Energy Flux vs Energy, 0-30 deg pitch angle Plot 2: Electron Differential Energy Flux vs Energy, 60-120 deg pitch angle Plot 3: Electron Differential Energy Flux vs Energy, 150-180 deg pitch angle Plot 4: Electron Differential Energy Flux vs Pitch Angle, .1-1 keV Plot 5: Electron Differential Energy Flux vs Pitch Angle, 1-30 keV Plot 6: Electron Energy Flux - mapped to 100 km, positive earthward Plot 7: Electron Flux - mapped to 100 km, positive earthward KEYWORDS BW Set bw=1 to get black/white postscript k0 keyword passed to gen_fa_k0_ees_gifps.pro CREATED BY: J.McFadden 96/11/7 VERSION: 1 LAST MODIFICATION: 97/03/04 MOD HISTORY: 96/11/7 made from fast_e_summary.pro uses "make_array_struc.pro" to speed it up 97/03/04 Je,JEe mapped to 100 km, positive for earthward
(See fastDataToIdl/batch/fast_ef_summary.pro)
PROCEDURE: fast_elec_summary.pro PURPOSE: Generates a summary plot of FAST electron data for tplot. Plot 1: Electron Differential Energy Flux vs Energy, 0-45 deg pitch angle Plot 2: Electron Differential Energy Flux vs Energy, 45-135 deg pitch angle Plot 3: Electron Differential Energy Flux vs Energy, 135-180 deg pitch angle Plot 4: Electron Differential Energy Flux vs Pitch Angle, < 1 keV Plot 5: Electron Differential Energy Flux vs Pitch Angle, > 1 keV Plot 6: Electron Energy Flux Plot 7: Electron Flux CREATED BY: J.McFadden VERSION: 1 LAST MODIFICATION: 96/06/20 MOD HISTORY:
(See fastDataToIdl/batch/fast_elec_summary.pro)
PROCEDURE: FAST_I_BATCH DESCRIPTION: This is the fast idl batch processing file for ion and electron summary plots. It is meant to be called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_i_batch REVISION HISTORY: @(#)fast_batch.pro 1.3 24 Jul 1996 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. July '96
(See fastDataToIdl/batch/fast_esa_batch.pro)
PROCEDURE: FAST_BATCH DESCRIPTION: This is the fast idl batch processing file for electron summary plots. It is meant to called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_e_batch REVISION HISTORY: @(#)fast_e_batch.pro 1.2 08/15/96 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Aug '96
(See fastDataToIdl/batch/fast_esolo_batch.pro)
PROCEDURE: FAST_BATCH DESCRIPTION: This is the fast idl batch processing file for electron summary plots. It is meant to called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_e_batch REVISION HISTORY: @(#)fast_e_batch.pro 1.2 08/15/96 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Aug '96
(See fastDataToIdl/batch/fast_e_batch.pro)
PROCEDURE: fast_e_summary.pro INPUT: none PURPOSE: Generates ps, gif, cdf summary plots of FAST electron data. Plot 1: Electron Differential Energy Flux vs Energy, 0-30 deg pitch angle Plot 2: Electron Differential Energy Flux vs Energy, 60-120 deg pitch angle Plot 3: Electron Differential Energy Flux vs Energy, 150-180 deg pitch angle Plot 4: Electron Differential Energy Flux vs Pitch Angle, .1-1 keV Plot 5: Electron Differential Energy Flux vs Pitch Angle, 1-30 keV Plot 6: Electron Energy Flux - mapped to 100 km, positive earthward Plot 7: Electron Flux - mapped to 100 km, positive earthward KEYWORDS BW Set bw=1 to get black/white postscript k0 keyword passed to gen_fa_k0_ees_gifps.pro CREATED BY: J.McFadden 96-6-20 VERSION: 1 LAST MODIFICATION: 97/03/04 MOD HISTORY: 96-8-6 get_fa_orbit, gopen added 96-8-9 return when no data, changed to a procedure 96/10/08 bw,k0 keywords added 97/03/04 Je,JEe mapped to 100 km, positive for earthward
(See fastDataToIdl/batch/fast_e_summary.pro)
PROCEDURE: FAST_FIELDS_BATCH DESCRIPTION: This is the fast idl batch processing file, for fields summary plots. It is used to produce plots for day to day production runs. It is meant to called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_fields_batch REVISION HISTORY: @(#)fast_fields_batch.pro 1.3 24 Jul 1996 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Aug '96
(See fastDataToIdl/batch/fast_fields_batch.pro)
PROCEDURE: FAST_IE_BATCH DESCRIPTION: This is the fast idl batch processing file for electron summary plots. It is meant to called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_ie_batch REVISION HISTORY: @(#)fast_ie_batch.pro 1.2 08/15/96 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Aug '96
(See fastDataToIdl/batch/fast_ie_batch.pro)
PROCEDURE: fast_if_summary.pro INPUT: none PURPOSE: Generates ps, gif, cdf summary plots of FAST ion data. Plot 1: Ion Differential Energy Flux vs Energy, 0-30 deg pitch angle Plot 2: Ion Differential Energy Flux vs Energy, 40-140 deg pitch angle Plot 3: Ion Differential Energy Flux vs Energy, 150-180 deg pitch angle Plot 4: Ion Differential Energy Flux vs Pitch Angle, .05-1. keV Plot 5: Ion Differential Energy Flux vs Pitch Angle, 1.-25. keV Plot 6: Ion Energy Flux - mapped to 100 km, positive earthward Plot 7: Ion Flux - mapped to 100 km, positive earthward KEYWORDS BW Set bw=1 to get black/white postscript k0 keyword passed to gen_fa_k0_ies_gifps.pro CREATED BY: J.McFadden 96/11/7 VERSION: 1 LAST MODIFICATION: 97/03/04 MOD HISTORY: 96/11/7 made from fast_i_summary.pro uses "make_array_struc.pro" to speed it up 97/03/04 Ji,JEi mapped to 100 km, positive for earthward
(See fastDataToIdl/batch/fast_if_summary.pro)
PROCEDURE: FAST_I_BATCH DESCRIPTION: This is the fast idl batch processing file for ion summary plots. It is meant to be called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_i_batch REVISION HISTORY: @(#)fast_batch.pro 1.3 24 Jul 1996 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. July '96
(See fastDataToIdl/batch/fast_i_batch.pro)
PROCEDURE: fast_i_summary.pro INPUT: none PURPOSE: Generates ps, gif, cdf summary plots of FAST ion data. Plot 1: Ion Differential Energy Flux vs Energy, 0-30 deg pitch angle Plot 2: Ion Differential Energy Flux vs Energy, 40-140 deg pitch angle Plot 3: Ion Differential Energy Flux vs Energy, 150-180 deg pitch angle Plot 4: Ion Differential Energy Flux vs Pitch Angle, .05-1. keV Plot 5: Ion Differential Energy Flux vs Pitch Angle, 1.-25. keV Plot 6: Ion Energy Flux - mapped to 100 km, positive earthward Plot 7: Ion Flux - mapped to 100 km, positive earthward KEYWORDS BW Set bw=1 to get black/white postscript k0 keyword passed to gen_fa_k0_ies_gifps.pro CREATED BY: J.McFadden 96-8-9 VERSION: 1 LAST MODIFICATION: 97/03/04 MOD HISTORY: 96/8/9 made from fast_e_summary.pro 96/10/08 bw,k0 keywords added 97/03/04 Ji,JEi mapped to 100 km, positive for earthward
(See fastDataToIdl/batch/fast_i_summary.pro)
PROCEDURE: FAST_BATCH DESCRIPTION: This is the fast idl batch processing file for electron summary plots. It is meant to called from sdt. Sdt would wait till this batch script is complete and then exit. CALLING SEQUENCE: idl fast_e_batch REVISION HISTORY: @(#)fast_e_batch.pro 1.2 08/15/96 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Aug '96
(See fastDataToIdl/batch/fast_t_batch.pro)
PROCEDURE: fast_t_summary.pro INPUT: none PURPOSE: Generates ps, gif, cdf summary plots of FAST teams data. Plot 1: Hydrogen Differential Energy Flux vs Energy, 0-360 deg pitch angle Plot 2: Oxygen Differential Energy Flux vs Energy, 0-360 deg pitch angle Plot 3: Hydrogen Differential Energy Flux vs Pitch Angle, < 1 keV Plot 4: Hydrogen Differential Energy Flux vs Pitch Angle, > 1 keV Plot 5: Oxygen Differential Energy Flux vs Pitch Angle, < 1 keV Plot 6: Oxygen Differential Energy Flux vs Pitch Angle, > 1 keV Plot 7: MassSpectrum Counts Rate vs Mass, 1eV - 12keV, 4*Pi angles KEYWORDS BW Set bw=1 to get black/white postscript k0 keyword passed to gen_fa_k0_tms_gifps.pro CREATED BY: J.McFadden 96-8-15 VERSION: 2.01 LAST MODIFICATION: 97-06-09 MOD HISTORY: E.Lund 97-06-09 fixed crash on data end mismatch E.Lund 97-06-04 added He+ to cdf's J.Loran 97-03-01 re-removed asum, esum keywords that got put back in accidentally L.Tang 96-11-19 removed asum, esum keywords in routine get_tms_hm_spec J.McFadden 96-08-30 added BW keyword, error print statements
(See fastDataToIdl/batch/fast_t_summary.pro)
FUNCTION: FA_FIELDS_PHASE, spin_phase, freq=freq
PURPOSE: Returns structure with smoothed B_phase as COMP1 and
Sun_phase as COMP2 in radians.
INPUT:
spin_phase - NOT NEEDED. PROGRAM WILL GET IF NOT SUPPLIED.
Fast DQD = 'SMPhase_FieldsSurvey0' stucture.
KEYWORDS:
FREQ - Smoothing frequency. Default = 0.01. Set to 0 for no
smooth.
PRECISE - if set, uses housekeeping data (dqd is
'AttitudeCtrl') to produce jitter-free sun phase, and then mag
phase from GET_FA_ORBIT B_model calculation.
SPIN_AXIS - a named variable in which an estimate of the spin
axis will be returned. Meaningless if /PRECISE is not set.
USE: phase = fa_fields_phase()
RETURN: Fields structure with smoothed B_phase and Sun_phase in radians.
CREATED BY: REE, 97-03-03
FILE: fa_fields_phase.pro
VERSION: @(#)fa_fields_phase.pro 1.35 09/30/98 UCB SSL
LAST MODIFICATION:
(See fastDataToIdl/fa_fields_phase.pro)
NAME: FA_FIELDS_UNITS
PURPOSE: To perform units conversions for the FAST fields
instruments. Calls Bob Ergun's fastcal library.
CALLING SEQUENCE: fa_fields_units,data,VERBOSE=VERBOSE, $
DATA_HEADER=DATA_HEADER
The times series values
contained in the DATA structure will have
their units converted. Time series must be
designated by structure tags "COMP*", where
"*" is 1, 2, 3, etc. The string new_units
contains the name of whatever units the data
are returned in, i.e. it might be the same
as the old units!
INPUTS: A structure called DATA is passed in. It must contain :
- a tag called 'DATA_NAME', which must contain a valid
SDT DQD.
- a tag beginning with 'COMP', like 'COMP1', which
contains time series data.
- a tag called 'UNITS_NAME' which contains the units
currently in use for DATA.COMP*
- a tag called CALIBRATED, which indicates whether or
not there's any calibrating to do!
KEYWORD PARAMETERS: VERBOSE - if set, tells the user what's been
converted
DATA_HEADER - Generally, its a good idea to
fill in the data_header. If it is not
filled in, defaults will be used which
could result in improper calibrations.
DATA_HEADER should be 10 or 14 bytes.
OUTPUTS: The with structure DATA, perhaps with some rescaled parts.
SIDE EFFECTS: Those parts of DATA which contain time series data
will be rescaled according to the calibration information encoded in
the fastcal library.
RESTRICTIONS: Structure tags "comp*", "start_time", "data_name", and
"units_name", and "valid" are required. For 2d structures, DSP and SFA,
structure tags 'yaxis' and 'yaxis_units' are required.
MODIFICATION HISTORY: Originally written 5-July-1996 by Bill Peria,
Space Scienes Lab, UCBerkeley
96-10-26 REE Major rewrite. No new_units and scale.
96-11-05 REE Modifed to accomodate DSP, SFA, and time series.
Still needs FPA (Frequency/Phase/Amplitude) structures.
Still needs MAG, WPC, and HFQ structures.
(See fastDataToIdl/fa_fields_units.pro)
FUNCTION: FA_NADIR_FROM_HORIZ
PURPOSE:
Calculate the earth nadir from horizon crossing times for FAST.
CALLING SEQUENCE:
nadir = fa_nadir_from_horiz (horizCross, orbData)
INPUTS:
horizCross: And array of the structure:
{setime: double, estime: double}, where setime
and estime are seconds since 1970. These are
the horizon crossing times.
orbData: The orbit data from get_fa_orbit that covers
the times given in horizCross.
KEYWORD PARAMETERS:
OUTPUTS:
nadir: The array of earth nadir times derived.
MODIFICATION HISTORY:
@(#)fa_nadir_from_horiz.pro 1.1 02/12/98
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. Oct '97
(See fastDataToIdl/sunnadir/fa_nadir_from_horiz.pro)
FUNCTION: fa_nadir_sun_azim PURPOSE: For FAST, Get azimuthal angles in the spin plane between the earth nadir and sun direction. CALLING SEQUENCE: azimAngles = fa_nadir_sun_azim (nadir, orbData) INPUTS: nadir: An array of times where the nadir of the earth intersects the spin plane of the satellite. orbData: The orbit data from get_fa_orbit that covers the times given in nadir. KEYWORD PARAMETERS: OUTPUTS: azimAngles: This is the returned array of aximuthal angles in the satellite spin plane between the earth nadir and the satellite sun direction. Upon error, -1 is returned. NOTES: This routine calls get_fa_fdf_att to get the spin vector for the times given in the nadir input array. This is done for the start and end of this time span. If these two vectors change, then get_fa_fdf_att is called for each point in the nadir array, else the spin vector is considered constant throughout. MODIFICATION HISTORY: @(#)fa_nadir_sun_azim.pro 1.1 02/12/98 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Oct '97
(See fastDataToIdl/sunnadir/fa_nadir_sun_azim.pro)
FUNCTION: fa_sun_pulse_from_azim PURPOSE: For the FAST satellite, calculates the time of a sun pulse would occur based upon the earth nadir time, spin period, azimuthal angle between sun direction and nadir direction in the spin plain. CALLING SEQUENCE: simSunpulseArr = $ fa_sun_pulse_from_azim(azim, nadir, period) INPUTS: azim: Array of azimuthal angles between the sun direction and the earth nadir in the spin plane nadir: An array times when the earth nadir is crossed by the sun sensor. period: Period of one spin of the spacecraft in seconds. KEYWORD PARAMETERS: OUTPUTS: simSunpulseArr: This is the returned array of simulated sun pulse times, one array element for each input time given in the nadir parameter. MODIFICATION HISTORY: @(#)fa_sun_pulse_from_azim.pro 1.1 02/12/98 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Nov '97
(See fastDataToIdl/sunnadir/fa_sun_pulse_from_azim.pro)
FUNCTION:
FILL_FA_ESA_FROM_TS_GET
DESCRIPTION:
Function to take a structure from get_md_ts_from_sdt that
contains Fast esa data, and return a array of structures in the
standard ssl idl esa format.
An array of npts structures of the following format are returned:
DATA_NAME STRING 'data-name' ; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'Counts' ; Units of this data
UNITS_PROCEDURE STRING 'proc' ; Units conversion proc
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
END_TIME DOUBLE 7.9850884e+08 ; End time of sample
INTEG_T DOUBLE 3.0000000 ; Integration time
NBINS INT nbins ; Number of angle bins
NENERGY INT nnrgs ; Number of energy bins
DATA FLOAT Array(nnrgs, nbins) ; Data qauantities
ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps
THETA FLOAT Array(nnrgs, nbins) ; Angle for bins
GEOM FLOAT Array(nbins) ; Geometry factor
DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins
DTHETA FLOAT Array(nbins) ; Delta Theta
EFF FLOAT Array(nnrgs) ; Efficiency (GF)
MASS DOUBLE 5.68566e-6 ; Particle Mass
GEOMFACTOR DOUBLE 0.000147 ; Bin GF
HEADER_BYTES BYTE Array(25) ; Header bytes
INDEX LONG index ; Data index, this pt.
ST_INDEX LONG st_idx ; start index of arr
EN_INDEX LONG en_idx ; end index of arr
NPTS LONG npts ; array size
CALLING SEQUENCE:
data = fill_fa_esa_from_ts_get (dat, units, header_bytes,
got_header_bytes, CALIBRATE=calib)
ARGUMENTS:
dat The data structure returned from
get_md_ts_from_sdt for esa data
units The units of the data
header_bytes The header bytes from the header
packets for the data in dat
KEYWORDS:
CALIB If non-zero, caclulate geometry
factors for each bin instead of using 1.'s
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)fill_fa_esa_from_ts_get.pro 1.4 02/10/98
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. Apr '97
(See fastDataToIdl/fill_fa_esa_from_ts_get.pro)
FUNCTION: geomag(time [, time2])
NAME:
geomag
PURPOSE:
Gets geomag data kp, ap, and dsp for given times.
INPUT: input(s) can be scalers or arrays of any dimension of type:
double(s) seconds since 1970
string(s) format: YYYY-MM-DD/hh:mm:ss
structure(s) format: given in "time_struct"
values outside normal range will be corrected.
If optional parameter time2 is passed, geomag data returned are
averaged over the time interval from time to time2.
OUTPUT:
structure: {geomag, kp:0.d, ap:0.d, dst:0.d}
NOTE:
This routine works on vectors.
Output will have the same dimensions as the input.
CREATED BY: Ken Bromund Dec 1997
FILE: geomag.pro
VERSION: 1.5
LAST MODIFICATION: 98/01/06
(See fastDataToIdl/database/geomag.pro)
PROCEDURE: get_array_struct(time,START=start,EN=en,ADVANCE=advance,RETREAT=retreat) PURPOSE: Gets a structure from the common array_struc_com, see make_array_struc.pro INPUT: time: real Currently time is ignored. Later versions may: This argument gives a time handle from which to take data from. It may be either a string with the following possible formats: 'MM-DD-YY/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. Time will always be returned as a double representing the actual data time found in seconds since 1970. ;KEYWORDS: START: If non-zero, get first data from array_struc EN: If non-zero, get last data from array_struc ADVANCE: If non-zero, advance to the next data point RETREAT: If non-zero, retreat to the previous data point CREATED BY: J.McFadden VERSION: 1 LAST MODIFICATION: 96-11-7 McFadden MOD HISTORY: NOTES: make_array_struc.pro makes an array of structures that is called by get_array_struc.pro Current version only works for FAST Written to speed up summary plot production for ees and ies Current version ignores time input, requires keyword to work properly
(See fastDataToIdl/batch/get_array_struc.pro)
NAME: GET_DENSITY
PURPOSE: To bring the appropriate density data into IDL from SDT
CALLING SEQUENCE: density = get_density(time1,time2)
INPUTS: See documentation for GET_FA_FIELDS
OUTPUTS: Either a structure or a TPLOT string handle, containing the
density data.
KEYWORDS: Same as GET_FA_FIELDS.
MODIFICATION HISTORY: Written January 1997 by Bill Peria UCB/SSL
- added SVD based de-spiker, used when /SPIN is
set, provides spin period resolution
data. 25-Mar-97 BP
(See fastDataToIdl/get_density.pro)
Please look at documentation for get_fa_fields...you shouldn't call GET_FA_2D_FIELDS directly...
(See fastDataToIdl/get_fa_2d_fields.pro)
PROCEDURE: get_fa_attitude
PURPOSE: get the FAST attitude information for a given set of times
POSITIONAL PARAMETERS:
arg1:
if keyword parameter 'time_array' is set, then this parameter is the
array of times for which the attitude is to be returned, else it is the
start time of the timespan over which the attitude is to be returned.
arg2:
if keyword parameter 'time_array' is set, then this parameter is not used,
else it is the end time of the timespan over which the attitude is to be returned.
KEYWORD PARAMETERS:
delta_t:
spacing in seconds of the set of times from start time to end time, over which
the attitude info is returned (default = 20 seconds).
This parameter is ignored if the keyword parameter 'time_array' is set.
attlevel:
flag to specify what level of attitude info is desired:
-1 : return the best attitude info available (the default)
0 : return initial level attitude data only. this level has not
been verified in any way
1 : return level one attitude data only. this level has had a first
attempt at correcting errors, mostly smoothed to remove jitter.
2 : return definitive attitude only. this level has been compared
with B-field model data, and sun pulse spin frequency corrected.
if attlevel is set to either 0, 1, or 2, and the requested level of attitude
data is not found, get_fa_attitude will mark that data point as invalid and
will return no data for that time point.
coord:
a string specifying the coordinate system desired for the output rotation matrix.
see the OUTPUTS section below.
possible values for coord are (case doesn't matter, 'gse' = 'gSe' = 'GSE'):
'FASTSPIN' : Spinning Spacecraft
'DESPUN' : Despun
'GEI' : Geocentric Equatorial Inertial
'GEO' : Geographic
'GSE' : Geocentric Solar Ecliptic
'GSM' : Geocentric Solar Magnetospheric
'MAG' : Geomagnetic
'GECI' : Ecliptic Inertial
'GSEQ' : Geocentric Solar Equatorial
'SM' : Solar Magnetic
status:
status of get_fa_attitude on return (0 means successful return, nonzero means
some error has occurred).
In general, the user should call get_fa_attitude with this status keyword set,
and should explicitly test that status equal 0 for success.
OUTPUTS:
performs a 'store_data' operation on the following variables:
fa_spin_ra:
right ascension of the spin axis, in GEI coords, in degrees
fa_spin_dec:
declination of the spin axis, in GEI coords, in degrees
fa_spin_freq:
spin rate in degrees/second
fa_spin_phase:
spin phase about the spin axis, in degrees. zero phase means
spacecraft x axis is in the sun.
fa_attlevel:
the attitude level of the data found.
fa_rotmat_xxx:
the rotation matrix from the FASTSPIN coordinate system to the coord
system that was selected by the input keyword parameter 'coord',
and where 'xxx' is the coord system specified by the keyword param 'coord'.
ERRORS:
If attlevel 0, 1, or 2 has been selected and if this level of attitude data is not
found, or if any other error occurs, the given time point will be marked as invalid,
returned attitude data will have value NaN.
CREATED BY: Vince Saba, Oct, 1996.
VERSION: @(#)get_fa_attitude.pro 1.5 06/05/97
(See fastDataToIdl/attitude/get_fa_attitude.pro)
NAME: get_fa_bdc
DESCRIPTION: returns a structure containing DC
magnetic field survey data from the FAST magnetometer (UCLA). It
must be the case that SDT is running, with Mag1dc, Mag2dc_S, and Mag3dc_S
plotted on screen already.
The returned structure looks like this:
DATA_NAME STRING ' ' ; which mag quantities
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'nT' ; Units of this data
UNITS_PROCEDURE STRING 'fa_fields_units' ; Units conversion proc
START_TIME DOUBLE ; Start Time of sample
END_TIME DOUBLE ; End time of sample
NPTS INT ; Number of time samples
NCOMP INT ; Number of components
TIME DOUBLE Array(npts) ; timetags
COMP1 DOUBLE Array(npts) ;
COMP2 DOUBLE Array(npts) ;
COMP3 DOUBLE Array(npts) ;
|ALL |NPTS |START| EN |PANF |PANB |selection |use time1|use time2|
|----|-----|-----|-----|-----|-----|---------------------------|---------|---------|
| NZ | 0 | 0 | 0 | 0 | 0 | start -> end | X | X |
| 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X |
| 0 | 0 | NZ | 0 | 0 | 0 | start -> time1 secs | X | |
| 0 | 0 | 0 | NZ | 0 | 0 | end-time1 secs -> end | X | |
| 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from time1->time2 | X | X |
| 0 | 0 | 0 | 0 | 0 | NZ | pan back from time1->time2| X | X |
| 0 | NZ | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | |
| 0 | NZ | NZ | 0 | 0 | 0 | start -> start+npts | | |
| 0 | NZ | 0 | NZ | 0 | 0 | end-npts -> end | | |
Any other combination of keywords is not allowed.
CALLING SEQUENCE: mag = get_fa_bdc(time1, time2, [NPTS=npts],
[START=st | EN=en | PANF=panf | PANB =
panb | ALL = all])
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to a number between 1 and 7. The number is determined by
interpreting the valid tags from each of the three long booms
as binary digits; mag1.valid is weighted 1, mag2.valid 2,
mag3.valid 4. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_bdc.pro 1.17 18 Jul 1996
Originally written by Bill Peria, University of
California at Berkeley, Space Sciences Lab. July 22, 1996
(See fastDataToIdl/get_fa_bdc.pro)
NAME: get_fa_edc_long
DESCRIPTION: returns, as best it can, a structure containing DC
electric field survey data from the FAST booms (1-4, 5-8, 9-10). It
must be the case that SDT is running, with V1-4, 5-8, and 9-10
plotted on screen already. In the case where, for example, sphere 9
is in voltage mode, then an array containing IEEE NaN, plus a
leading zero, will be returned in place of V9-10.
The returned structure looks like this:
DATA_NAME STRING ' E1-4 E5-8 E9-10' ; which 'E' quantities
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'mV/m' ; Units of this data
UNITS_PROCEDURE STRING 'fa_fields_units' ; Units conversion proc
START_TIME DOUBLE ; Start Time of sample
END_TIME DOUBLE ; End time of sample
NPTS INT ; Number of time samples
NCOMP INT ; Number of components
TIME DOUBLE Array(npts) ; timetags
E14 DOUBLE Array(npts) ;
E58 DOUBLE Array(npts) ;
E910 DOUBLE Array(npts) ;
|ALL |NPTS |START| EN |PANF |PANB |selection |use time1|use time2|
|----|-----|-----|-----|-----|-----|---------------------------|---------|---------|
| NZ | 0 | 0 | 0 | 0 | 0 | start -> end | X | X |
| 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X |
| 0 | 0 | NZ | 0 | 0 | 0 | start -> time1 secs | X | |
| 0 | 0 | 0 | NZ | 0 | 0 | end-time1 secs -> end | X | |
| 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from time1->time2 | X | X |
| 0 | 0 | 0 | 0 | 0 | NZ | pan back from time1->time2| X | X |
| 0 | NZ | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | |
| 0 | NZ | NZ | 0 | 0 | 0 | start -> start+npts | | |
| 0 | NZ | 0 | NZ | 0 | 0 | end-npts -> end | | |
Any other combination of keywords is not allowed.
CALLING SEQUENCE: e_long = get_fa_edc_long(time1, time2, [NPTS=npts],
[START=st | EN=en | PANF=panf | PANB =
panb | ALL = all])
CURRENT PROBLEMS: It's not clear what to do if the time bases for
the different data quantities are not the same. Right now, the times
returned are those of the first available DQD, in order [V1-V4,
V5-V8, V9-V10]. Yikes! Also, no indication of mode is returned...
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to a number between 1 and 7. The number is determined by
interpreting the valid tags from each of the three long booms
as binary digits; v14.valid is weighted 1, v58.valid 2,
v910.valid 4. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_edc_long.pro 1.18 07/23/96
Originally written by Bill Peria, University of
California at Berkeley, Space Sciences Lab. June '96
(See fastDataToIdl/get_fa_edc_long.pro)
FUNCTION:
GET_FA_EEB
DESCRIPTION:
function to load FAST E-esa burst data from the SDT program shared
memory buffers.
A structure of the following format is returned:
DATA_NAME STRING 'Eesa Burst' ; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'Counts' ; Units of this data
UNITS_PROCEDURE STRING 'proc' ; Units conversion proc
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
END_TIME DOUBLE 7.9850884e+08 ; End time of sample
INTEG_T DOUBLE 3.0000000 ; Integration time
NBINS INT nbins ; Number of angle bins
NENERGY INT nnrgs ; Number of energy bins
DATA FLOAT Array(nnrgs, nbins) ; Data qauantities
ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps
THETA FLOAT Array(nnrgs, nbins) ; Angle for bins
GEOM FLOAT Array(nbins) ; Geometry factor
DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins
DTHETA FLOAT Array(nbins) ; Delta Theta
EFF FLOAT Array(nnrgs) ; Efficiency (GF)
MASS DOUBLE 5.68566e-6 ; Particle Mass
GEOMFACTOR DOUBLE 0.000147 ; Bin GF
HEADER_BYTES BYTE Array(25) ; Header bytes
INDEX LONG idx ; Index into sdt data
CALLING SEQUENCE:
data = get_fa_eeb (time, [START=start | EN=en | ADVANCE=advance |
RETREAT=retreat])
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
START If non-zero, get data from the start time
of the data instance in the SDT buffers
EN If non-zero, get data at the end time
of the data instance in the SDT buffers
ADVANCE If non-zero, advance to the next data point
following the time input
RETREAT If non-zero, retreat (reverse) to the previous
data point before the time input
CALIB If non-zero, caclulate geometry
factors for each bin instead of using 1.'s
INDEX Index into sdt data
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_eeb.pro 1.20 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_eeb.pro)
FUNCTION: GET_FA_EEB_C DESCRIPTION: function to load FAST E-esa burst data from the SDT program shared memory buffers. This is the caching version A structure of the following format is returned: DATA_NAME STRING 'Eesa Burst' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nnrgs, nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nnrgs, nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 5.68566e-6 ; Particle Mass GEOMFACTOR DOUBLE 0.000147 ; Bin GF HEADER_BYTES BYTE Array(44) ; Header bytes INDEX LONG idx ; Index in sdt buffers CALLING SEQUENCE: data = get_fa_eeb (time, [START=start | EN=en | ADVANCE=advance | RETREAT=retreat], CALIB=calib, INDEX=idx, FLUSH=flush, CACHE_SIZE=cache_size) ARGUMENTS: time This argument gives a time handle from which to take data from. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. time will always be returned as a double representing the actual data time found in seconds since 1970. KEYWORDS: START If non-zero, get data from the start time of the data instance in the SDT buffers EN If non-zero, get data at the end time of the data instance in the SDT buffers ADVANCE If non-zero, advance to the next data point following the time or index input RETREAT If non-zero, retreat (reverse) to the previous data point before the time or index input CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s INDEX If index is set, it is used for selecting the index to get data. FLUSH If non-zero, will flush the data cache This is useful to force a re-read of sdt buffers in case the data has changed. CACHE_SIZE If gt 0, will reset the length in points of data to cache. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_eeb_c.pro 1.1 05/30/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '95 Major upgrade, using get_cache_md_from_sdt to load a time range at once to cache data in idl for speedup. J.M. Loran Apr. 97
(See fastDataToIdl/get_fa_eeb_c.pro)
FUNCTION:
GET_FA_EEB_HDR
DESCRIPTION:
function to load FAST E-esa burst header data from the SDT program
shared memory buffers.
At structure of the following format is returned:
DATA_NAME STRING 'Eesa_Burst_Packet_Hdr'; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; Project name
UNITS_NAME STRING 'Raw' ; Units of this data
VALUES_PROCEDURE STRING 'eiesa_unpack_hdr' ; Name of proc to
; get values from hdr
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
BYTES BYTE Array(44) ; Header bytes
INDEX LONG idx ; index into data
CALLING SEQUENCE:
data = get_fa_eeb_hdr (time)
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
INDEX: get data at this index.
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_eeb_hdr.pro 1.9 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_eeb_hdr.pro)
FUNCTION: GET_FA_EEB_TS DESCRIPTION: function to load FAST E-esa Burst data from the SDT program shared memory buffers. This is the time series version. An array of npts structures of the following format are returned: DATA_NAME STRING 'Eesa Burst' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 5.68566e-6 ; Particle Mass GEOMFACTOR DOUBLE 0.000147 ; Bin GF HEADER_BYTES BYTE Array(25) ; Header bytes INDEX LONG index ; Data index, this pt. ST_INDEX LONG st_idx ; start index of arr EN_INDEX LONG en_idx ; end index of arr NPTS LONG npts ; array size CALLING SEQUENCE: data = get_fa_eeb_ts (t1, t2, [NPTS=npts], [START=st | EN=en | PANF=panf | PANB=panb | IDXST=startidx], CALIB=calib) ARGUMENTS: t1 This argument gives the start time from which to take data, or, if START or EN keywords are non-zero, the length of time to take data. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. Time will always be returned as a double representing the actual data start time found in seconds since 1970. t2 The same as time1, except it represents the end time. If the NPTS, START, EN, PANF or PANB keywords are non-zero, THEN time2 will be ignored as an input paramter. KEYWORDS: CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s Data time selection is determined from the keywords as given in the following truth table (NZ == non-zero): |ALL |NPTS |START| EN |IDXST|PANF |PANB |selection |use time1|use time2| |----|-----|-----|-----|-----|-----|-----|---------------------|---------|---------| | NZ | 0 | 0 | 0 | 0 | 0 | 0 | start -> end | X | X | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X | | 0 | 0 | NZ | 0 | 0 | 0 | 0 | start -> time1 secs | X | | | 0 | 0 | 0 | NZ | 0 | 0 | 0 | end-time1 secs ->end| X | | | 0 | 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from | X | X | | | | | | | | | time1->time2 | | | | 0 | 0 | 0 | 0 | 0 | 0 | NZ | pan back from | X | X | | | | | | | | | time1->time2 | | | | 0 | NZ | 0 | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | | | 0 | NZ | NZ | 0 | 0 | 0 | 0 | start -> start+npts | | | | 0 | NZ | 0 | NZ | 0 | 0 | 0 | end-npts -> end | | | | 0 | NZ | 0 | 0 | NZ | 0 | 0 | st-index -> | | | | | | | | | | | st_index + npts | | | Any other combination of keywords is not allowed. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_eeb_ts.pro 1.3 05/23/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Apr '97
(See fastDataToIdl/get_fa_eeb_ts.pro)
FUNCTION:
GET_FA_EES
DESCRIPTION:
function to load FAST E-esa survey data from the SDT program shared
memory buffers.
A structure of the following format is returned:
DATA_NAME STRING 'Eesa Survey' ; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'Counts' ; Units of this data
UNITS_PROCEDURE STRING 'proc' ; Units conversion proc
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
END_TIME DOUBLE 7.9850884e+08 ; End time of sample
INTEG_T DOUBLE 3.0000000 ; Integration time
NBINS INT nbins ; Number of angle bins
NENERGY INT nnrgs ; Number of energy bins
DATA FLOAT Array(nnrgs, nbins) ; Data qauantities
ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps
THETA FLOAT Array(nnrgs, nbins) ; Angle for bins
GEOM FLOAT Array(nbins) ; Geometry factor
DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins
DTHETA FLOAT Array(nbins) ; Delta Theta
EFF FLOAT Array(nnrgs) ; Efficiency (GF)
MASS DOUBLE 5.68566e-6 ; Particle Mass
GEOMFACTOR DOUBLE 0.000147 ; Bin GF
HEADER_BYTES BYTE Array(25) ; Header bytes
INDEX LONG idx ; Index into sdt data
CALLING SEQUENCE:
data = get_fa_ees (time, [START=start | EN=en | ADVANCE=advance |
RETREAT=retreat])
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
START If non-zero, get data from the start time
of the data instance in the SDT buffers
EN If non-zero, get data at the end time
of the data instance in the SDT buffers
ADVANCE If non-zero, advance to the next data point
following the time input
RETREAT If non-zero, retreat (reverse) to the previous
data point before the time input
CALIB If non-zero, caclulate geometry
factors for each bin instead of using 1.'s
INDEX Index into sdt data
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ees.pro 1.26 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ees.pro)
FUNCTION: GET_FA_EES_C DESCRIPTION: function to load FAST E-esa survey data from the SDT program shared memory buffers. This is the caching version A structure of the following format is returned: DATA_NAME STRING 'Eesa Survey' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nnrgs, nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nnrgs, nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 5.68566e-6 ; Particle Mass GEOMFACTOR DOUBLE 0.000147 ; Bin GF HEADER_BYTES BYTE Array(44) ; Header bytes INDEX LONG idx ; Index in sdt buffers CALLING SEQUENCE: data = get_fa_ees (time, [START=start | EN=en | ADVANCE=advance | RETREAT=retreat], CALIB=calib, INDEX=idx, FLUSH=flush, CACHE_SIZE=cache_size) ARGUMENTS: time This argument gives a time handle from which to take data from. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. time will always be returned as a double representing the actual data time found in seconds since 1970. KEYWORDS: START If non-zero, get data from the start time of the data instance in the SDT buffers EN If non-zero, get data at the end time of the data instance in the SDT buffers ADVANCE If non-zero, advance to the next data point following the time or index input RETREAT If non-zero, retreat (reverse) to the previous data point before the time or index input CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s INDEX If index is set, it is used for selecting the index to get data. FLUSH If non-zero, will flush the data cache This is useful to force a re-read of sdt buffers in case the data has changed. CACHE_SIZE If gt 0, will reset the length in points of data to cache. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ees_c.pro 1.1 05/30/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '95 Major upgrade, using get_cache_md_from_sdt to load a time range at once to cache data in idl for speedup. J.M. Loran Apr. 97
(See fastDataToIdl/get_fa_ees_c.pro)
FUNCTION:
GET_FA_EES_HDR
DESCRIPTION:
function to load FAST E-esa survey header data from the SDT program
shared memory buffers.
At structure of the following format is returned:
DATA_NAME STRING 'Eesa_Survey_Packet_Hdr'; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; Project name
UNITS_NAME STRING 'Raw' ; Units of this data
VALUES_PROCEDURE STRING 'eiesa_unpack_hdr' ; Name of proc to
; get values from hdr
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
BYTES BYTE Array(44) ; Header bytes
INDEX LONG idx ; index into data
CALLING SEQUENCE:
data = get_fa_ees_hdr (time)
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
INDEX: get data at this index.
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ees_hdr.pro 1.9 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ees_hdr.pro)
FUNCTION: GET_FA_EES_TS DESCRIPTION: function to load FAST E-esa survey data from the SDT program shared memory buffers. This is the time series version. An array of npts structures of the following format are returned: DATA_NAME STRING 'Eesa Survey' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 5.68566e-6 ; Particle Mass GEOMFACTOR DOUBLE 0.000147 ; Bin GF HEADER_BYTES BYTE Array(25) ; Header bytes INDEX LONG index ; Data index, this pt. ST_INDEX LONG st_idx ; start index of arr EN_INDEX LONG en_idx ; end index of arr NPTS LONG npts ; array size CALLING SEQUENCE: data = get_fa_ees_ts (t1, t2, [NPTS=npts], [START=st | EN=en | PANF=panf | PANB=panb | IDXST=startidx], CALIB=calib) ARGUMENTS: t1 This argument gives the start time from which to take data, or, if START or EN keywords are non-zero, the length of time to take data. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. Time will always be returned as a double representing the actual data start time found in seconds since 1970. t2 The same as time1, except it represents the end time. If the NPTS, START, EN, PANF or PANB keywords are non-zero, THEN time2 will be ignored as an input paramter. KEYWORDS: CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s Data time selection is determined from the keywords as given in the following truth table (NZ == non-zero): |ALL |NPTS |START| EN |IDXST|PANF |PANB |selection |use time1|use time2| |----|-----|-----|-----|-----|-----|-----|---------------------|---------|---------| | NZ | 0 | 0 | 0 | 0 | 0 | 0 | start -> end | X | X | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X | | 0 | 0 | NZ | 0 | 0 | 0 | 0 | start -> time1 secs | X | | | 0 | 0 | 0 | NZ | 0 | 0 | 0 | end-time1 secs ->end| X | | | 0 | 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from | X | X | | | | | | | | | time1->time2 | | | | 0 | 0 | 0 | 0 | 0 | 0 | NZ | pan back from | X | X | | | | | | | | | time1->time2 | | | | 0 | NZ | 0 | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | | | 0 | NZ | NZ | 0 | 0 | 0 | 0 | start -> start+npts | | | | 0 | NZ | 0 | NZ | 0 | 0 | 0 | end-npts -> end | | | | 0 | NZ | 0 | 0 | NZ | 0 | 0 | st-index -> | | | | | | | | | | | st_index + npts | | | Any other combination of keywords is not allowed. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ees_ts.pro 1.2 05/23/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Apr '97
(See fastDataToIdl/get_fa_ees_ts.pro)
NAME: GET_FA_FIELDS
PURPOSE: to get data from the FAST fields instrument
CALLING SEQUENCE: mydata = get_fa_fields(dqd,[ time1, time2,
NPTS=npts, START=st, EN=en, PANF=pf, PANB=pb,
ALL = all, CALIBRATE = calibrate, STORE = store])
INPUTS:
DQD: a string containing a valid Data Quantity Descriptor to
pass on to SDT. If SDT doesn't recognize the DQD, an
error message is sent to the screen, and an invalid
status is returned to IDL. Use the routine HELPFAST to
access a list of valid DQD's through Netscape.
NOTE: If GET_FA_FIELDS is called with nothing but a DQD, then the
keywords ALL, CALIBRATE, and REPAIR will be automatically
set. Furthermore, if GET_FA_FIELDS is called with no
*time-selection* keywords or time limits, then the ALL keyword
will be set.
OUTPUTS: A structure of the following format is returned to the
caller, *UNLESS* the keyword STORE is set, in which case
the data are stored tplot-style, and the TPLOT string
handle is returned to the caller. The STREAK_* tags are
arrays of indices into the COMP* tags. If the REPAIRED tag
contains a 1 on return, then the STREAK_* tags mark the
starts, lengths, and ends of streaks of contiguous,
evenly-sampled data.
DATA_NAME STRING 'V1-V4_S'
VALID INTEGER 1
PROJECT_NAME STRING 'FAST'
UNITS_NAME STRING 'mV/m'
CALIBRATED LONG 1
UNITS_PROCEDURE STRING 'fast_fields_units'
START_TIME DOUBLE 8.5194794e+08
END_TIME DOUBLE 8.5195604e+08
NPTS LONG 5000
NCOMP LONG 1
DEPTH LONARR(NCOMP) 1
TIME DBLARR(NPTS) START_TIME->END_TIME
COMP* FLTARR(NPTS,DEPTHS(*)) SCIENCE!
STREAK_STARTS LONARR(??)
STREAK_LENGTHS LONARR(??)
STREAK_ENDS LONARR(??)
REPAIRED LONG 1
OPTIONAL INPUTS:
time1 : This argument gives the start time from which to take
data, or, if START or EN keywords are non-zero, the
length of time to take data. It may be either a
string with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference
date) or a number, which will represent seconds since
1970 (must be a double > 94608000.D), or hours from a
reference time, if set.
time2 : The same as time1, except it represents the end
time. If the NPTS, START, EN, PANF or PANB keywords
are non-zero, then time2 will be ignored as an input
parameter.
KEYWORD PARAMETERS:
CALIBRATE: If set, causes calibrated data to be returned, if
possible. Otherwise, raw data are returned,
*unless* the environment variable FAST_CALIBRATE is
set to 1, i.e. setenv FAST_CALIBRATE 1 . Setting
the CALIBRATE keyword causes the procedure name in
DAT.UNITS_PROCEDURE to be called.
DEFAULT: If set, causes CALIBRATE, ALL, and REPAIR to be set.
MIN_BUF_LENGTH: If defined, sets the minimum number of
time-contiguous points in a "good streak" or
"buffer" of data. Default is 10.
REPAIR: If set, causes a time column patcher to be
called. Otherwise, you get what SDT is giving.
SPIN: If defined, causes the data to be returned at once per
spin resolution, at a phase equal to the value of SPIN
in degrees.
STORE: If set, the tplot routine STORE_DATA is called, and a
rudimentary tplot quantity is stored, to be accessed
through GET_DATA. In this case, GET_FA_FIELDS returns
the TPLOT string handle to the caller.
STRUCTURE: A named variable in which the data structure
described above can be returned, if desired (for
example, if STORE is set).
YBINS: If nonzero, two dimensional fields quantities are
returned with this many frequency bins.
BACKGROUND: If set, causes a background to be removed from 2D
fields quantities. The background is that returned
from the function NOISE. Note that this all makes sense
only for 2D, CALIBRATE'd quantities.
Other keywords determine data time selection as given in the
following truth table (NZ == non-zero):
|ALL|NPTS|START|EN|PANF|PANB|selection |use time1|use time2|
|---|----|-----|--|----|----|----------------------|---------|---------|
| NZ| 0 | 0 | 0| 0 | 0 |start -> end | X | X |
| 0 | 0 | 0 | 0| 0 | 0 |time1 -> time2 | X | X |
| 0 | 0 | NZ | 0| 0 | 0 |start -> time1 secs | X | |
| 0 | 0 | 0 |NZ| 0 | 0 |end-time1 secs -> end | X | |
| 0 | 0 | 0 | 0| NZ| 0 |pan fwd, time1->time2 | X | X |
| 0 | 0 | 0 | 0| 0 | NZ|pan back,time1->time2 | X | X |
| 0 | NZ| 0 | 0| 0 | 0 |time1 -> time1+npts | X | |
| 0 | NZ| NZ | 0| 0 | 0 |start -> start+npts | | |
| 0 | NZ| 0 |NZ| 0 | 0 |end-npts -> end | | |
No other combination of keywords is allowed.
RESTRICTIONS: The data corresponding to DQD must already be on
screen, having been plotted by SDT.
EXAMPLE: my_data = get_fa_fields('V1-V4_S',/all) *OR*
tplot,get_fa_fields('Mag3dc_S',/all,/calibrate,/store,struc=my_data)
MODIFICATION HISTORY: written June 1996 by Bill Peria, UCBerkeley
Space Sciences Laboratory
@(#)get_fa_fields.pro 1.64
(See fastDataToIdl/get_fa_fields.pro)
NAME: GET_FA_FLDS
PURPOSE: To store raw FAST fields quantities for TPLOT
CALLING SEQUENCE: get_fa_fields,dqd,[ time1, time2,
NPTS=npts, START=st, EN=en, PANF=pf, PANB=pb,
ALL = all, CALIBRATE = calibrate, STORE = store]
INPUTS: DQD - a string containing a valid Data Quantity Descriptor
to pass on to SDT. If SDT doesn't recognize the DQD,
an error message is sent to the screen, and an
invalid status is returned to IDL. The file
FastDQD.doc, in the directory
/disks/fast/software/integration/docs, contains all
the current DQD information for FAST. The Unix
command:
grep DataQuantity $FASTHOME/FastDQD.doc,
will produce a (long!) list of valid DQD's, which you
could redirect into a file for future reference.
OPTIONAL INPUTS:
time1 This argument gives the start time from
which to take data, or, if START or EN keywords
are non-zero, the length of time to take data.
It may be either a string with the following
possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
Time will always be returned as a double
representing the actual data start time found
in seconds since 1970.
time2 The same as time1, except it represents the
end time.
If the NPTS, START, EN, PANF or PANB keywords
are non-zero, then time2 will be ignored as an
input parameter.
KEYWORD PARAMETERS:
CALIBRATE: If set, causes calibrated data to be returned, if
possible. Otherwise, raw data are returned,
*unless* the environment variable FAST_CALIBRATE is
set to 1, i.e. setenv FAST_CALIBRATE 1 .
STORE: Meaningless, always set.
STRUCTURE: A named variable in which the data structure
described above can be returned, if desired (for
example, if STORE is set).
SPIN: If defined, causes the data to be returned at once per
spin resolution, at a phase equal to the value of SPIN
in degrees.
YBINS: If nonzero, two dimensional fields quantities are
returned with this many frequency bins.
Setting the CALIBRATE keyword causes the procedure name in
DAT.UNITS_PROCEDURE to be called.
Other keywords determine data time selection as given in the
following truth table (NZ == non-zero):
|ALL |NPTS |START| EN |PANF |PANB |selection |use time1|use time2|
|----|-----|-----|-----|-----|-----|---------------------------|---------|---------|
| NZ | 0 | 0 | 0 | 0 | 0 | start -> end | X | X |
| 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X |
| 0 | 0 | NZ | 0 | 0 | 0 | start -> time1 secs | X | |
| 0 | 0 | 0 | NZ | 0 | 0 | end-time1 secs -> end | X | |
| 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from time1->time2 | X | X |
| 0 | 0 | 0 | 0 | 0 | NZ | pan back from time1->time2| X | X |
| 0 | NZ | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | |
| 0 | NZ | NZ | 0 | 0 | 0 | start -> start+npts | | |
| 0 | NZ | 0 | NZ | 0 | 0 | end-npts -> end | | |
No other combination of keywords is allowed.
RESTRICTIONS: The data corresponding to DQD must already be on
screen, having been plotted by SDT.
OUTPUTS: A TPLOT quantitiy, with the name DQD, is stored.
EXAMPLE: get_fa_flds,'Mag1dc_S',/all
MODIFICATION HISTORY: written 3-October-1996 by Bill Peria UCB/SSL
(See fastDataToIdl/get_fa_flds.pro)
FUNCTION:
GET_FA_IEB
DESCRIPTION:
function to load FAST I-esa burst data from the SDT program shared
memory buffers.
A structure of the following format is returned:
DATA_NAME STRING 'Iesa Burst' ; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'Counts' ; Units of this data
UNITS_PROCEDURE STRING 'proc' ; Units conversion proc
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
END_TIME DOUBLE 7.9850884e+08 ; End time of sample
INTEG_T DOUBLE 3.0000000 ; Integration time
NBINS INT nbins ; Number of angle bins
NENERGY INT nnrgs ; Number of energy bins
DATA FLOAT Array(nnrgs, nbins) ; Data qauantities
ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps
THETA FLOAT Array(nnrgs, nbins) ; Angle for bins
GEOM FLOAT Array(nbins) ; Geometry factor
DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins
DTHETA FLOAT Array(nbins) ; Delta Theta
EFF FLOAT Array(nnrgs) ; Efficiency (GF)
MASS DOUBLE 0.0104389 ; Particle Mass
GEOMFACTOR DOUBLE 0.0002720 ; Bin GF
HEADER_BYTES BYTE Array(25) ; Header bytes
INDEX LONG idx ; Index into sdt data
CALLING SEQUENCE:
data = get_fa_ieb (time, [START=start | EN=en | ADVANCE=advance |
RETREAT=retreat])
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
START If non-zero, get data from the start time
of the data instance in the SDT buffers
EN If non-zero, get data at the end time
of the data instance in the SDT buffers
ADVANCE If non-zero, advance to the next data point
following the time input
RETREAT If non-zero, retreat (reverse) to the previous
data point before the time input
CALIB If non-zero, caclulate geometry
factors for each bin instead of using 1.'s
INDEX Index into sdt data
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ieb.pro 1.19 12/03/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ieb.pro)
FUNCTION: GET_FA_IEB_C DESCRIPTION: function to load FAST I-esa burst data from the SDT program shared memory buffers. This is the caching version A structure of the following format is returned: DATA_NAME STRING 'Iesa Burst' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nnrgs, nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nnrgs, nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 0.0104389 ; Particle Mass GEOMFACTOR DOUBLE 0.0002720 ; Bin GF HEADER_BYTES BYTE Array(44) ; Header bytes INDEX LONG idx ; Index in sdt buffers CALLING SEQUENCE: data = get_fa_ieb (time, [START=start | EN=en | ADVANCE=advance | RETREAT=retreat], CALIB=calib, INDEX=idx, FLUSH=flush, CACHE_SIZE=cache_size) ARGUMENTS: time This argument gives a time handle from which to take data from. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. time will always be returned as a double representing the actual data time found in seconds since 1970. KEYWORDS: START If non-zero, get data from the start time of the data instance in the SDT buffers EN If non-zero, get data at the end time of the data instance in the SDT buffers ADVANCE If non-zero, advance to the next data point following the time or index input RETREAT If non-zero, retreat (reverse) to the previous data point before the time or index input CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s INDEX If index is set, it is used for selecting the index to get data. FLUSH If non-zero, will flush the data cache This is useful to force a re-read of sdt buffers in case the data has changed. CACHE_SIZE If gt 0, will reset the length in points of data to cache. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ieb_c.pro 1.2 12/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '95 Major upgrade, using get_cache_md_from_sdt to load a time range at once to cache data in idl for speedup. J.M. Loran Apr. 97
(See fastDataToIdl/get_fa_ieb_c.pro)
FUNCTION:
GET_FA_IEB_HDR
DESCRIPTION:
function to load FAST I-esa burst header data from the SDT program
shared memory buffers.
At structure of the following format is returned:
DATA_NAME STRING 'Iesa_Burst_Packet_Hdr'; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; Project name
UNITS_NAME STRING 'Raw' ; Units of this data
VALUES_PROCEDURE STRING 'eiesa_unpack_hdr' ; Name of proc to
; get values from hdr
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
BYTES BYTE Array(44) ; Header bytes
INDEX LONG idx ; index into data
CALLING SEQUENCE:
data = get_fa_ieb_hdr (time)
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
INDEX: get data at this index.
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ieb_hdr.pro 1.9 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ieb_hdr.pro)
FUNCTION: GET_FA_IEB_TS DESCRIPTION: function to load FAST I-esa burst data from the SDT program shared memory buffers. This is the time series version. An array of npts structures of the following format are returned: DATA_NAME STRING 'Iesa Burst' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 0.0104389 ; Particle Mass GEOMFACTOR DOUBLE 0.000272 ; Bin GF HEADER_BYTES BYTE Array(25) ; Header bytes INDEX LONG index ; Data index, this pt. ST_INDEX LONG st_idx ; start index of arr EN_INDEX LONG en_idx ; end index of arr NPTS LONG npts ; array size CALLING SEQUENCE: data = get_fa_ieb_ts (t1, t2, [NPTS=npts], [START=st | EN=en | PANF=panf | PANB=panb | IDXST=startidx], CALIB=calib) ARGUMENTS: t1 This argument gives the start time from which to take data, or, if START or EN keywords are non-zero, the length of time to take data. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. Time will always be returned as a double representing the actual data start time found in seconds since 1970. t2 The same as time1, except it represents the end time. If the NPTS, START, EN, PANF or PANB keywords are non-zero, THEN time2 will be ignored as an input paramter. KEYWORDS: CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s Data time selection is determined from the keywords as given in the following truth table (NZ == non-zero): |ALL |NPTS |START| EN |IDXST|PANF |PANB |selection |use time1|use time2| |----|-----|-----|-----|-----|-----|-----|---------------------|---------|---------| | NZ | 0 | 0 | 0 | 0 | 0 | 0 | start -> end | X | X | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X | | 0 | 0 | NZ | 0 | 0 | 0 | 0 | start -> time1 secs | X | | | 0 | 0 | 0 | NZ | 0 | 0 | 0 | end-time1 secs ->end| X | | | 0 | 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from | X | X | | | | | | | | | time1->time2 | | | | 0 | 0 | 0 | 0 | 0 | 0 | NZ | pan back from | X | X | | | | | | | | | time1->time2 | | | | 0 | NZ | 0 | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | | | 0 | NZ | NZ | 0 | 0 | 0 | 0 | start -> start+npts | | | | 0 | NZ | 0 | NZ | 0 | 0 | 0 | end-npts -> end | | | | 0 | NZ | 0 | 0 | NZ | 0 | 0 | st-index -> | | | | | | | | | | | st_index + npts | | | Any other combination of keywords is not allowed. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ieb_ts.pro 1.4 12/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Apr '97
(See fastDataToIdl/get_fa_ieb_ts.pro)
FUNCTION:
GET_FA_IES
DESCRIPTION:
function to load FAST E-esa survey data from the SDT program shared
memory buffers.
A structure of the following format is returned:
DATA_NAME STRING 'Eesa Survey' ; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; project name
UNITS_NAME STRING 'Counts' ; Units of this data
UNITS_PROCEDURE STRING 'proc' ; Units conversion proc
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
END_TIME DOUBLE 7.9850884e+08 ; End time of sample
INTEG_T DOUBLE 3.0000000 ; Integration time
NBINS INT nbins ; Number of angle bins
NENERGY INT nnrgs ; Number of energy bins
DATA FLOAT Array(nnrgs, nbins) ; Data qauantities
ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps
THETA FLOAT Array(nnrgs, nbins) ; Angle for bins
GEOM FLOAT Array(nbins) ; Geometry factor
DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins
DTHETA FLOAT Array(nbins) ; Delta Theta
EFF FLOAT Array(nnrgs) ; Efficiency (GF)
MASS DOUBLE 0.0104389 ; Particle Mass
GEOMFACTOR DOUBLE 0.000272 ; Bin GF
HEADER_BYTES BYTE Array(25) ; Header bytes
INDEX LONG idx ; Index into sdt data
CALLING SEQUENCE:
data = get_fa_ies (time, [START=start | EN=en | ADVANCE=advance |
RETREAT=retreat])
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
START If non-zero, get data from the start time
of the data instance in the SDT buffers
EN If non-zero, get data at the end time
of the data instance in the SDT buffers
ADVANCE If non-zero, advance to the next data point
following the time input
RETREAT If non-zero, retreat (reverse) to the previous
data point before the time input
CALIB If non-zero, caclulate geometry
factors for each bin instead of using 1.'s
INDEX Index into sdt data
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ies.pro 1.23 12/03/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ies.pro)
FUNCTION: GET_FA_IES_C DESCRIPTION: function to load FAST I-esa survey data from the SDT program shared memory buffers. This is the caching version A structure of the following format is returned: DATA_NAME STRING 'Iesa Survey' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nnrgs, nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nnrgs, nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 0.0104389 ; Particle Mass GEOMFACTOR DOUBLE 0.000272 ; Bin GF HEADER_BYTES BYTE Array(44) ; Header bytes INDEX LONG idx ; Index in sdt buffers CALLING SEQUENCE: data = get_fa_ies (time, [START=start | EN=en | ADVANCE=advance | RETREAT=retreat], CALIB=calib, INDEX=idx, FLUSH=flush, CACHE_SIZE=cache_size) ARGUMENTS: time This argument gives a time handle from which to take data from. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. time will always be returned as a double representing the actual data time found in seconds since 1970. KEYWORDS: START If non-zero, get data from the start time of the data instance in the SDT buffers EN If non-zero, get data at the end time of the data instance in the SDT buffers ADVANCE If non-zero, advance to the next data point following the time or index input RETREAT If non-zero, retreat (reverse) to the previous data point before the time or index input CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s INDEX If index is set, it is used for selecting the index to get data. FLUSH If non-zero, will flush the data cache This is useful to force a re-read of sdt buffers in case the data has changed. CACHE_SIZE If gt 0, will reset the length in points of data to cache. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ies_c.pro 1.2 12/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. June '95 Major upgrade, using get_cache_md_from_sdt to load a time range at once to cache data in idl for speedup. J.M. Loran Apr. 97
(See fastDataToIdl/get_fa_ies_c.pro)
FUNCTION:
GET_FA_IES_HDR
DESCRIPTION:
function to load FAST I-esa survey header data from the SDT program
shared memory buffers.
At structure of the following format is returned:
DATA_NAME STRING 'Iesa_Survey_Packet_Hdr'; Data Quantity name
VALID INT 1 ; Data valid flag
PROJECT_NAME STRING 'FAST' ; Project name
UNITS_NAME STRING 'Raw' ; Units of this data
VALUES_PROCEDURE STRING 'eiesa_unpack_hdr' ; Name of proc to
; get values from hdr
TIME DOUBLE 8.0118726e+08 ; Start Time of sample
BYTES BYTE Array(44) ; Header bytes
INDEX LONG idx ; index into data
CALLING SEQUENCE:
data = get_fa_ies_hdr (time)
ARGUMENTS:
time This argument gives a time handle from which
to take data from. It may be either a string
with the following possible formats:
'YY-MM-DD/HH:MM:SS.MSC' or
'HH:MM:SS' (use reference date)
or a number, which will represent seconds
since 1970 (must be a double > 94608000.D), or
a hours from a reference time, if set.
time will always be returned as a double
representing the actual data time found in
seconds since 1970.
KEYWORDS:
INDEX: get data at this index.
RETURN VALUE:
Upon success, the above structure is returned, with the valid tag
set to 1. Upon failure, the valid tag will be 0.
REVISION HISTORY:
@(#)get_fa_ies_hdr.pro 1.9 07/23/97
Originally written by Jonathan M. Loran, University of
California at Berkeley, Space Sciences Lab. June '95
(See fastDataToIdl/get_fa_ies_hdr.pro)
FUNCTION: GET_FA_IES_TS DESCRIPTION: function to load FAST I-esa survey data from the SDT program shared memory buffers. This is the time series version. An array of npts structures of the following format are returned: DATA_NAME STRING 'Iesa Survey' ; Data Quantity name VALID INT 1 ; Data valid flag PROJECT_NAME STRING 'FAST' ; project name UNITS_NAME STRING 'Counts' ; Units of this data UNITS_PROCEDURE STRING 'proc' ; Units conversion proc TIME DOUBLE 8.0118726e+08 ; Start Time of sample END_TIME DOUBLE 7.9850884e+08 ; End time of sample INTEG_T DOUBLE 3.0000000 ; Integration time NBINS INT nbins ; Number of angle bins NENERGY INT nnrgs ; Number of energy bins DATA FLOAT Array(nnrgs, nbins) ; Data qauantities ENERGY FLOAT Array(nnrgs, nbins) ; Energy steps THETA FLOAT Array(nnrgs, nbins) ; Angle for bins GEOM FLOAT Array(nbins) ; Geometry factor DENERGY FLOAT Array(nnrgs, nbins) ; Energies for bins DTHETA FLOAT Array(nbins) ; Delta Theta EFF FLOAT Array(nnrgs) ; Efficiency (GF) MASS DOUBLE 0.0104389 ; Particle Mass GEOMFACTOR DOUBLE 0.000272 ; Bin GF HEADER_BYTES BYTE Array(25) ; Header bytes INDEX LONG index ; Data index, this pt. ST_INDEX LONG st_idx ; start index of arr EN_INDEX LONG en_idx ; end index of arr NPTS LONG npts ; array size CALLING SEQUENCE: data = get_fa_ies_ts (t1, t2, [NPTS=npts], [START=st | EN=en | PANF=panf | PANB=panb | IDXST=startidx], CALIB=calib) ARGUMENTS: t1 This argument gives the start time from which to take data, or, if START or EN keywords are non-zero, the length of time to take data. It may be either a string with the following possible formats: 'YY-MM-DD/HH:MM:SS.MSC' or 'HH:MM:SS' (use reference date) or a number, which will represent seconds since 1970 (must be a double > 94608000.D), or a hours from a reference time, if set. Time will always be returned as a double representing the actual data start time found in seconds since 1970. t2 The same as time1, except it represents the end time. If the NPTS, START, EN, PANF or PANB keywords are non-zero, THEN time2 will be ignored as an input paramter. KEYWORDS: CALIB If non-zero, caclulate geometry factors for each bin instead of using 1.'s Data time selection is determined from the keywords as given in the following truth table (NZ == non-zero): |ALL |NPTS |START| EN |IDXST|PANF |PANB |selection |use time1|use time2| |----|-----|-----|-----|-----|-----|-----|---------------------|---------|---------| | NZ | 0 | 0 | 0 | 0 | 0 | 0 | start -> end | X | X | | 0 | 0 | 0 | 0 | 0 | 0 | 0 | time1 -> time2 | X | X | | 0 | 0 | NZ | 0 | 0 | 0 | 0 | start -> time1 secs | X | | | 0 | 0 | 0 | NZ | 0 | 0 | 0 | end-time1 secs ->end| X | | | 0 | 0 | 0 | 0 | 0 | NZ | 0 | pan fwd from | X | X | | | | | | | | | time1->time2 | | | | 0 | 0 | 0 | 0 | 0 | 0 | NZ | pan back from | X | X | | | | | | | | | time1->time2 | | | | 0 | NZ | 0 | 0 | 0 | 0 | 0 | time1 -> time1+npts | X | | | 0 | NZ | NZ | 0 | 0 | 0 | 0 | start -> start+npts | | | | 0 | NZ | 0 | NZ | 0 | 0 | 0 | end-npts -> end | | | | 0 | NZ | 0 | 0 | NZ | 0 | 0 | st-index -> | | | | | | | | | | | st_index + npts | | | Any other combination of keywords is not allowed. RETURN VALUE: Upon success, the above structure is returned, with the valid tag set to 1. Upon failure, the valid tag will be 0. REVISION HISTORY: @(#)get_fa_ies_ts.pro 1.3 12/03/97 Originally written by Jonathan M. Loran, University of California at Berkeley, Space Sciences Lab. Apr '97
(See fastDataToIdl/get_fa_ies_ts.pro)
inputs:
start start time in any format accepted by time_double
finish end time in any format accepted by time_double
qtylist string containing comma separated list of desired columns from
the events_data table. e.g. 'X, Y, Z'
(See fastDataToIdl/database/get_fa_orbatt.pro)
PROCEDURE: get_fa_orbit
PURPOSE:
Computes orbit vectors for a set of times extending over a given timespan.
POSITIONAL PARAMETERS:
arg1:
if keyword parameter 'time_array' is not set, then this parameter is the
start time of the timespan over which orbit vectors are to be computed,
else it is the array of times for which orbit vectors are to be computed.
arg2:
if keyword parameter 'time_array' is not set, then this parameter is the
end time of the timespan over which orbit vectors are to be com