[Previous]
[Next]
NAME:
ibclrf
PURPOSE:
Takes a longword (32-bit) integer, and clears (sets to zero) a bit
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
Result = ibclrf(bitset, bitpos)
INPUT:
bitset longword A longword integer, one of it
bits will be clear or zero
bitpos longword The position of the bit that
will be cleared; 0 <= bitpos <= 31
OUTPUT:
Result longword Same as bitset, (bitwise) but
at bit position, bitpos, it will
definitely be a zero
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ice_pack
SEE ALSO:
ibsetf, ibtestf
MODIFICATION HISTORY:
8/23/00 Kevin Nguyen
[Previous]
[Next]
NAME:
ibsetf
PURPOSE:
Sets a bit in a longword (32-bit) integer
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
Result = ibsetf(bitset, bitpos)
INPUT:
bitset longword integer 32 bits longword integer.
Its bit at bit position bitpos
will be set at 1
bitpos longword integer The bit position of bit to be
set as 1 (0 <= bitpos <= 31)
OUTPUT:
Result longword integer Same at bitset bitwise except
at bit position bitpos
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ice_pack, ice_unpack, smei_frm_flag
SEE ALSO:
ibclrf, ibtestf
MODIFICATION HISTORY:
8/23/00 Kevin Nguyen
[Previous]
[Next]
NAME:
ibtestf
PURPOSE:
Tests if the bit at bitpos of a longword (32-bit) integer is set
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
Result = ibtestf(bitset, bitpos)
INPUT:
bitset longword integer will be used to test if
bit position, bitpos is zero or one
bitpos longword integer the bit postion, bit pos, being tested
OUTPUT:
ibtestf scalar; type: byte
1B if bit is set; 0B bit is clear
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ice_pack, ice_unpack, smei_frm_flag
SEE ALSO:
ibclrf, ibsetf
MODIFICATION HISTORY:
8/23/00 Kevin Nguyen
[Previous]
[Next]
NAME:
ice_pack
PURPOSE:
Compresses an integer array using a modified Rice algorithm
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
FUNCTION ice_pack, Orig, Pack, kmax=kmax, kshift=kshift, lenbit=lenbit, sign=sign, perm=perm
INPUTS:
Orig array; type: long integer
array to be compressed
OPTIONAL INPUTS:
kmax scalar; type: integer; default: 8
cutoff for applying compression (see PROCEDURE) (kmax > 0)
kshift scalar; type: integer; default: 0
minimum bits copied for each difference
lenbit scalar; type: integer; default: 16
# bits encoded when full value instead of a difference
is used (see PROCEDURE)
sign scalar; type: integer; default: 1
-1: all values in Orig < zero
+1: all values in Orig >= zero
0: both positive and negative values are present
perm array[0:kmax-kshift]; type: integer
permutation table (see PROCEDURE)
OUTPUTS:
ibit scalar; type: long integer
# bits in Pack used to hold the compressed data;
on failure ibit = 0 is returned; this happens only if
the compressed array Pack is bigger than the input
array Orig.
Pack array; type: long integer
compressed data;
The # elements in Pack is 1+(ibit-1)/nbit.
Bits 0..ibit-1 are filled with compressed data.
For the last element only bits 0 .. ib-1 are
used [ib = 1+ ((ibit-1) mod nbit)].
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, ibclrf, ibsetf, ibtestf
SEE ALSO:
ice_unpack
PROCEDURE:
The technique is based on the algorithm described by Michael W. Richmond and Nancy E.
Ellman, in March 1996 paper which we have in preprint form.
COMPRESSION ALGORITHM
---------------------
The Rice algorithm stores an integer in the following bit pattern:
0.......0 1 x.......x
|_______| |_______|
ipad itop + 1
a string of ipad 0-bits, followed by a terminating 1 bit, followed by a string of itop + 1
bits encoding the integer value.
The actual number encoded is either the full value from the input array, or the difference
with the previous element in the array (!!! for the first element in the array, the 'previous
element' is assumed to be zero).
The two cases are distinguished using the kmax value: if the absolute difference is less than
2^(kmax - 1) then the difference is encoded; if not then the full value is encoded
CASE A: Non-zero absolute difference less than 2^(kmax - 1)
-----------------------------------------------------------
2^(kmax -1) has only bit kmax - 1 set. I.e. for absolute differences less than 2^(kmax - 1) this
bit, and all higher bits, are NOT set, i.e. only the first kmax - 1 bits 0..kmax - 2 might be set.
Let itop be the highest 1-bit of the absolute difference. For a non-zero difference
0 <= itop <= kmax-2. Since bit itop is by definition set, the absolute difference
is fully described by the first itop bits 0...itop-1. An additional bit is needed
to encode the sign of the difference. So itop+1 bits are needed to store the difference:
first ipad=itop+1 0-bits, followed by a terminator 1-bit, indicate how many bits are
used. The terminator bit is then followed by the first itop bits of the absolute difference
followed by a sign bit. The total number of bits used is 2*itop+3.
0..........0 1 x..........x
|__________| |__________|
ipad=itop+1 itop+1
CASE B: Zero difference
-----------------------
No bit at all is needed to store a zero, except for a terminator bit. Not that this
is CASE A with ipad = 0, itop = -1.
CASE C: Absolute difference greater/equal 2^(kmax-1)
-----------------------------------------------------
In this case the full value instead of the difference is encoded.
For case A the maximum number of leading 0-bits is kmax-1. A string of kmax 0-bits
is used to indicate that a full value is encoded. After the terminator bit follow
the first lenbit bits. The total number of bits used is kmax+1+lenbit
0..........0 1 x..........x
|__________| |__________|
ipad=kmax lenbit
MINIMUM NUMBER OF BITS
----------------------
The above describes the the compression algorithm for the case kshift=0.
Setting kshift to non-zero value modifies the way differences are stored: for each
difference the kshift lowest bits are always stored. The differences are now encoded
as follows:
Zero difference (ipad = 0)
1 0
The 1-bit is the terminating bit (i.e. no leading 0-bits), followed by a 0-bit to
indicate the presence of a zero difference.
Difference needing 1..kshift bits (1 <= ipad <= kshift)
1 1 s x.....x
|_____|
kshift
The leading 1-bit is the terminating bit (i.e. no leading 0-bits). It is followed by
a 1-bit to be able to distinguish it from a zero difference. Then a bit follows
storing the sign of the difference (s-bit). Then follow the lowest kshift bits.
Differences needing kshift+1...kmax-1 bits (kmax-1 <= ipad <= kmax-1 above)
0.......0 1 x........x
|_______| |________|
ipad-kshift ipad
Full value (ipad=kmax)
0.......0 1 x........x
|_______| |________|
kmax-kshift lenbit
PERMUTATION TABLE
-----------------
The number of leading 0-bits varies from izero=0 to izero=kmax-kshift. These differences
serve merely as identifiers for the type of information stored after the terminating
1-bit. Rather than using them directly as described above, it is more efficient to
use a permutation table based on the histogram of the number of bits needed for to store
the differences. E.g. if for some sky image 3-bit difference occur most, followed by 2-bit,
then 1-bit, then 0-bit, then 4-bit, 5-bit, etc. then the permutation table would be
perm = 3,2,1,0,4,5...kmax-kshift
MODIFICATION HISTORY:
AUG-2000, Paul Hick (UCSD; pphick@ucsd.edu)
Rewrite of Andy Buffington's ricearc.for.
Main modifications:
- large intermediate byte array for storing individual bits is removed
- # leading zeroes used to store full values was reduced from kmax+1 to kmax
- use of kshift allows for slightly better compression
8/24/2000, Kevin Nguyen
- Rewrite the code from fortran to idl
[Previous]
[Next]
NAME:
ice_read
PURPOSE:
Reads a compressed file written by ice_write into an integer array
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
FUNCTION ice_read, cFile, Orig, info=info
INPUTS:
cFile scalar; type: string
file name of compressed file
OUTPUTS:
Result scalar; type: integer
0: failure (an error message is displayed)
1: success
Orig array; type: long integer
OPTIONAL OUTPUT PARAMETERS:
info=info scalar; type: string
trailer string extracted from end of file
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
IsType, ice_unpack
SEE ALSO:
ice_pack, ice_write
MODIFICATION HISTORY:
AUG-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
AUG-2000, Kevin Nguyen translated from Fortran to IDL
[Previous]
[Next]
NAME:
ice_unpack
PURPOSE:
Deompresses an integer array compressed using ice_pack
CATEGORY:
Bits and bytes
CALLING SEQUENCE:
FUNCTION ice_unpack, ibit, Pack, Orig, kmax=kmax, kshift=kshift, lenbit=lenbit, sign=sign, perm=perm
INPUTS:
ibit scalar; type: integer
# bits in Pack containing compressed data.
OPTIONAL INPUTS:
kmax scalar; type: integer; default: 8
cutoff for applying compression
kshift scalar; type: integer; default: 0
minimum # bits copied for each difference
lenbit scalar: type: integer; default: 16
# bits encoded when the full value instead
of a difference is used
sign scalar; type: integer
-1: all values in Orig are < zero
+1: all values in Orig are >= zero
0: both positive and negative values are present
perm array[0:kmax-kshift]; type: integer; default: lindgen(kmax-kshift+1)
permutation table
Pack array; type:long integer
compressed data
OUTPUTS:
Result scalar; type: long integer
# bits in Pack used to hold the compressed data
as determined during the decompression. This
should match the input value ibit.
Orig array; long integer
decompressed array
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, ORIG, ibsetf, ibtestf
CALLED BY:
ice_read
SEE ALSO:
ice_pack
PROCEDURE:
> The input values for ibit, kmax, lenbit, sign, perm must be the same as for
the ice_pack call that created the compressed array Pack.
> Inverts the compression of ice_pack.
MODIFICATION HISTORY:
AUG-2000, Paul Hick (UCSD; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IDL_postop_linux
PURPOSE:
Final startup chores
CALLING SEQUENCE:
PRO IDL_postop_linux
CATEGORY:
Startup
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
LOADCT, set_page
CALLED BY:
IDL_startup, IDL_vm_startup
PROCEDURE:
JUL-2005, Paul Hick (UCSD/CASS)
Added check for env. var IDL_PRINTER
[Previous]
[Next]
NAME:
IDL_postop_vms
PURPOSE:
Initialize miscellaneous IDL V2 facilities
CATEGORY:
utility
CALLING SEQUENCE:
invoked when IDL session is started
CALLS: ***
flip_colors, set_page
CALLED BY:
IDL_startup, IDL_vm_startup
PROCEDURE:
[Previous]
[Next]
NAME:
IDL_postop_win
PURPOSE:
Executed during startup after the IDL path has been established.
CATEGORY:
startup
CALLING SEQUENCE:
IDL_postop_win
CALLS: ***
CheckDir, FILEPATH, flip_colors, set_page
CALLED BY:
IDL_startup, IDL_vm_startup
PROCEDURE:
Sets defaults for foreground and background color.
Initializes printer (with set_page).
Moves to working directory
[Previous]
[Next]
NAME:
IDL_startup
PURPOSE:
Initialize IDL session
CATEGORY:
Startup
CALLING SEQUENCE:
Invoked when IDL session is started
INPUTS:
(none)
OUTPUTS:
(none)
CALLS:
IDL_postop_linux, IDL_postop_vms, IDL_postop_win, defsysv_smei
PROCEDURE:
> Environment variables:
SMEI:
The environment variable 'SMEI' MUST be defined, and point to the top
of the SMEI software tree.
sys, exe, com:
Will be defined by this procedure if they don't exist yet. Both are
subdirectories in 'SMEI' with the same name as the environment variable.
TUB, DAT:
Temporary and data directory. Both are best defined externally.
No attempt is made to define them here
VMS: The startup file should be defined as a logical at LOGIN
'$DEFINE IDL_STARTUP DSK_NAME::[DIR_NAME]IDL_STARTUP.PRO'
LINUX: Set startup file in the IDL development environment to this file.
Also set the working directory to the $SMEI directory
at the top of the software tree (where this file is located).
WIN Same as Linux
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IDL_startup_gen
PURPOSE:
Initialize IDL session
CATEGORY:
Startup
CALLING SEQUENCE:
Invoked when IDL session is started
PROCEDURE:
Only puts $SMEI/gen/idl in the path. Used to test integrity of /gen/idl tree.
File needs to be put in env var IDL_STARTUP.
MODIFICATION HISTORY:
JAN-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IDL_startup_pure
PURPOSE:
Initialize IDL session
CATEGORY:
Startup
CALLING SEQUENCE:
Invoked when IDL session is started
PROCEDURE:
Only puts $SMEI/gen/idl and $SMEI/sat/idl in the path.
Used to test integrity of /sat/idl tree.
File needs to be put in env var IDL_STARTUP.
MODIFICATION HISTORY:
JAN-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IDL_startup_sat
PURPOSE:
Initialize IDL session
CATEGORY:
Startup
CALLING SEQUENCE:
Invoked when IDL session is started
PROCEDURE:
Only puts $SMEI/gen/idl and $SMEI/sat/idl in the path.
Used to test integrity of /sat/idl tree.
File needs to be put in env var IDL_STARTUP.
MODIFICATION HISTORY:
JAN-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IDL_vm_startup
PURPOSE:
Initialize IDL session
CATEGORY:
Startup
CALLING SEQUENCE:
Invoked when IDL session is started
INPUTS:
(none)
OUTPUTS:
(none)
CALLS: ***
CheckDir, FILEPATH, IDL_postop_linux, IDL_postop_vms, IDL_postop_win, defsysv_smei
PROCEDURE:
> Environment variables:
SMEI:
The environment variable 'SMEI' MUST be defined, and point to the top
of the SMEI software tree.
SYS, EXE, COM:
Will be defined by this procedure if they don't exist yet. Both are
subdirectories in 'SMEI' with the same name as the environment variable.
TUB, DAT:
Temporary and data directory. Both are best defined externally.
No attempt is made to define them here
VMS: The startup file should be defined as a logical at LOGIN
'$DEFINE IDL_STARTUP DSK_NAME::[DIR_NAME]IDL_STARTUP.PRO'
LINUX: Set startup file in the IDL development environment to this file.
Also set the working directory to the $SMEI directory
at the top of the software tree (where this file is located).
WIN Same as Linux
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
img_read
PURPOSE:
Read image from file
CATEGORY:
I/O
CALLING SEQUENCE:
FUNCTION img_read, img_file, img_data, Red, Green, Blue, $
pseudocolor = PseudoColor , $
truecolorimage = TrueColorImage, $
rgbplane = RGBPlane , $
truedimension = truedimension , $
exten_no = exten_no , $
silent = silent , $
_extra = _extra , $
img_info = img_info , $
errormessage = errormessage
INPUTS:
img_file scalar; type: string
image file to be read
If no file is specified then the pickfile_dialog is used to
select a file name
OPTIONAL INPUT PARAMETERS:
/truedimension
scalar; type: integer: default: 1
dimension used for color interleave (1,2 or 3)
(works only for JPEG?)
/pseudocolor (used only for .BMP and .TIFF files)
If this keyword is set and the file stores a truecolor image then it
is converted to pseudocolor using the IDL color_quan function.
The color table is returned in the Red, Green and Blue arrays
OUTPUTS:
status 0: some error occurred
1: file properly read
img array[n,m] or array[3,n,m]; type: depends
if a truecolor image [3,n,m] is returned then the keyword TrueColor
returns 1 and RGBPlane returns the indices for the color planes
!!! if no file name is specified, and no file is selected with
from the file dialog then the scalar (img=-1) is returned.
OPTIONAL OUTPUT PARAMETERS:
red=Red, green=Green, blue=Blue
array[*]; type: byte (?)
red, green and blue color arrays, defining the color table for the image
Should be loaded with tvlct, Red, Green, Blue
The arrays are always returned for GIF files (256 colors) and pseudocolor
(8-bit) .TIFF and .BMP files. For truecolor .TIFF or .BMP files they are
only returned if the /pseudocolor keyword is set.
truecolor=TrueColor
scalar; type: integer
1 if true color image is returned; otherwise 0
rgbplane=RGBPlane
array[3]; type: integer; always [0,1,2] (see below)
if a true color image is returned then RGBPlane stores the indices for
the red, green and blue color plane, respectively.
(!!! currently the planes are rearranged if necessary, so that
RGBPlane =[0,1,2])
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
FXADDPAR, GetFileSpec, InitVar, IsType, MagnifyArray, READFITS, READ_BMP, READ_GIF
SubArray, SuperArray, TimeGet, TimeUnit, bin_read, do_file, flt_read, grd_read
gunzip_file, hide_env, smei_filename, smei_frm_cvhdr, smei_frm_read, smei_property
CALLED BY:
RemoteView_Display2D, RemoteView_Display3D, even_light, put_logo, qImage_Pick
qView_FileFilter, qView_GetData, qView_PickFiles, testnic, testsmei, view
PROCEDURE:
The file name type is used to determine how to read the file:
.gif: gif files are read using IDL procedure read_gif
.tif: tiff files are read using IDL procedure read_tiff
All remaining file types deal with grey-scale images.
.fits and .fts: read using readfits function (from SOLARSOFT library ???)
.txt: read using the flt_read function
There are several types of simple binary files created using bin_read, which
can also be read again by bin_read (the dimensions are stored in a header):
'.pph': status = bin_read ( img_file, img )
return short integer, long integer and floating point arrays.
Two file types refer to CCD images:
.img: these should be images from Andy's old Photometrics CCD camera. They are read using
status = bin_read(img_file,img,/aint,off=160,nx=384)
img = rotate(img,3)
i.e. a 160 byte header is skipped; then rows of 384 short integers are read
untill the end of file is reached, followed by clockwise rotation over 90 degree.
'.nic': these are the images from the SMEI CCD camera. They are read using
status = bin_read (img_file, img)
bin_read returns a long integer array of 1280x600 for these files.
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS)
Added documentation
OCT-2002, Paul Hick (UCSD/CASS)
Added keyword truedimension
MAR-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added detection of .gz files. These are now decompressed. The decompressed
file is then processed in the usual, and is then deleted.
[Previous]
[Next]
NAME:
InfiniteValue
PURPOSE:
Provide the infinity value for any data type
CATEGORY:
sat/idl/toolbox
CALLING SEQUENCE:
FUNCTION InfiniteValue, X
INPUTS:
X variable of any type
OUTPUTS:
Result scalar; type: as implied by 'size' vector
NaN value
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
IsType
CALLED BY:
ThomsonLOSFar, ThomsonLOSRomb
PROCEDURE:
For integers the number zero is returned.
For floating point the appropriate value from !values is returned.
MODIFICATION HISTORY:
MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
init_contiguous_group
CALLING SEQUENCE:
PRO init_contiguous_group, A, atleast=atleast
INCLUDE:
@compile_opt.pro
CALLS: ***
InitVar, destroyvar, next_contiguous_group
CALLED BY:
next_contiguous_group, smei_hdr_plot
PROCEDURE:
init_contiguous_group, A, atleast=atleast
WHILE next_contiguous_group(indx) DO BEGIN
(do stuff with A[indx]
ENDWHILE
COMMON:
common next_contiguous_group_common, n, m, p, nmin
[Previous]
[Next]
NAME:
InitVar
PURPOSE:
Initialize a variable
CATEGORY:
gen/toolbox
CALLING SEQUENCE:
PRO InitVar, X, Xinit, keyword_var=keyword_var, set=set, count=count
INPUTS:
X any variable
Xinit any variable; used to initialize X
OPTIONAL INPUT PARAMETERS:
/keyword_var if set, X is assumed to be a keyword the initialization
then is done with the command: X = keyword_set(X)
set=set instead of initializing X, the variable 'set' is initialized.
The content of X is transferred to 'set' if X exists.
(this keyword is ignored if /keyword_var is set).
count=count scalar; type: integer; default: 0
# elements in X that will trigger the initialization
(ignored if /keyword_var is set).
OUTPUTS:
X any variable; the initialized variable
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
AlignHeliosphere, AngleRange, AngleUnits, ArrayLocation, CheckDir, ColorEloTimeBox
ColorPolarBox, ColorSkybox, CombineRotations, CvPrecess, CvRotation, CvSky
CvSky_Solar_EloPa, Distance2Sun, EarthSky3DLoc, EarthTransit3DLoc
FUNCTION smeilatest lastorbit, Find2DGlitch, FindAllFiles, FindAllSubDirs
FindPeaks, FindStars, FishEye, GeographicInfo, GetColors [1], GetColors [2]
GetColors [3], GetFileSpec, GroupPixels, GuessRecs, InSitu, InsituTimeSeries
IntegrateLOS, InterpolateHeliosphere, IsBadTime, IsDisplay, IsPrinter, IsTime
IsType, KeplerOrbit, LocalExtrema, MagnifyArray, NewcombSun, PA_Pole, PlotBars
PlotCoronagraph, PlotCurve, PlotCurves, PlotDashes, PlotEarthSkymap [1]
PlotEarthSkymap [2], PlotEarthSkymap [3], PlotEarthSkymap [4], PlotEloTimeMap
PlotPlanarCut, PlotPolarSkymap, PlotPrep, PlotSolarDisk, PlotSphereCut
PlotSynopticMap, PlotUserstring, PutFileSpec, RGBO_Project, ReadSynopticMap
RemoteView, RemoteView_BodyLoc, RemoteView_Display2D, RemoteView_Display3D
RemoteView_FOV, RemoteView_FOV_loc, RemoteView_FOV_xyz, RemoteView_Init
RemoteView_Init_Display, RemoteView_Init_Matrix, RemoteView_Init_View
RemoteView_Matte, RemoteView_ZEclipticPlane, RemoteView_rgbo, RotationMeasure
SetFileSpec, SetRange, SkyDriveIn, Stretch_Colors, SubArray, TMO_skymotion, TagArray
ThomsonElectron, ThomsonElectronFar, ThomsonLOSFar, ThomsonLOSRomb
ThomsonLOSStep, ThomsonMidpoint, ThomsonSolarFlux, TimeArray, TimeGet
TimeInterpol, TimeLInterpol, TimeLimits, TimeMonth, TimeOp, TimeOrigin, TimePieces
TimePosn_test, TimeSet, TimeShift, TimeSplit, TimeString, TimeSystem, TimeUnit
TimeXAxis, TimeYDate, TimeYDoy, ToSolarRadii, allsky [1], allsky [2], allsky [3]
allsky_f, anicenum, ark_duty_cycle, badpix, bargraph, big_body, big_elongation
big_eph, big_orbit, bin_read, bin_write, boost, brachistochrone, coord3to2
coriolis_map, cvplot_figures, cvsmei, cvsmei_init, do_file, dusan_earth, e9hos
eclipsed_area, edit_smei, editsmei, even_light, even_light_corrections
even_light_figures, even_light_info, even_light_pedestal
even_light_photometry, even_light_plot, even_light_registration, fancy
fileset_sizes, findfile_fix, fix_cxlo, flat_centerofmass, flip_colors, flt_clean
flt_read, flt_string, forecast, forecast_cfg, forecast_env, forecast_ftp
forecast_html, forecast_ice, forecast_info, forecast_movie, forecast_movie_cp
get_page, getipssources, getnagoyasources, getootyasources, getsmeisources
grayburst, grd_read, grdout, gridfill, gridgen, gridgen1d, gunzip_file, gzip_file
hide_env, ice_pack, ice_unpack, img_read, init_contiguous_group, ipv6_packets
ipv6_traffic, is_running, jpl_body, jpl_close, jpl_eph, jpl_init, jpl_mag
jpl_parallax, jpl_phase, jpl_sizeofsun, jpl_state, jpl_test, krill_request_bars
krill_request_stats, los_weight, losgeometry, lsqLinearFit, lsqNormalFit
maygeometry, miscfig, mk_celias, mk_flick, mpc_body, mpc_comets, mpc_eph
mpc_eph_range, mpc_minor_planets, mpc_orbit_eph, nagoya_glevel
next_contiguous_group, nrZbrac, nso_fe_plot, nso_fe_read, nso_fe_start
os_separator, packet_size_graphs, packet_size_one_graph, packet_size_update
pkt_read, plot3darc, plot3dcube, plot3dline, plot3dtext, plot_ipv6_fraction
plot_traffic, plotbars_boundary, plotbars_plot, plotbars_shade, plotbars_sigma
plotcolumns, projfig, put_logo, qBar, qEphem, qEphem_State, qImage_Send, qImage_cw
qImage_cw_Box, qImage_cw_BoxCosine, qImage_cw_BoxImage, qImage_cw_BoxZoom
qImage_cw_Ellipse, qImage_cw_Ephem, qImage_cw_MinMax, qImage_cw_Property
qImage_cw_Show, qImage_cw_Tool, qImage_cw_Transform, qImage_cw_Update
qImage_cw_Wedge, qImage_cw_WedgeSection, qImage_cw_ZWedge, qImage_cw_smei_frm
qLine, qLine_YAction, qLoadCT, qRemoteView, qRemoteView_Calculate
qRemoteView_Histogram, qRemoteView_Time, qSave2File, qSave2File_Pick, qShow, qTool
qTool_State, qTool_Zoom, qTool_rebin, qView, qView_ApplyGain, qView_GetImage
qView_Image, qView_ImageInfo, qView_PlotTrack, qView_Sensitive
qView_SubtractBase, qView_TMO_tracksky, qView_UpdateActive, qView_XYZ_Update
qimage_fig, qnagoya, qset_page, qslider_cw, qsmei_hdr, qsmei_sky, qvu, remove_stars
remove_stars_c3s, remove_stars_m0, say, scalarproduct, set_page, sgp4_eph
sgp4_orbit_axis, sgp4_tle, show_wso, skyd_cat, skyd_reverse, skyd_version
smei_base_testcase, smei_blocked, smei_buf, smei_buf_get, smei_buf_getframe
smei_buf_mget, smei_buf_prep, smei_buf_read, smei_cam2angle, smei_camera
smei_camera_gain, smei_ccd2sky, smei_coriolis, smei_filename, smei_filepath
smei_findcrazy, smei_findobj, smei_findpnt, smei_fixpnt, smei_frm_base
smei_frm_cp, smei_frm_cvhdr, smei_frm_darkfit, smei_frm_drive, smei_frm_eclipse
smei_frm_findpoint, smei_frm_flatfield, smei_frm_hbar, smei_frm_info
smei_frm_read, smei_frm_rebin, smei_frm_smoothdark, smei_frm_summary
smei_frm_track, smei_frm_update, smei_frm_where, smei_fts_read, smei_getfile
smei_hdr_get, smei_hdr_make, smei_hdr_plot, smei_hdr_update, smei_mkbase
smei_mkc3mask, smei_mkcal, smei_mkcal_auto, smei_mkmask, smei_mkorb
smei_mksidereal, smei_mksky, smei_mkstarmask, smei_orbit_get, smei_orbit_stats
smei_plot_timeseries, smei_property, smei_radial2theta, smei_rewind
smei_setup_roi, smei_sgp4_orbits, smei_shutterwrong, smei_sky, smei_sky2cam
smei_sky2ccd, smei_sky_atlocation, smei_sky_cleanedge_fov
smei_sky_cleanedge_map, smei_sky_cleantime, smei_sky_field, smei_sky_getmask
smei_sky_grd2fts, smei_sky_hdr2range, smei_sky_read, smei_sky_testcase
smei_sky_track, smei_star_corepsf, smei_star_enough_bins, smei_star_filename
smei_star_fit, smei_star_fitone, smei_star_formatpnt, smei_star_info
smei_star_list, smei_star_lsqfit, smei_star_readpnt, smei_star_remove
smei_star_show, smei_star_split, smei_star_standard, smei_star_update
smei_star_writepnt, smei_www_skymaps, smei_zld_dumbbell, smei_zld_model
smei_zld_remove [1], smei_zld_remove [2], smei_zld_weekly, smei_zldsky
smeidb_mounted, smeifig, sphere_distance, sphere_great_arc, sphere_smooth
stardistance, statpos, stopwatch, strposn, surfertable [1], surfertable [2]
surfertable [3], surfertable_update [1], surfertable_update [2], tbad
telescope_sizes, testsmei, thomsonfig, timeposn, tolowcase, tomography_sp, twin
txt_block_read, txt_read, ulysses_passage, unexpected_event, unhide_env
unitvectors, usno_body, usno_eph, usno_init, usno_test, vectorproduct, view, view3d
vox_read, vox_update, vox_write, vu_check, vu_coronagraph, vu_correlate, vu_cvgrid
vu_earthskymap, vu_elotime, vu_extract, vu_filename, vu_fnc, vu_get_page, vu_getdata
vu_gettime, vu_header, vu_image, vu_insitu, vu_insitu_persist, vu_insitu_raw
vu_insitucurve, vu_is_sequence, vu_linecut, vu_lineofsight, vu_localskymap
vu_losmap, vu_mean, vu_movie, vu_nagoyasourcemap, vu_new_time, vu_planarcut
vu_point_source, vu_prefix, vu_quick_movie, vu_radialcut, vu_read, vu_remoteview
vu_select, vu_set, vu_solardisk, vu_spherecut, vu_stereoview, vu_syncgrid
vu_synopticmap, vu_thomson_antifish, vu_thomson_hammer, vu_timeseries
vu_type_insitu, vu_type_skymap, vu_update_hours, vu_update_marker
vu_vox_drawsphere, vu_vox_read, vu_vox_sequence, vu_vox_write, vu_whatis, vu_write
wedge_bounding_box, wedge_content, where_common, who_am_i, wso_read, wso_write
www_help, www_help_called_by, www_help_change_tabs, www_help_files
www_help_get_header, www_help_mailto, www_help_make, www_help_rsi, www_help_smei
www_help_style, www_help_tree, xhcs, xyoff
PROCEDURE:
If neither X nor Xinit exist, program is terminated
MODIFICATION HISTORY:
JUL-2002, Paul Hick (UCSD/CASS)
JAN-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added keyword set=set.
[Previous]
[Next]
NAME:
INPUTFORM
AUTHOR:
Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov
PURPOSE:
Generates expression string from an IDL value
CALLING SEQUENCE:
STRING = INPUTFORM(VALUE, ERRMSG=ERRMSG, STATUS=STATUS, ...)
DESCRIPTION:
The INPUTFORM function converts an IDL data value into its string
representation, suitable for execution at the IDL command line or
with EXECUTE(). This is similar to the "InForm" output
representation of Mathematica, which formats output so that it can
be entered again on the command line. INPUTFORM() is a
specialized form of STRING().
For example, the value DBLARR(2,2) has the default representation
'[[0D,0],[0D,0]]'
The formal goal of INPUTFORM is for the resulting textual
expression to be an exact representation of the original data.
Several other output options can be selected by using the /ZERO or
/ARRAY_NOTATION keywords.
Therefore, given the original value VARIABLE, then after executing
R = EXECUTE( 'variable1 = '+INPUTFORM(variable) )
The value, type, and dimension of VARIABLE1 and VARIABLE will be
the same.
Such behavior might useful in several circumstances:
* for printing values meant to be "pasted" back into the
command line by the user;
* for constructing command arguments to be EXECUTE()'d;
* for saving values in ASCII format for later execution.
OUTPUT OPTIONS:
The output of INPUTFORM can be controlled in the following ways.
See the EXAMPLES section for examples of each kind of behavior.
* By default, the output will replicate the exact values of the
input;
* If the /ZERO keyword parameter is set, then the output will
match the type and structure of the input, but all values
will be zero or blank, including IDL strings and structures.
This is useful if one wants to make a "blank template" from
an existing IDL data structure.
* If the /ARRAY_NOTATION keyword parameter is set, then any
input arrays are converted to INTARR(), DBLARR(), STRARR().
Scalars appear as in the input. Obviously the contents of
arrays will be zero/blank in this case. The combination of
/ZERO and /ARRAY_NOTATION produces a nice short-hand
blank template.
LIMITATIONS:
It should be noted that the IDL parser is not perfect.
While IDL has many data types, not all expressions are
representable as a textual string. Pointers and objects can be
represented. Examples of the parser limitation include,
* array expressions can have no more than 90 elements;
* bracketed array notation cannot be nested too deeply;
* anonymous structure arrays have no textual representation;
Given these limitations, the user of this routine must be prepared
for failure and have contingency plans. Error messages and status
indicators are provided to facilitate this. INPUTFORM() does not
call MESSAGE, so it should never intentionally crash.
Also, consider that the textual representation can never really be
suitable for very large arrays. The internal algorithm is thus
not optimized for speed as heavily numeric routines might be, and
instead tries to make the output slightly more readable.
INPUTS:
VALUE - the IDL value to be converted. Any value which has a
legal textual representation is permitted.
KEYWORDS:
ARRAY_NOTATION - if set, then any arrays in the input will be
replaced by their xxxARR() equivalent.
STATUS - upon return, a status indicator. A value of zero
indicates failure; one indicates success.
ERRMSG - upon return, a string message indicating the reason for a
failure, if any. The empty string ('') indicates
success.
MAX_DIMENSIONS - maximum number of array dimensions permitted in
VALUE. The conversion fails if the maximum is
exceeded.
Default: any number of dimensions is permitted.
NOTE: IDL does not permit deep nesting, for
dimensions greater than three.
MAX_ELEMENTS - maximum number of elements permitted in VALUE. The
conversion fails if the maximum is exceeded.
Default: any number of elements is permitted.
NOTE: the conversion may still fail if any array
dimension exceeds 90.
MAX_LEN - approximate maximum length of returned string. If large
string expressions exceed this size as they are being
composed internally, they will be terminated by a '...'
ellipsis and returned. This value is to be used as a
guideline by INPUTFORM(); the precise limit may not be
adhered to.
Default: 16384L
MAX_TAGS - maximum number of structure tags permitted in VALUE.
The conversion fails if the maximum is exceeded.
Default: any number of tags is permitted.
N_FLOAT - for floating point numerical values, N_FLOAT gives the
number of decimal digits to print. By definition,
setting this keyword will involve the loss of some
precision compared to the original value.
Default: full precision is printed.
ZERO - if set, then the output command will have zero values for
all fields, regardless of the contents of the input data.
RETURNS:
The resulting converted string, if successful. Upon failure,
STATUS is set to zero and the empty string ('') is returned.
EXAMPLE:
Convert a double array to text using the default output option,
IDL> x = [[1,2],[3,4]]
IDL> print, inputform(x)
---> [[1,2],[3,4]]
The same input, but using the /ZERO and /ARRAY_NOTATION options,
IDL> print, inputform(x, /zero)
---> [[0,0],[0,0]]
IDL> print, inputform(x, /array_notation)
---> INTARR(2L,2L)
Convert a structure,
IDL> y = create_struct('s1',5,'s2','strvalue','s3',[1,2,3])
IDL> print, inputform(y)
---> [{S1:5,S2:'strvalue',S3:[1,2,3]}]
Also with /ZERO and /ARRAY_NOTATION options,
IDL> print, inputform(y, /zero)
---> {S1:0,S2:'',S3:[0,0,0]}
IDL> print, inputform(y, /array_notation)
---> {S1:5,S2:'strvalue',S3:INTARR(3L)}
(Note that in the final case with /ARRAY_NOTATION alone, S3 is
replaced by INTARR(), but that the scalars are left unchanged.)
IDL> print, inputform(y, /zero, /array_notation)
---> {S1:0,S2:'',S3:INTARR(3L)}
(With /ZERO and /ARRAY_NOTATION combined, then all fields are
zero or blank).
SEE ALSO:
HELP, HELPFORM, PRINT, STRING
MODIFICATION HISTORY:
Written, CM, 10 Apr 2000
Added HELPFORM to SEE ALSO, CM, 04 Jul 2000
Corrected case of scalar float value, CM, 13 Jul 2000
Put a space after float types like 1E or 1D to ease parsing, CM,
18 Jul 2000
Add ability to print INPUTFORM of pointers, CM, 09 Dec 2002
Add ability to print INPUTFORM of object pointers, CM, 01 Oct 2003
Bug fix: actually obey MAX_ELEMENTS (was being ignored), CM, 22
Oct 2006
Change to square-bracket array syntax, CM, 27 Feb 2007
Add the ZERO and ARRAY_NOTATION keywords; handle NAN and INFINITY
values properly, CM, 02 Jun 2009
Add N_FLOAT keyword, CM, 13 Nov 2010
$Id: inputform.pro,v 1.8 2010/11/13 09:27:36 cmarkwar Exp $
[Previous]
[Next]
NAME:
Inside_Wedge
PURPOSE:
Tests whether image locations are inside a wedge
CATEGORY:
CALLING SEQUENCE:
result = Inside_Wedge(p_box,p)
INPUTS:
p_box array[2,2]; type: float
two opposite corners of the wedge in polar coordinates
in the form [ [angle1,radius1],[angle2,radius2] ]
p array[2,n,m,...]; type: float
image locations in polar coordinates
(same form as p_box)
OPTIONAL INPUT PARAMETERS:
exclude_p_box=exclude_p_box
array[2,2]; type: float
two opposite corners of another wedge in polar coordinates
in the form [ [angle1,radius1],[angle2,radius2] ]
This second wedge must lie entirely inside the first one.
If specified the coordinate array p is tested for inside
p_box and outside exclude_p_box.
OUTPUTS:
result array[n,m,...]; type: byte
0 for locations p outside the wedge
1 for locations inside the wedge
CALLS: ***
IsType, SubArray
CALLED BY:
SMEI_cr_removal, TMO_tracksky, cvsmei, even_light, qGlitch_Run
qImage_cw_BoxCosine, qImage_cw_SmeiMask, qImage_cw_ZEllipse, qView_PlotSeries
smei_ccd2sky, smei_sky2ccd, stardistance, wedge_content
RESTRICTIONS:
If p contains !values.f_nan the value 1 is returned
PROCEDURE:
> Formerly called qImage_cw_WTest
> The array p can have more than two dimensions, e.g. [2,n,m].
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
InSitu
PURPOSE:
Plots in-situ data from various spacecraft
CATEGORY:
CALLING SEQUENCE:
PRO InSitu, T, $
delt = delt, $
weight = weight, $
source = source, $
step = step, $
xtime = xtime, $
xlng = xlng, $
xlat = xlat, $
ylng = ylng, $
ylat = ylat, $
ydis = ydis, $
yden = yden, $
yvel = yvel, $
ybr = ybr , $
ybt = ybt , $
ybn = ybn , $
ybb = ybb , $
ykp = ykp , $
ydst = ydst, $
ypdyn = ypdyn, $
yvlng = yvlng, $
yvlat = yvlat, $
traceback=traceback,$
xrange = xrange, $
charsize=charsize, $
file = file, $
nocvsky = nocvsky, $
cvlast = cvlast, $
_extra = _extra
INPUTS:
T array[2], type: standard time structure
time range for time series
OPTIONAL INPUT PARAMETERS:
/xtime, /xlng, /xlat
select one to set the quantity plotted on the x-axis: time, heliographic longitude
or heliographic latitude. Only one can be specified; if none is specified
then /xtime is assumed
source=source
scalar; type: integer
identifies in situ instrument (see function Instrument)
/ylng, /ylat, /ydis, /yden, /yvel, /ybr, /ybt, /ybn, /ybb, /ykp, /ydst, /ypdyn, /yvlng, yvlat
detemines quantity plotted on y-axis. Multiple keywords can be specified.
If none is specified then velocity and density is plotted.
traceback=traceback
scalar; type: any; default:0 (no traceback)
heliocentric traceback distance in AU; adjusts time and heliographic longitude to
give a 'time and location of origin' at the traceback distance
OUTPUTS:
Output to screen
OPTIONAL OUTPUT PARAMETERS:
(none)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
Carrington, INSITUTIMESERIES0, InitVar, Instrument, IsType, PlotCurve, TimeGet
TimeSet, TimeUnit, TimeXAxis
PROCEDURE:
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS)
DEC-2001, Paul Hick (UCSD/CASS)
added call to Carrington to allow input of time as Carrington variable
SEP-2006, Paul Hick (UCSD/CASS)
Added /ypdyn keyword to process Mars Global Surveyor dynamic pressure data
SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added /yvlng and /yvlat keywords to plot velocity angles from the
SOMNI and EOMNI databases.
[Previous]
[Next]
NAME:
InsituTimeSeries
PURPOSE:
Extract in-situ data in specified interval, and average if necessary
CALLING SEQUENCE:
FUNCTION InsituTimeseries,$
data_request , $
t_request , $
t_given , $
data_given , $
delt = delt , $
weight = weight , $
traceback=traceback , $
source = source_ , $
nocvsky = nocvsky , $
silent = silent , $
cvlast = cvlast
INPUTS:
data_request array, type: string
determines which data are extracted.
Identifiers are:
'lng','lat','dis','den','vel','br','bt','bn','bb','pdyn','vlng','vlat'
'lng' = heliographic longitude (deg)
'lat' = heliographic latitude (deg)
'dis' = heliocentric distance (AU)
'den' = density (cm^-3)
'vel' = velocity (km/s)
'br' = radial magnetic field (nT)
'bt' = tangential magnetic field (nT)
'bn' = normal magnetic field (nT)
'bb' = field strength (nT)
'pdyn' = dynamic pressure (nPa)
'vlng' = azimuthal flow angle
'vlat' = elevation flow angle
t_request array[2],array[N] type: standard time structure
If array[2]: data are extracted between t_request[0] and t_request[1]
at times extracted from s/c insitu files
If array[N]: data are extracted at times t_request
Should be in chronological order
OPTIONAL INPUT PARAMETERS:
source=source scalar; type: integer or string
identifies insitu instrument either by name or integer
as provided by function Instrument.
delt=delt scalar; type: time difference structure, or float; default: 0
if present, and non-zero, time window used for averaging.
in-situ data inside [t-delt/2,t+delt/2] are averaged.
If a scalar (float or integer) is specified, then it is
assumed to be the time window in days.
/weight if set, standard deviations are used to weight the averages (if available
for selected instrument and data)
if not set, an unweighted average is calculated
traceback=traceback
scalar; type: any; default:0
trace back distance (AU)
if set and nonzero then the in situ data are traced back to a distance of
'traceback' AU, i.e. the time and heliographic longitude reflect the time of
origin at the traceback distance.
This option explicitly assumes that the distances in the in situ files are
in AU, the velocities in km/s, and the heliographic longitudes in degrees.
If this option is used date_request MUST contain 'lng','dis','vel'
OUTPUTS:
Result scalar; type: integer
0: if something went wrong
1: time series succesfully set up
(first check this status indicator before using the output arrays!!!)
t_given array[*]; type: time structure
times for output time series
If delt is set to a positive value and t_request contains more than two
elements then t_given=t_request and the time series contains data
averaged over delt days.
If delt is zero, or t_request contains only 2 elements then
t_given contains all times for which spacecraft data were found
(averaged over delt days if delt > zero).
(if /traceback is used then the time range is shifted relative to
the input range)
data_given array[*,n_elements(data_request)], type: float
data_given[*,i] are the data for the quantity indicated by data_request[i]
missing data are marked by the value !values.f_nan
OPTIONAL OUTPUT PARAMETERS:
source=source scalar; type: integer
if not set on input, the return value is set to whatever default
is set by the function Instrument (currently /somni).
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
BadValue, CvSky, FILEPATH, InitVar, Instrument, IsTime, IsType, TimeFixYear, TimeGet
TimeLimits, TimeOp, TimeSet, TimeUnit, UNIQ, big_body, big_eph, boost, destroyvar
flt_read, hide_env, jpl_body, say
CALLED BY:
dusan_earth, ulysses_passage, vu_insitu
RESTRICTIONS:
Needs system variables: !sun.spiral and !sun.au
The input time array should be in chronological order
PROCEDURE:
> Input files for density and velocity are hourly-averages. The filename is:
fil = filepath(root=getenv('SSW_SMEI_DAT'),sub='insitu','sw'+spacecraft+'_'+strcompress(year,/rem)+'.hravg')
e.g. file = 'imp8_2000.hravg'
> The files are assumed to be chronologically ordered.
> The file structure is described internally as column numbers for all quantities.
> Heliographic longitudes are returned in monotonic decreasing order by adding a multiple of 360
degrees when the timeseries crosses from one Carrington rotation to the next.
MODIFICATION HISTORY:
AUG-1998, Paul Hick (UCSD/CASS)
JUL-1999, Paul Hick (UCSD/CASS); documentation added
SEP-2001, Paul Hick (UCSD/CASS)
Added GSE & GSM to RTN conversion; currently this is only used
for the real-time ACE data.
JUL-2002, Paul Hick (UCSD/CASS)
Fixed a bug with the delt keyword. When delt was input as a
difference time structure it was converted to hours, instead of days.
DEC-2003, Paul Hick (UCSD/CASS)
Changed /omni to /somni (accesses the files with B in RTN)
Added /eomni (accesses the files with B in GSM)
The insitu data files can now also be located in a subdirectory
of $SSW_SMEI_DATA/insitu, and the filenames can be more general
than the default template described in PROCEDURE.
SEP-2006, Paul Hick (UCSD/CASS)
Added Dana Crider Mars Orbiter data
OCT-2006, Paul Hick (UCSD/CASS)
All ephemeris calculations now done by big_eph.
Added 'vlng','vlat' to pull the off-radial flow angles of the solar
wind speed out of the OMNI databases. Note that ONMI2 (EOMNI) and
modified OMNI (SOMNI) use different coordinates systems and different
definitions for the flow angles.
FEB-2007, Paul Hick (UCSD/CASS)
Replaced "from" keyword by "source" keyword. "from" is still accepted
but is now considered obsolete.
AUG-2007, Paul Hick (UCSD/CASS)
Input keyword can now also be a string (instead of just an integer)
In addition made the order of the various spacecraft independent
of the order in which function Instruments sets them up.
Removed keyword 'from'.
SEP-2007, Paul Hick (UCSD/CASS)
Added instrument vhm to plot Ulysses magnetic field data.
Added instrument windb to plot Wind magnetic field data
Rename instrument wind to windsw (plots n,v data)
FEB-2012, Paul Hick (UCSD/CASS)
Bugfix. For magnetic field data requiring a conversion from GSM
or GSE, the conversion would be silently skipped if the data request
did not include all three magnetic field components, br, bt, and bn.
There now is a check which results in an empty data array (and
return value 0) if only one or two magnetic field component are
specified.
JAN-2013, Paul Hick (UCSD/CASS)
Added instrument 'rcelias' (real-time SOHO/Celias data)
Bugfix. Test for presence of doy instead of month,day of month
did not always work.
JUN-2013, Paul Hick (UCSD/CASS)
Bumped 'atleast' value for rcelias from 5 to 6 after
minor change in header lines of insitu data file.
MAY-2015, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
For magnetic fields the coordinate transformation from GSM/GSE
to RTN is now done prior to the averaging over time delt,
instead of after.
[Previous]
[Next]
NAME:
Instrument
PURPOSE:
Provides a means for consistently dealing with all the different instrument for which
in situ observations are available
CATEGORY:
Auxilliary
CALLING SEQUENCE:
FUNCTION Instrument, which, $
imp8 = imp8 , $
celias = celias , $
rcelias = rcelias , $
windsw = windsw , $
windb = windb , $
acesw = acesw , $
swace = swace , $
aceb = aceb , $
somni = somni , $
eomni = eomni , $
helios1 = helios1 , $
helios2 = helios2 , $
stereoa = stereoa , $
stereob = stereob , $
swoops = swoops , $
vhm = vhm , $
mgs = mgs , $
name = name , $
label = label , $
nearearth = nearearth,$
L1 = L1 , $
list = list
Result = Instrument( which [, /name, /label, /nearearth )
Result = Instrument( /imp8 [, /name, /label, /nearearth )
INPUTS:
which scalar; string or integer
integer ID of primary name of instrument
OPTIONAL INPUT PARAMETERS:
The following instrument keywords are available
(instead of these keywords the argument 'which' can be set to 'imp8','celias', etc.)
/imp8
/celias
/windsw
/windb
/acesw
/aceb
/somni
/helios1
/helios2
/stereoa Stereo Ahead
/stereob Stereo Behind
/swoops Ulysses plasma data
/vhm Ulysses magnetic field data
/mgs Mars global surveyor
/name retrieves primary name
/label retrieves alternative name (usually same as primary name)
/nearearth identifies instrument as near-earth or deep-space
/L1 identifies instrument as at L1.
OUTPUTS:
Result scalar; integer, byte or string
/name set: string containing the primary name
/label set: string containing the alternative name
/nearearth set: 1B if instrument is a nearearth instrument;
0B if it is a deep-space instrument
no keyword set: integer identifier for the instrument
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
InSitu, InsituTimeSeries, dusan_earth, run_forecast_insitu, ulysses_passage
vu_insitu, vu_movie
PROCEDURE:
Each of the in situ instruments is associated with an integer identifier.
Currently listed by name are
['imp8','celias','windsw','somni','helios1','helios2','stereoa','stereob','swoops','acesw','aceb']
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS)
FEB-2000, Paul Hick (UCSD/CASS)
Changed /omni to /somni; added /eomni
FEB-2000, Paul Hick (UCSD/CASS)
Added Mars Global Surveyor
AUG-2007, John Clover (UCSD/CASS; jclover@ucsd.edu)
Added STEREO A/B
AUG-2007, Paul Hick (UCSD/CASS)
Added keyword list to pull out list of all instruments.
SEP-2007, Paul Hick (UCSD/CASS)
Added instrument 'vhm'
JAN-2013, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added instrument 'rcelias' for real-time Celias data
Also marked both types of Celias data as 'nearL1'
[Previous]
[Next]
NAME:
IntegrateLOS
PURPOSE:
Calculate a sky map by integrating through a 3D heliospheric matrix.
Two forms of integrated expressions are implemented:
(1) A weighted integration (used for g-level and IPS velocity):
F = Integral(F*W ds)/Integral(W ds)
(2) Straight integration (used for Thomson scattering):
F = Integral(F ds)
See PROCEDURE for more details.
CATEGORY:
sat/idl/util
CALLING SEQUENCE:
FUNCTION IntegrateLOS, R, FF, WW, $
; Keywords passed to InterpolateHeliosphere
R3D = R3D , $
dR3D = dR3D , $
xcrange = xcrange , $
cv2carrington=cv2carrington,$
xlrange = xlrange , $
opengrid= opengrid , $
xcgrid = xcgrid , $
xlgrid = xlgrid , $
rrgrid = rrgrid , $
fillbad = fillbad , $
degrees = degrees , $
minRR = minRR , $
f3dfnc = f3dfnc , $
f3darg = f3darg , $
w3dfnc = w3dfnc , $
w3darg = w3darg , $
rr_earth= rr_earth , $
ut_earth= ut_earth , $
pa_earth= pa_earth , $
elo_earth=elo_earth , $
elo_sun = elo_sun , $
silent = silent
INPUTS:
R array[3,*,n]; type: float
Locations in spherical coordinates for all points along all
lines of sight. '*' can be absent or represent more than one dimension.
E.g. for a typical skymap there will be two dimensions l,m
representing longitude and latitude. 'n' represents the
'depth' dimension along the lines of sight.
R[0,*,n] contains longitude angles in [0,360]
R[1,*,n] contains latitudes in [-90,90]
R[2,*,n] contains heliocentric distances in AU
The last dimension is the 'depth' dimension along the line of sight over
which the integration is performed.
'Densities' and 'Weights' can be specified in two ways.
If R3D and xcgrid are NOT specified then FF and WW directly specify densities
and weights along all lines of sight:
FF array[*,n]; type: float
volume data at locations 'R'.
WW array[*,n]; type: float
weights at locations 'R'.
If R3D or xcgrid are specified than calls to InterpolateHeliosphere
are made with arrays FF and WW to determine the function values and
weight along each line of sight.
In this case the following keywords are passed to InterpolateHeliosphere
R
FF or WW
R3D = R3D
dR3D = dR3D
xcrange = xcrange
cv2carrington=cv2carrington
xlrange = xlrange
opengrid= opengrid
xcgrid = xcgrid
xlgrid = xlgrid
rrgrid = rrgrid
fillbad = fillbad
See InterpolateHeliosphere for more information.
NOTE: R[0,*] MUST BE longitude angles, even though InterpolateHeliosphere
in principle allows both R[0,*] and xcrange to be Carrington variables.
R[0,*] must be a longitude angle because R is also passed as
argument to f3dfnc and w3dfnc, where it is used in combination
with the longitude angles in rr_earth
OPTIONAL INPUT PARAMETERS:
/degrees if set then all angles are in degrees (default: radians)
The integrands are set up using a number of additional keywords:
ut_earth=ut_earth
rr_earth=rr_earth
position Earth in same coordinates as R.
pa_earth=pa_earth
array[*,n]; type: float
line of sight position angle measured counterclockwise
from ecliptic north
elo_earth=elo_earth
array[*,n]; type: float
angle Sun-observer-segment on line of sight (i.e. the elongation)
for all line of sight segments (note that array[*,0] = array[*,1] etc.
elo_sun=elo_sun
array[*,n]; type: float
angle observer-Sun-segment on line of sight
OUTPUTS:
Result array[*]; type: float
sky map with line-of-sight integrated quantities
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
BadValue, InitVar, InterpolateHeliosphere, IsType
CALLED BY:
GetColors [2], GetColors [3], PlotEarthSkymap [3], PlotEarthSkymap [4]
RemoteView_Display2D, haystack_2006, vu_coronagraph, vu_earthskymap, vu_elotime
vu_lineofsight, vu_thomson_antifish, vu_thomson_hammer
PROCEDURE:
> Two types of expressions are evaluated
(1) <F> = Integral[ w3dfnc(s,W(s))*f3dfnc(s,F(s)) ds]/ Integral[ w3dfnc(s,W(s)) ds]
and
(2) <F> = Integral[ w3dfnc(s,W(s))*f3dfnc(s,F(s)) ds]
The line of sight integrations is done for all lines of sight specified.
The integration dimension always is the last dimension in the input arrays.
The integration is performed simply by summing over the integration dimension,
implicitly assuming a constant stepsize ds:
(1) <F> = Sum[ w3dfnc(s,W(s))*f3dfnc(s,F(s)) ]/ Sum[ w3dfnc(s,W(s)) ]
and
(2) <F> = Sum[ w3dfnc(s,W(s))*f3dfnc(s,F(s)) ]
Note that for expression (1) the stepsize ds will cancel. For expression (2)
it is the users responsibility to absorb the stepsize ds into one of the
input arrays F or W.
> W(s) and F(s) represent two physical quantities known on a heliographic grid
(for example solar wind velocity and density, and the s-dependence reflects some
geometrical aspect of the integration.
In all applications I can think of the dependence of f3dfnc on F(s) will be linear:
f3dfnc(s,t) = f3dfnc(s)*t. In that case the integration looks like:
<F> = Integral[ w3dfnc(s,W(s))*f3dfnc(s)*F(s) ds ]/ Integral[ w3dfnc(s,W(s)) ds ]
This form applies to the calculation of IPS velocities, where the weight factor
depends on the density: w3dfnc is 'IPS_velocity_w', W(s) = n(s), and
the perpendicular velocity is integrated: f3dfnc(s) = sin(angle(s)) (is
'IPS_velocity') and F(s) = V(s).
In its simplest form w3dfnc(s,t) = w3dfnc(s) and f3dfnc(s,t) = t. In that case:
<F> = Integral[ w3dfnc(s)*F(s) ds ]/ Integral[ w3dfnc(s) ds ]
i.e. <F> is a weighted average of F(s) along the line of sight. This form applies
to the calculation of IPS g-level with a weight factor that depends only on the
line of sight geometry: w3dfnc is 'IPS_hlevel_w', and the quantity F(s) is
the 'gamma function' (introduced in the tomography manifesto).
A special case occurs when there is no denominator:
<F> = Integral[ w3dfnc(s)*F(s) ds ]
This applies to the Thomson scattering brightness where w3dfnc is the scattered
intensity from a single electron ('ThomsonBrightness'), and F(s) is the
solar wind density n(s). The stepsize ds is absorbed into ThomsonBrightness.
> Bad values in the input array F3D are detected with the IDL 'finite' function.
This is done in InterpolateHeliosphere. The treatment of these bad values
depends on the setting of 'fillbad'.
MODIFICATION HISTORY:
AUG-1999, Paul Hick (UCSD/CASS)
AUG-2004, Paul Hick (UCSD/CASS)
Bug fix: w3dfnc was not be used if WW did not exist. This is wrong
when w3dfnc only uses R and not WW (as for the g-level determination).
Bug fix: if neither w3dfnc nor WW is defined (as for Thomson
scattering the average rather than the total along the line of
sight was calculated.
Also rearranged some of the arrangement. Now the presence of R3D
triggers a call to InterpolateHeliosphere.
JUN-2006, Paul Hick (UCSD/CASS)
Fixed bug in the summation expressions. It was explicitly set to
the third dimension. Now it is set to the last dimension present.
in F and W. Added grid keywords xcgrid, xlgrid and rrgrid to call to
InterpolateHeliosphere.
FEB-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added test for existence of xcgrid to trigger call to
InterpolateHeliosphere.
[Previous]
[Next]
NAME:
InterpolateHeliosphere
PURPOSE:
Get interpolated function values on scalar heliospheric matrix at specified
locations in the heliosphere.
CATEGORY:
sat/idl/util
CALLING SEQUENCE:
FUNCTION InterpolateHeliosphere, R, F3D, R3D, dR3D, $
xcrange = xcrange , $
xlrange = xlrange , $
is_carrington=is_carrington, $
cv2carrington=cv2carrington, $
opengrid = opengrid , $
periodic = periodic , $
xcgrid = xcgrid , $
xlgrid = xlgrid , $
rrgrid = rrgrid , $
fillbad = fillbad , $
degrees = degrees
(1) Matrix specified on implicit regular grid in spherical coordinates:
(usually heliographic coordinates)
F = InterpolateHeliosphere(R, F3D, R3D, dR3D, $
[xcrange=xcrange, xlrange=xlrange, /cv2carrington, /opengrid, /periodic, /fillbad, /degrees])
(2) Matrix on explicitly specified grid in spherical coordinates:
(usually heliographic coordinates)
F = InterpolateHeliosphere(R, F3D, xcgrid=xcgrid, xlgrid=xlgrid, rrgrid=rrgrid, $
[/fillbad, /degrees])
INPUTS:
All distances (R[2,*], R3D, dR3D) must have the same units (usually AU).
The coordinate system used for R must be consistent with the grid on which
F3D is defined. For the tomography heliographic coordinates are used, but
other coordinate systems (e.g. ecliptic) are allowed.
(1) Matrix specified on regular grid in spherical coordinates:
R array[3,*]; type: float
heliospheric locations where interpolated values are needed
R[0,*] longitudes (angle in radians or degrees, or Carrington variables)
R[1,*] latitudes (angle in radians or degrees)
R[2,*] heliocentric distance
F3D array[L,M,N,K]; type: float
3D matrix of function values of scalar heliospheric quantity
1 dim: longitude angles or Carrington variables
The range is set by keyword xcrange. xcrange covers 360 degrees.
For longitude angles: l=0,L-1 covers [xcrange[0],xcrange[1]]
where xcrange[1]-xcrange[0] is 360 degrees.
For Carrington variables: l=0,L-1 covers [xcrange[1],xcrange[0]]
where xcrange[1]-xcrange[0] is 1
2 dim: latitude angles
The range is set by keyword xlrange.
m=0,M-1 covers [xlrange[0],xlrange[1] degrees
For both angles the grid is closed (with the outer grid points on
the edges of the ranges. If /opengrid is set the angular
grids are open (with the outer grid points half a grid spacing
away from the edges of the ranges).
3 dim: heliocentric distance: n=0,N-1 covers R3D+i*dR3D
4 dim: absent for scalar field; 3 for the 3 components for a vector field
R3D scalar; type: float
heliocentric distance of inner boundary of F3D
dR3D scalar; type: float
heliocentric distance resolution of F3D
See keywords xcrange, xlrange, opengrid, periodic, is_carrington and
cv_carrington for more control over the implicit grid for F3D.
(2) Matrix on explicitly specified grid in heliographic coordinates:
R array[3,*]; type: float
heliospheric locations where interpolated values are needed
R[0,*] longitude angles (radians or degrees) or Carrington variables
R[1,*] latitude angles (radians or degrees)
R[2,*] heliocentric distance
F3D array[L,M,N,K]; type: float
3D matrix of function values of scalar or vector heliospheric quantity
xcgrid=xcgrid
array[L]; type: any
grid of longitude angles or Carrington variables, matching
R[0,*] (covering 1st dimension of F3D)
xlgrid=xlgrid
array[M]; type: any
grid of latitude angles matching R[1,*]
(covering 2nd dimension of F3D)
rrgrid=rrgrid
array[N]; type: any
grid of heliocentric distances matching R[2,*]
(covering 3rd dimension of F3D)
OPTIONAL INPUT PARAMETERS:
/degrees if set then the longitude and latitude are assumed to be in
degrees (default: radians)
/fillbad if set then GridFill is called first to fill in all 'bad' values
(1) Matrix specified on implicit regular grid in spherical coordinates:
/is_carrington
if SET then xcrange and R[0,*] are assumed to be
Carrington variables
/cv2carrington
if SET then xcrange is assumed to be specified as
as Carrington variable and R[0,*] is assumed to
be heliographic longitude.
The longitudes are converted to Carrington variables using
Carrington( mean(xcrange), R[0,*], /get_variable )
These values will be within 0.5 of mean(xcrange) if the longitudes
are in the range [0,360]
(the input R is NOT MODIFIED!!)
If neither /is_carrington nor /cv2carrington is set then xcrange and R[0,*]
are assumed to be longitude angles
xcrange=xcrange
scalar, array[2]; type: float; default: [0,360]
(or [0,1] if /is_carrington or /cv2carrington is SET).
If xcrange is a scalar then xcrange+[0,360] is assumed.
(or xcrange+[0,1] if /is_carrington or /cv2carrington is SET).
Range of longitude angles or Carrington variables covered by
array F3D.
!!! the default [0,1] is useful only if /cv2carrington is
set and F3D corresponds to an integer rotation (longitude
range [0,360])
xlrange=xlrange
scalar; array[2]; type: float; default: [-90,90]
If xlrange is a scalar then xlrange*[-1,1] is assumed.
Range of heliographic latitudes covered by array F3D
/opengrid if set then the angular grids (longitude and latitude) are assumed
to be open. By default the grids are assumed closed.
/periodic maps all R[0,*] values back into the range defined by xcrange
Only useful if F3D represents exactly one rotation.
OUTPUTS:
F array[*]; type: float
interpolated function values
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
BadValue, Carrington, InitVar, IsType, MEAN, REVERSE, ToRadians, boost, gridfill
CALLED BY:
IntegrateLOS, haystack_2006, qvu_draw, vu_atlocation, vu_lineofsight
vu_timeseries
PROCEDURE:
> Bad values are identified with the IDL 'finite' function
> The location R are translated into index values. The IDL function
interpolate is used to obtain an interpolated value. 'Missing' values
are set to BadValue(F3D).
(1) Matrix specified on implicit regular grid in spherical coordinates:
> If /is_carrington is SET then R[0,*] and xcrange MUST contain Carrington variables
> If /cv2carrington is SET then R[0,*] MUST contain heliographic longitudes and
xcrange MUST contain Carrington variables
> If neither are SET then R[0,*] and xcrange MUST contain longitude angles in
a spherical coordinate system.
MODIFICATION HISTORY:
OCT-1999, Paul Hick (UCSD/CASS)
SEP-2002, Paul Hick (UCSD/CASS)
Added check for bad entries in positions R. If any one of the three
coordinates is bad the matching entry in F is set to BadValue(F3D)
NOV-2003, Paul Hick (UCSD/CASS)
Fixed problem with replicate statement (didn't work in IDL 5.3)
JUN-2006, Paul Hick (UCSD/CASS)
Changed order of arguments (F3D is now 2nd instead of 4th argument)
Added keywords xcgrid, xlgrid and rrgrid to handle matrices defined
on irregular grids.
OCT-2006, Paul Hick (UCSD/CASS)
Modified to allow interpolation on vector fields.
FEB-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Generalized to work with spherical coordinate systems other the
just heliographic. Introduces keywords /is_carrington and /cv2carrington
to support the special case of heliographic coordinates
(used by the heliospheric tomography programs).
[Previous]
[Next]
NAME:
ips_exit
CALLING SEQUENCE:
pro ips_exit, cntr, aspect, yr=yr
INCLUDE:
@compile_opt.pro
CALLS: ***
ARROW, IPS_FLOW_CHART, get_page, set_page
[Previous]
[Next]
NAME:
IPS_hlevel_w
PURPOSE:
Calculates weights for integrating IPS g-level
CATEGORY:
sat/idl/toolbox
CALLING SEQUENCE:
FUNCTION IPS_hlevel_w, rr_earth, R, F, w3darg, $
ut_earth = ut_earth , $
pa_earth = pa_earth , $
elo_earth = elo_earth , $
elo_sun = elo_sun , $
degrees = degrees
INPUTS:
rr_earth array[3] for 'plain' sky map
array[3,N] for 'transit' sky map
location of Earth for all lines of sight
in same spherical coordinates as R.
R array[3,N,L,M] (N,L may be 1 or absent)
locations of all segments for all lines of sight
in same spherical coordinates as rr_earth
(usually heliographic)
This can be a grid of NxL lines of sight with M
segments along each line of sight
R[0,*,*,*] : longitude
R[1,*,*,*] : latitude
R[2,*,*,*] : heliocentric distance
F not used
w3darg array[4] w3darg[0] = observing freq (MHz)
w3darg[1] = source size (arcsec)
w3darg[2] = extra source size scale factor
w3darg[3] = beta_r
OPTIONAL INPUT PARAMETERS:
/degrees if set all input angles should be in degrees (default: radians)
ut_earth not used
pa_earth not used
elo_earth not used
elo_sun not used
OUTPUTS:
R array[N,L,M] weight factors
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
vu_coronagraph, vu_earthskymap, vu_lineofsight, vu_thomson_antifish
vu_thomson_hammer
CALLS: ***
CV_COORD, IPS_WeightFnc, SubArray, SuperArray
CALLED BY:
IPS_velocity_w
RESTRICTIONS:
For each line of sight segment the weight is the product of a factor
which is a function heliocentric distance and a factor which is a
function of the geocentric distance. The second factor is calculated
for one line of sight only on the assumption that it's the same for
all lines of sight.
PROCEDURE:
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS)
FEB-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu
Modified to work with list of los specified in any configuration
(not just as a 2D skymap)
[Previous]
[Next]
NAME:
IPS_params
PURPOSE:
Sets parameters for calculating IPS velocities and g-levels
CATEGORY:
Physics
CALLING SEQUENCE:
R = IPS_params( /nagoya )
R = IPS_params( freqmhz=FreqMHz, arcsec=ArcSec, sourcescale=SourceScale)
OPTIONAL INPUT PARAMETERS:
/nagoya if set, returns [327 , 0.1, 1.0]
/cambridge if set, returns [81.5, 0.3, 1.0]
/sandiego if set, returns [73.8, 0.3, 1.0]
OUTPUTS:
R array[3]; type: float; default: [327, 0.1, 1.0] (Nagoya values)
R[0]: observing frequency in MHz
R[1]: source size (arcsec)
R[2]: source scale (multiplicative factor to be applied to source size)
CALLED BY:
GetColors [2], GetColors [3], IPS_WeightFnc, PlotEarthSkymap [3]
PlotEarthSkymap [4], RemoteView_Display2D, los_weight, vu_coronagraph
vu_earthskymap, vu_elotime, vu_lineofsight, vu_thomson_antifish
vu_thomson_hammer
MODIFICATION HISTORY:
JUN-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IPS_velocity
PURPOSE:
Calculates component of solar wind velocity perpendicular to line of sight
CATEGORY:
sat/idl/toolbox
CALLING SEQUENCE:
FUNCTION IPS_velocity, rr_earth, R, F, w3darg, $
ut_earth = ut_earth , $
pa_earth = pa_earth , $
elo_earth = elo_earth , $
elo_sun = elo_sun , $
degrees = degrees
INPUTS:
rr_earth not used
R not used
F array[N,L,M] solar wind velocity matrix
w3darg not used
OPTIONAL INPUT PARAMETERS:
/degrees if set all input angles are in degrees
ut_earth not used
pa_earth not used
elo_earth angle Sun-Earth-LOS segment
elo_sun angle Sun-LOS segment-Earth
OUTPUTS:
Result array[N,L,M] velocity perpendicular to line of sight
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
vu_coronagraph, vu_earthskymap, vu_lineofsight, vu_thomson_antifish
vu_thomson_hammer
CALLS: ***
ToRadians
CALLED BY:
vu_lineofsight
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IPS_velocity_w
PURPOSE:
Calculates weights for integrating IPS g-level
CATEGORY:
Physics: IPS
CALLING SEQUENCE:
FUNCTION IPS_velocity_w, rr_earth, R, F, w3darg, $
ut_earth = ut_earth , $
pa_earth = pa_earth , $
elo_earth = elo_earth , $
elo_sun = elo_sun , $
degrees = degrees
INPUTS:
rr_earth array[3] for 'plain' sky map
array[3,N] for 'transit' sky map
location of Earth for all lines of sight
in same spherical coordinates as R.
R array[3,N,L,M] (N,L may be 1 or absent)
locations of all segments for all lines of sight
in same spherical coordinates as rr_earth
(usually heliographic)
This can be a grid of NxL lines of sight with M
segments along each line of sight
R[0,*,*,*] : longitude
R[1,*,*,*] : latitude
R[2,*,*,*] : heliocentric distance
F array[N,L,M] (N,L may be 1 or absent)
g-values at all los segments
w3darg array[4] w3darg[0] = observing freq (MHz)
w3darg[1] = source size (arcsec)
w3darg[2] = extra source size scale factor
w3darg[3] = betar
OPTIONAL INPUT PARAMETERS:
/degrees if set all input angles should be in degrees (default: radians)
ut_earth not used
pa_earth not used
elo_earth not used
elo_sun not used
OUTPUTS:
R array[N,L,M] weight factors
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
vu_coronagraph, vu_earthskymap, vu_lineofsight, vu_thomson_antifish
vu_thomson_hammer
CALLS: ***
IPS_hlevel_w
RESTRICTIONS:
For each line of sight segment the weight is the product of a
factor which is a function heliocentric distance and a factor
which is a function of the geocentric distance. The second
factor is calculated for one line of sight only on the assumption
that it's the same for all lines of sight.
These weights are calculated by ips_hlevel_w, and are here
multiplied by the F array.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IPS_WeightFnc
PURPOSE:
Calculates weight function along the line of sight for IPS
CATEGORY:
Physics
CALLING SEQUENCE:
W = IPS_WeightFnc(ZAu, params)
INPUTS:
ZAu array[N]; type float
distance from Earth along line of sight (AU)
params array[3]; type: float
params[0]: observing freq in MHz
params[1]: source size (arcsec)
params[2]: extra scale factor for source size
OUTPUTS:
W array[N]; type: float
weight factors
CALLS: ***
IPS_params, SPECTRALFNC, nrSimpson
CALLED BY:
IPS_hlevel_w, los_weight, miscfig
PROCEDURE:
CALCULATE INTEGRAL FOR WEIGHTING FUNCTION OF Z.
SIMPSON METHOD DOUBLE INTEGRAL
SpectralFnc = q*fresnel(q)*size(q)*spectr(q)
fresnel= fresnel filter term
size = source size term
spectr = spectrum fluctuation term
MODIFICATION HISTORY:
MAR-1999, Paul Hick (pphick@ucsd.edu)
Adapted from STELab Fortran code
[Previous]
[Next]
NAME:
ipsg2_conv
CALLING SEQUENCE:
pro ipsg2_conv, conv
INCLUDE:
@compile_opt.pro
CALLS: ***
FILEPATH, flt_string
[Previous]
[Next]
NAME:
ipsv
CALLING SEQUENCE:
function ipsv, iv1,rot,ht, nLat=nLat,earthp=earthp,earthLa=earthLa,Bound=Bound, $
axis60=axis60,axisv=axisv,Bcolors=Bcolors,xtick=xtick,Helio1Lo=Helio1Lo, $
Helio1La=Helio1La,Helio2Lo=Helio2Lo,Helio2La=Helio2La,H1or2=H1or2, $
Bcolor1or2=Bcolor1or2
CALLS: ***
CARRINGTONT, CvSky, HOSOrbit, LOADCT, NewcombSun, PLOTVD_HELIOS_HT, STRETCH
TimeString, WhatIs, flip_colors, ipsd, twin, vu_header, vu_read
[Previous]
[Next]
NAME:
ipsv
CALLING SEQUENCE:
function ipsv,iv1,i1B,rot,ht,nLat=nLat,earthp=earthp,earthLa=earthLa,Bound=Bound, $
axis60=axis60,axisv=axisv,Bcolors=Bcolors,xtick=xtick,Helio1Lo=Helio1Lo, $
Helio1La=Helio1La,Helio2Lo=Helio2Lo,Helio2La=Helio2La,H1or2=H1or2, $
Bcolor1or2=Bcolor1or2
CALLS: ***
CARRINGTONT, CvSky, HOSOrbit, LOADCT, NewcombSun, PLOTVDB_HELIOS_HT, STRETCH
TimeString, WhatIs, flip_colors, ipsd, twin, vu_header, vu_read
[Previous]
[Next]
NAME:
ipsv
CALLING SEQUENCE:
function ipsv, iv1,rot,ht, nLat=nLat,earthp=earthp,earthLa=earthLa,Bound=Bound, $
axis60=axis60,axisv=axisv,Bcolors=Bcolors,xtick=xtick,Helio1Lo=Helio1Lo, $
Helio1La=Helio1La,Helio2Lo=Helio2Lo,Helio2La=Helio2La,H1or2=H1or2, $
Bcolor1or2=Bcolor1or2
CALLS: ***
CARRINGTONT, CvSky, HOSOrbit, LOADCT, NewcombSun, STRETCH, TimeString, VU_VD_HELIOS_HT
WhatIs, flip_colors, ipsd, twin, vu_header, vu_read
[Previous]
[Next]
NAME:
ipv6_packets
PURPOSE:
CALLING SEQUENCE:
PRO ipv6_packets, pktfile, pngfile, zbuffer=zbuffer, silent=silent
INCLUDE:
@compile_opt.pro
CALLS: ***
BadValue, GetFileSpec, InitVar, PlotCurves, TimeOp, TimeSet, TimeUnit, ToRadians, UNIQ
boost, get_page, set_page, txt_read, who_am_i
[Previous]
[Next]
NAME:
ipv6_traffic
PURPOSE:
CALLING SEQUENCE:
PRO ipv6_traffic, pktfile, $
file = file , $
type = type , $ ; 'packets','bytes'
proto = proto , $ ; 'native','tunneled'
xysize = xysize , $
ylog = ylog , $
stack_sizes = stack_sizes , $
ipv4_only = ipv4_only , $
ipv6_only = ipv6_only , $
_extra = _extra
INCLUDE:
@compile_opt.pro
CALLS: ***
GetFileSpec, InitVar, IsType, TimeSet, UNIQ, boost, get_page, plot_ipv6_fraction
plot_traffic, set_page, txt_read
[Previous]
[Next]
NAME:
is_running
PURPOSE:
Check whether specified process is running
CATEGORY:
gen/idl/environment
CALLING SEQUENCE:
FUNCTION is_running, cmd, silent=silent, count=count
INPUTS:
cmd
OPTIONAL INPUT PARAMETERS:
/silent suprresses informational messages
OUTPUTS:
Result 0: 'cmd' NOT running
1: 'cmd' IS running
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, say
CALLED BY:
run_map, smei_hdr_update
PROCEDURE:
Preliminary version. Works only on Unix/Linux
Check 'cmd' against output of
ps -eo args
MODIFICATION HISTORY:
OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsBadTime
PURPOSE:
Defines and checks for bad times
CATEGORY:
Tell time
CALLING SEQUENCE:
IsBad = IsBadTime(T)
INPUTS:
T array[*]; type: time structure
time origin
OUTPUTS:
IsBad array[*]
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, TimeArray, TimeOp, TimeUnit
CALLED BY:
vu_new_time, vu_select, vu_update_hours
PROCEDURE:
MODIFICATION HISTORY:
OCT-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsDisplay
PURPOSE:
Check whether !d.name is the terminal display or the printer
CATEGORY:
Environment
CALLING SEQUENCE:
FUNCTION IsDisplay, dev
INPUTS:
(none)
OUTPUTS:
Result scalar; type: byte
0: it's a printer device
1: it's the display
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar
CALLED BY:
even_light_corrections, even_light_photometry, even_light_registration
get_page, qBar, qLine_Curve, qnagoya_skymap, twin, view, vu_image
PROCEDURE:
Returns true if !d.name is !TheTerminal. !TheTerminal is set during IDL startup
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsPrinter
PURPOSE:
Check whether !d.name is the printer
CATEGORY:
Environment
CALLING SEQUENCE:
FUNCTION IsPrinter, dev
INPUTS:
(none)
OUTPUTS:
Result scalar; type: byte
1: it's a printer device
1: it's not the printer
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar
CALLED BY:
get_page
PROCEDURE:
Returns true if !d.name is !ThePrinter or !d.name = 'PS'.
!TheTerminal is set during IDL startup
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsSymLink
PURPOSE:
Checks whether a file or directory is a symbolic link
CATEGORY:
Environment
CALLING SEQUENCE:
B = IsSymLink(file)
INPUTS:
file scalar; type: string
name of file or directory to be tested
OUTPUTS:
B scalar; type: integer
0: not a symbolic link
1: it's symbolic link
On non-Unix systems, always 0 is returned
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
FindAllSubDirs
RESTRICTIONS:
> Has only been tested on Linux (bash shell) under IDL 5.3 and 5.5
> The islink script is needed for IDL version <= 5.4 and must be in the Linux path
> Does not work on a path that contains a symbolic link, e.g.
if /usr/local/rsi is a symbolic link then /usr/local/rsi/lib will
return zero.
PROCEDURE:
> Only useful on Unix/Linux systems.
If !version.os_family is not 'unix' then always 0 is returned.
> If !version.os_family is 'unix' then:
- for IDL 5.3 and earlier the script islink is spawned. The
output from this script (0 or 1) is captured in the 'result'
argument of spawn.
- for IDL 5.4 and later, a 'test -L' is spawned, and the
exit_status keyword is used directly (this makes the test
independent of the islink script).
MODIFICATION HISTORY:
JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsTime
PURPOSE:
Check whether argument is a time structure
CATEGORY:
smei/gen/idl/toolbox/time
CALLING SEQUENCE:
FUNCTION IsTime, T, orbit=orbit
INPUTS:
T array; type: anything
OPTIONAL INPUTS:
/orbit
OUTPUTS:
Result scalar; type: byte
0 if argument is not a time structure
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsType
CALLED BY:
Carrington, CvSky_RTN, GeographicInfo, InsituTimeSeries, PlotCurve, PlotPrep
TimeDay, TimeEaster, TimeXAxis, TimeYDate, TimeYDoy, ark_duty_cycle, big_eph
big_orbit, cvsmei, eclipsed_area, fileset_sizes, forecast_cfg, forecast_ice, gridgen
gridgen1d, jpl_eph, jpl_parallax, jpl_sizeofsun, lsqLinearFit, mpc_eph
mpc_eph_range, mpc_orbit_eph, nagoya_glevel, qImage_cw_Where, qLine, qLine_Curve
qLine_FitPlot, qLine_XBase, qRemoteView_ChangeTimes, qRemoteView_Time
qView_ApplyGain, qView_PlotSeries, qView_PlotTrack, qView_UpdateTime, qsmei_hdr
qsmei_sky_pick, sgp4_orbit_axis, skyd_cat, smei_buf_get, smei_buf_getframe
smei_buf_read, smei_cam_quaternion, smei_coriolis, smei_filename, smei_filepath
smei_frm_cp, smei_frm_darkfit, smei_frm_hbar, smei_frm_mask, smei_frm_summary
smei_frm_where, smei_getfile, smei_hdr_get, smei_hdr_make, smei_mkcal, smei_mkorb
smei_rewind, smei_star_fit, smei_star_show, smei_star_showsmooth
smei_zld_weekly, smeidb_mounted, telescope_sizes, usno_eph, vu_elotime, vu_gettime
vu_insitu, vu_insitu_persist, vu_insitu_raw, vu_insitucurve, vu_localskymap
vu_movie, vu_select, vu_set_time_entry
PROCEDURE:
Keys on structure name
MODIFICATION HISTORY:
JAN-2004, Paul Hick (UCSD/CASS)
FEB-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added keyword /orbit
[Previous]
[Next]
NAME:
IsType
PURPOSE:
Check for type of variable, or get type code
CATEGORY:
Toolbox: generic
CALLING SEQUENCE:
R = IsType(X, /floating_x) tests whether X is of type 'floating'
R = IsType(/floating_x) returns type code for type 'floating'
R = IsType(X) returns type code for X
INPUTS:
X any variable
OPTIONAL INPUT PARAMETERS:
Only one of these should be set:
/Byte_X
/Integer_X
/Short_Integer_X (same as Integer_X)
/Longword_X
/Floating_X
/Double_X
/Complex_floating_X
/String_X
/Structure_X
/Complex_double_X
/Pointer_X
/Object_reference_X
/Unsigned_Integer_X
/Unsigned_Short_Integer_X (same as Unsigned_Integer_X
/Unsigned_Longword_X
/Integer_64_bit_X
/Unsigned_Integer_64_bit_X
OUTPUTS:
IsTime scalar; type: long integer
if argument X is set, in combination with one of the type keywords:
0 if argument is not of specified type; 1 if it is
otherwise
type code of X, or type code for specified type keyword
OPTIONAL OUTPUT PARAMETERS:
type =type scalar; type: integer
code of specified type
bytes=bytes scalar; type: integer
# bytes in scalar of specified type
name =name scalar; type: string
name of specified type
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar
CALLED BY:
AngleRange, AngleUnits, BadValue, Carrington, ColorSkybox, CombineRotations
CvPointOnLos, CvRotation, CvSky, CvSky_HEEQ, CvSky_Heliographic, CvSky_Solar_EloPa
EarthTransit3DLoc, FindAllFiles, FindPeaks, FindStars, FishEye, FitKeplerOrbit
GeographicInfo, GetColors [1], GetColors [2], GetColors [3], GetFileSpec
GroupPixels, HammerAitoff, InSitu, InfiniteValue, Inside_Wedge, InsituTimeSeries
IntegrateLOS, InterpolateHeliosphere, IsTime, MagnifyArray, MercatorProj, PRO bold
PlotBars, PlotCoronagraph, PlotCurve, PlotCurves, PlotEarthSkymap [1]
PlotEarthSkymap [2], PlotEarthSkymap [3], PlotEarthSkymap [4], PlotEloTimeMap
PlotPlanarCut, PlotPolarSkymap, PlotPrep, PlotSolarDisk, PlotSphereCut
PlotSynopticMap, PlotUserstring, RGBO_DepthCue, RGBO_Project, RemoteView
RemoteView_CubeFrame, RemoteView_CurrentSheet, RemoteView_Display2D
RemoteView_Display3D, RemoteView_FOV, RemoteView_FOV_xyz, RemoteView_Init
RemoteView_Init_Matrix, RemoteView_Init_View, RemoteView_Matte
RemoteView_ZEclipticPlane, RemoteView_rgbo, SetFileSpec, SubArray, SuperArray
TagArray, ThomsonElectron, ThomsonLOSDensity, ThomsonLOSFar, ThomsonLOSRomb
ThomsonLOSStep, ThomsonRadialFilter, ThomsonSetupLOS, TimeArray, TimeGet
TimeInterpol, TimeLInterpol, TimeLimits, TimeMonth, TimeOp, TimeOrigin, TimePieces
TimeSet, TimeShift, TimeSplit, TimeString, TimeSystem, TimeUnit, TimeXAxis, TimeYDate
TimeYDoy, WhatIs, WhatIs0, anicenum, ark_duty_cycle, array_smooth, arrow3d, badpix
bargraph, big_body, big_elongation, big_eph, big_eph_clean, big_eph_short, bin_read
bin_write, boost, brightness, cvsmei, cvsmei_init, do_file, eclipsed_area
even_light_info, even_light_photometry, fileset_sizes, flat_centerofmass
flip_colors, flt_read, forecast, forecast_html, forecast_movie, get_page
getipssources, getnagoyasources, getootyasources, getsmeisources, grd_read
gridgen, gridgen1d, hide_env, ice_read, img_read, ipv6_traffic, jpl_body, jpl_eph
jpl_mag, krill_request_bars, krill_request_stats, lsqLinearFit, lsqQuadraticFit
maygeometry, mk_celias, mk_flick, mpc_body, mpc_comets, mpc_eph, mpc_minor_planets
mpc_orbit_eph, nagoya_glevel, nso_fe_read, packet_size_graphs
packet_size_update, pkt_read, plot3darc, plot3dcube, plot3dline, plotbars_plot
plotcolumns, put_logo, qBar, qEphem, qEphem_State, qImage, qImage_FileInfo
qImage_Pick, qImage_Send, qImage_SendDestination, qImage_TriggerSend, qImage_cw
qImage_cw_BoxCosine, qImage_cw_BoxImage, qImage_cw_DrawCross
qImage_cw_DrawEphem, qImage_cw_Ellipse, qImage_cw_Ephem
qImage_cw_EphemKill [1], qImage_cw_MinMax, qImage_cw_Property
qImage_cw_Set_Value, qImage_cw_Transform, qImage_cw_Update, qImage_cw_Wedge
qImage_cw_ZEllipse, qImage_cw_ZWedge, qImage_cw_ctable, qImage_cw_smei_frm
qLine, qLine_XBase, qLoadCT, qRemoteView_Kill, qRemoteView_List, qRemoteView_Time
qSave2File, qSave2File_Save, qShow, qTool, qTool_State, qView, qView_ApplyGain
qView_ImageInfo, qView_UpdateActive, qnagoya_plot, qset_page, qslider_cw
qsmei_hdr, qsmei_sky, qsmei_sky_FileInfo, qsmei_sky_pick, rank_array, run_map
set_page, sgp_body, skyd_cat, smei_base_testcase, smei_buf_get, smei_buf_getframe
smei_buf_gzip, smei_buf_mget, smei_buf_prep, smei_buf_read, smei_cam_quaternion
smei_camera, smei_ccd2sky, smei_coriolis, smei_filename, smei_filepath
smei_findobj, smei_frm_base, smei_frm_cvhdr, smei_frm_drive, smei_frm_eclipse
smei_frm_findpoint, smei_frm_flag, smei_frm_flatfield, smei_frm_hbar
smei_frm_ped, smei_frm_read, smei_frm_smoothdark, smei_frm_summary
smei_frm_track, smei_frm_update, smei_frm_where, smei_frm_write, smei_fts_read
smei_getfile, smei_hdr_c3maskupload, smei_hdr_get, smei_hdr_make, smei_hdr_plot
smei_hdr_update, smei_i2m, smei_mkbase, smei_mkcal, smei_mkglare, smei_mkmask
smei_mkorb, smei_mkorb_auto, smei_mksidereal, smei_mksky, smei_mkstdstar
smei_mkzldresidue, smei_orbit_set, smei_orbit_stats, smei_pick_stars
smei_plot_timeseries, smei_property, smei_rewind, smei_setup_roi
smei_shutterwrong, smei_sky, smei_sky2cam, smei_sky2ccd, smei_sky_cleanedge_fix
smei_sky_cleanedge_fov, smei_sky_field, smei_sky_getmask, smei_sky_grd2fts
smei_sky_hdr2mode, smei_sky_hdr2range, smei_sky_read, smei_sky_track
smei_star_fit, smei_star_fitone, smei_star_info, smei_star_list
smei_star_lsqbins, smei_star_lsqfit, smei_star_make, smei_star_remove
smei_star_show, smei_star_showsmooth, smei_star_standard, smei_star_stdmaps
smei_star_update, smei_star_writepnt, smei_theta2radial, smei_www_skymaps
smei_zld_dumbbell, smei_zld_model, smei_zld_remove [1], smei_zld_remove [2]
smei_zld_weekly, smeidb_mounted, sphere_distance, sphere_smooth, stardistance
statpos, stopwatch, telescope_sizes, thomsonfig, timeposn, tplot, twin, txt_block_read
txt_read, usno_body, usno_eph, usno_init, view, vox_read, vox_write, vu_atlocation
vu_coronagraph, vu_cvgrid, vu_earthskymap, vu_elotime, vu_extract, vu_filename
vu_fnc, vu_get_page, vu_getdata, vu_gettime, vu_image, vu_insitu, vu_insitu_persist
vu_insitu_raw, vu_insitucurve, vu_linecut, vu_lineofsight, vu_localskymap
vu_losmap, vu_mean, vu_movie, vu_nagoyasourcemap, vu_new_time, vu_planarcut
vu_point_source, vu_quick_movie, vu_radialcut, vu_read, vu_remoteview, vu_select
vu_set, vu_solardisk, vu_spherecut, vu_stereoview, vu_syncgrid, vu_synopticmap
vu_thomson_antifish, vu_thomson_hammer, vu_timeseries, vu_type_insitu
vu_type_skymap, vu_vox_read, vu_vox_write, vu_weight, vu_write, wedge_bounding_box
wedge_content, wso_read, wso_write, www_help, www_help_crosslinks
www_help_is_text, www_help_mailto, www_help_make, www_help_master
www_help_names, www_help_rsi, www_help_smei, www_help_tree, xhcs
PROCEDURE:
Trivial
MODIFICATION HISTORY:
APR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
IsWindowSystem
PURPOSE:
Check whether !d.name is a window system
CATEGORY:
Environment
CALLING SEQUENCE:
FUNCTION IsWindowSystem
INPUTS:
(none)
OUTPUTS:
Result scalar; type: byte
0: not a window system
1: it's a window system
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
pcursor, twin
PROCEDURE:
Compares !d.name against a list of devices (currently X and WIN)
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)