[Previous]
[Next]
NAME:
badpix
CALLING SEQUENCE:
PRO badpix,pat,patterns,mean_pat=mean_pat, stdv_pat=stdv_pat,first=first,last=last
INCLUDE:
@compile_opt.pro ;
CALLS: ***
FILEPATH, FITSHEAD2STRUCT, GetFileSpec, HEADFITS, InitVar, IsType, READFITS
SetFileSpec, SuperArray, bin_write, boost, txt_read
[Previous]
[Next]
NAME:
BadValue
PURPOSE:
Provide the Not A Number value for any data type
CATEGORY:
sat/idl/toolbox
CALLING SEQUENCE:
FUNCTION BadValue, 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:
AlignHeliosphere, CleanGlitchBox, Find2DGlitch, GeographicInfo, GetColors [2]
GetColors [3], InsituTimeSeries, IntegrateLOS, InterpolateHeliosphere
LocalExtrema, MessengerOrbit, PlotBars, PlotCoronagraph, PlotEarthSkymap [1]
PlotEarthSkymap [2], PlotEarthSkymap [3], PlotEarthSkymap [4], PlotEloTimeMap
PlotPolarSkymap, RemoteView_CurrentSheet, RemoteView_Display2D
RemoteView_FOV_loc, RemoteView_Init_Matrix, SMEI_cr_removal, StereoAOrbit
StereoBOrbit, TMO_skymotion, TMO_tracksky, ThomsonMidpointFar, ThomsonPDistance
ThomsonPDistanceFar, UlyssesOrbit, allsky [1], allsky [2], allsky [3], allsky_f
big_eph, cvgrd, cvgrd_skymap, cvsmei, eclipsed_area, edit_smei, editsmei, even_light
even_light_info, even_light_photometry, even_light_registration, flt_read
flt_string, forecast, forecast_cfg, getipssources, getnagoyasources
getootyasources, getsmeisources, grdout, ipv6_packets, jpl_eph, losgeometry
makediff, maygeometry, mpc_eph, mpc_orbit_eph, nso_fe_temperature
physics_constant, plot_ipv6_fraction, plot_traffic, qEphem_State, qGlitch_Run
qImage_TrackPeak, qImage_cw_DrawCross, qImage_cw_Set_Value, qImage_cw_ZUpdate
qImage_cw_ZWedge, qLine, qLine_Curve, qLine_IsX, qLine_XBase
qRemoteView_Calculate, qView_TMO_tracksky, qvu, qvu_draw, sgp4_eph
sgp4_orbit_period, smei_ccd2sky, smei_findpnt, smei_frm_base, smei_frm_summary
smei_hdr_get, smei_hdr_plot, smei_plot_timeseries, smei_property, smei_sky
smei_sky2ccd, smei_sky_atlocation, smei_sky_cleanedge_median
smei_sky_hdr2range, smei_sky_read, smei_sky_track, smei_star_fit
smei_star_showsmooth, smei_zld_model, smei_zld_remove [1], smei_zld_remove [2]
sphere_smooth, stardistance, txt_block_read, ulysses_passage, usno_eph
vu_atlocation, vu_correlate, vu_earthskymap, vu_header, vu_insitu
vu_insitu_persist, vu_insitu_raw, vu_linecut, vu_lineofsight, vu_mean
vu_planarcut, vu_read, vu_solardisk, vu_thomson_antifish, vu_thomson_hammer
vu_timeseries, vu_type_insitu, vu_type_skymap, vu_vox_write, wedge_content
wso_read
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:
bargraph
PURPOSE:
Plot bar graph
CATEGORY:
Plotting
CALLING SEQUENCE:
PRO bargraph, YY, sigma=sigma, $
minbin = minbin , $
maxbin = maxbin , $
bin = bin , $
histo = histo , $
hatch = hatch , $
shade_color = shade_color , $
xrange = xrange , $
yrange = yrange , $
title = title , $
average = average , $
median = median , $
maximum = maximum , $
_extra = _extra , $
stat = stat , $
oplotx = oplotx
INPUTS:
Y array[n]; type: any numerical array
array to be plotted in bargraph
OPTIONAL INPUTS:
sigma=sigma scalar or array[n]; type: float
errors in Y-array
Ignored if /histo is set.
If sigma is not a scalar, but does not have the
same # elements as Y then it is ignored
/histo if set the Y is passed through the IDL
histogram function using keywords minbin, maxbin, bin
minbin scalar; type: float; default: 0.0
minimum X-value = left edge of leftmost bin
bin scalar; type: float; default: 1.0
bin width
maxbin scalar; type: float
maximum Y-value, only used as keyword to
IDL histogram function if /histo is set
/hatch if set and nonzero, bins will be hatched
xrange=xrange
array[2]; type: float
xrange keyword to IDL plot command
yrange=yrange
array[2]; type: float
yrange keyword to IDL plot command
/average if set, plot vertical line at position of average
/median if set, plot vertical line at position of median
/maximum if set, plot vertical line at position of maximum
title scalar; type: string; default: value of bin width
title string
_extra=_extra additional keywords passed to IDL plot command
OPTIONAL OUTPUTS:
stat=stat array[3]; type: float
positions of average, median and maximum
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsType, statpos
CALLED BY:
even_light_info, even_light_photometry, even_light_registration, qBar, testnic
tryg
PROCEDURE:
> The number of bins is n_elements(Y)
> The bin edges are minbin+bin*indgen(n_elements(Y)+1)
> To plot a histogram of an array
bargraph,histogram(Y,min=25,max=350,bin=50),25,50
MODIFICATION HISTORY:
AUG-1992, Paul Hick (UCSD/CASS)
Modification of HIST.PRO (Written Feb'91 by DMZ (ARC))
NOV-1992, Paul Hick (UCSD/CASS)
Added option to plot standard deviations
JAN-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Minor modifications; added stat keyword
[Previous]
[Next]
NAME:
big_body
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
FUNCTION big_body, body, count=count, alias=alias
INPUTS:
body scalar, or array; type: string
list of names of bodies
If keyword /alias is set then 'body' MUST be a scalar
OPTIONAL INPUT PARAMETERS:
/alias if SET then a list of aliases is returned for the
specified 'body'.
OUTPUTS:
Result if /alias NOT set:
if 'body' NOT defined:
array[count]; type: string
list of names of bodies
This is the concatenation of bodies handled by the
JPL planetary ephemeris, the USNO asteroid ephemeris,
the MPC minor planet and comet ephemeris, and the
SGP satellite ephemeris. Finally a few deep space
satellites are included for which we happen to have
ephemeris data available: Helios 1, Helios 2 and Ulysses
if 'body' set:
same as input 'body' with aliases replaced by the
real names of bodies.
if /alias SET:
array[count]; type: string
a list of aliases for the specified 'body'.
Aliases exist for the two Helios
and Stereo spacecraft, Ulysses and Mars.
For all other bodies the input value is returned.
OPTIONAL OUTPUT PARAMETERS:
count=count scalar; type: integer
if /alias NOT set: number of bodies handled by big_eph
if /alias IS set : number of aliases for input 'body'j
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsType, jpl_body, mpc_body, sgp_alias, sgp_body, usno_body, where_common
CALLED BY:
InsituTimeSeries, PlotPlanarCut, RemoteView_Init_Display, big_elongation
big_eph, big_orbit, forecast, forecast_movie, vu_insitu, vu_movie, vu_timeseries
PROCEDURE:
Acceptable aliases are defined in sgp_alias.
(currently this is only SMEI, WindSat, Coriolis = sat27640
Additional aliases defined here:
Helios A, Helios-A, Helios_A, Helios-1, Helios_1 = Helios 1
Helios B, Helios-B, Helios_B, Helios-2, Helios_2 = Helios 2
Stereo A, Stereo-A, Stereo_A, StereoA, Stereo 1, Stereo-1, Stereo_1, Stereo1 = StereoA
Stereo B, Stereo-B, Stereo_B, StereoB, Stereo 2, Stereo-2, Stereo_2, Stereo2 = StereoB
Swoops = Ulysses
Messenger = Messenger
mgs = Mars
MODIFICATION HISTORY:
OCT-2006, Paul Hick (UCSD/CASS)
NOV-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added keyword /alias
[Previous]
[Next]
NAME:
big_elongation
PURPOSE:
Calculate elongations between to directions in the sky
CATEGORY:
gen/idl/ephem
CALLING SEQUENCE:
FUNCTION big_elongation, ut , $
center = center , $
body = body , $
ephemeris = ephemeris , $
degrees = degrees , $
rectangular = rectangular , $
silent = silent , $
_extra = _extra
INPUTS:
ut array[1]; time structure
OPTIONAL INPUT PARAMETERS:
center=center
scalar; type: string
default: big_body('earth')
body=body scalar; type: string
default: big_body('sun' )
ephemeris location for which elongation is requested
default: big_body('mars')
scalar; type: string
array[2],array[2,n]; long/lat arrays
array[3],array[3,n]; long/lat/dis arrays
array[3],array[3,n]; rectangular coordinates
OUTPUTS:
Result scalar or array;
elongation
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
CV_COORD, CvSky, InitVar, IsType, big_body, big_eph, boost, sphere_distance
PROCEDURE:
One line of sight is defined by 'center' and 'body', and
is the ephemeris for body 'body' relative to body
'center' at time 'ut' as returned by big_eph.
So, by default, this is the geocentric location of the
the Sun.
If 'ephemeris' is a string 'scalar', the second line of
sight is the ephemeris of body 'ephemeris' relative to
body 'center' at time 'ut' as returned by big_eph.
Alternatively, ephemeris is a numeric array containing
equatorial coordinates to one or more locations in the
sky.
MODIFICATION HISTORY:
NOV-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
big_eph
PURPOSE:
Controls all available ephemeris data
CATEGORY:
gen/idl/ephem
CALLING SEQUENCE:
FUNCTION big_eph, tt , $
jpls = jpls , $
usnos = usnos , $
mpcs = mpcs , $
stars = stars , $
m_min = m_min , $
m_max = m_max , $
body = body , $
center = center , $
to_sphere = to_sphere , $
precess = precess , $
degrees = degrees , $
names = names , $
nodist = nodist , $
count = count , $
clean = clean , $
onebody = onebody , $
sc_loc = sc_loc , $
state = state , $
_extra = _extra
INPUTS:
tt array; type: time structure
list of times in UT
OPTIONAL INPUT PARAMETERS:
Any combination of the following keywords determines which
bodies are used; if the selection of keywords selects a body
more than once, then the duplicate copy is removed from the list.
/jpls if set, positions for Sun, Moon, and all 9 planets
are returned from the JPL ephemeris
/usnos if set, positions of all asteroids from the USNO
ephemeris are returned
/mpcs if set, positions for all minor planets and comets from
locally available ephemerides from the Minor Planet
Center are returned
/stars if set, positions for all stars (brighter than magnitude
m_max) from the SMEI star catalogues are returned
m_max=m_max scalar: type: float; default: none
used only if /stars is set. Only stars with magnitudes
brighter than m_max are returned.
body=body scalar; type: string; default: none
comma-separated list of bodies for which positions are
required. The names are compared against names in the
JPL, USNO, MPC and SMEI star databases. The comparison
is case-insensitive.
center=center scalar; type: string or integer; default: jpl_body(/sun)
any of the bodies in the JPL ephemeris, or the name of
of an Earth-orbiting satellite. This determines the origin
of the coordinates system used. See PROCEDURE.
/to_sphere if set, spherical coordinates are returned. By default,
rectangular coordinates are used
_extra=_extra passed to CvSky
Should be used to set one of the to_* keywords allowed
for CvSky to determine the output coordinate frame.
Note that this means that CvSky determines what the
default coordinate frame for the output vectors are.
Currently the default in CvSky (if no to_* keywords are
specified) is ecliptic coordinates.
/precess if set, coordinates are precessed to the equinox at time
'tt'. By default, J2000 coordinates are returned.
/degrees if set, all angles will be in degrees. Default is radians
/clean if set, the output arrays are reduced by removing all bodies
and all times for which no valid positions were obtained.
/onebody can be used to remove the dummy second dimension if
only one body is specified, i.e. an array[3,ntime] is
returned, instead of an array[3,1,ntime]
OUTPUTS:
Result array[3,nbody,ntime]; type: double
positions of requested bodies. The distance scale is in AU.
By default the ephemeris returns J2000 ecliptic
rectangular coordinates (see keyword _extra).
This is modified with keywords /precess, /to_sphere and
_extra=_extra
tt array; type: time structure
if /clean is set then this is the subset of the
input times for which valid positions were founds
if /clean is NOT set the input tt is not modified
OPTIONAL OUTPUT PARAMETERS:
names=names array; type: string
names of bodies for which positions are returned
nodist=nodist array; type: byte
0 indicates a planet, comet or asteroid
1 indicates a star
For stars the distance is arbitrarily set to one.
count=count scalar; type: integer
# bodies for which positions are returned.
INCLUDE:
@compile_opt.pro
CALLS: ***
AngleRange, BadValue, CV_COORD, CvPrecess, CvSky, HOSOrbit, InitVar, IsTime, IsType
MessengerOrbit, StereoAOrbit, StereoBOrbit, SuperArray, TimeSet, TimeSystem, UNIQ
UlyssesOrbit, big_body, big_eph_boost, big_eph_clean, big_eph_short, destroyvar
jpl_body, jpl_eph, mpc_body, mpc_comets, mpc_eph, mpc_minor_planets, mpc_orbit_eph
sgp4_eph, sgp_alias, sgp_body, smei_star_alias, smei_star_info, usno_body
usno_close, usno_eph, where_common
CALLED BY:
BZero, CvSky, CvSky_GSE, CvSky_GSEQ, CvSky_GSM, CvSky_RTN, EarthSky3DLoc
EarthTransit3DLoc, GeographicInfo, InsituTimeSeries, PlotCoronagraph
PlotEarthSkymap [1], PlotEloTimeMap, PlotPlanarCut, PlotPolarSkymap
PlotSolarDisk, RemoteView_BodyLoc, RemoteView_Display2D, RemoteView_Init_View
big_elongation, big_orbit, cv, forecast_cfg, jpl_parallax, jpl_sizeofsun
qEphem_State, qImage_cw_DrawEphem, qRemoteView, qRemoteView_Pick, qnagoya_plot
smei_sgp4_orbits, smei_sky, smei_sky_track, smei_zld_model, smei_zld_remove [1]
smei_zld_remove [2], smei_zld_weekly, vu_point_source, vu_radialcut
vu_solardisk, vu_stereoview, vu_synopticmap, vu_timeseries, vu_vox_draworbit
vu_vox_write
PROCEDURE:
The 'center' keyword determines the origin of the coordinate system.
The default is heliocentric coordinates. This can be changed to
any of the bodies in JPL ephemeris, i.e. setting center=jpl_body(/earth)
forces geocentric coordinates.
Center can also be set to an Earth-orbiting spacecraft by specifying the
name of an available file with orbital elements. The spacecraft position
is taken into account using the sgp4_eph routine.
Currently the only satelite we have is Coriolis
NOTE: for stars the 'center' keyword is ignored
MODIFICATION HISTORY:
JUL-2005, Paul Hick (UCSD/CASS)
OCT-2006, Paul Hick (UCSD/CASS)
If one of the ephemeris program would return a bad position vector
(e.g. when an MPC ephemeris is accessed outside the time range of the
MPC file) then the conversion to spherical coordinates would set the
angles to zero with only the radial distance staying bad. Fixed it
so the angles are now bad too.
The procedure now also keeps track of which bodies have already
been identified to avoid unnecessarily accessing an ephemeris.
MAR-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added /precess keyword to sgp4_eph calls to make sure J2000
coordinates are returned.
[Previous]
[Next]
NAME:
big_eph_boost
PURPOSE:
(For internal use by big_eph only)
CATEGORY:
CALLING SEQUENCE:
big_eph_boost, nt, rr, pp, names, list, nodist, distflag
INPUTS:
nt scalar; type: integer
# times in rr and pp
rr array[3,*,ntt]; type: double
positions already accepted
pp array[3,*,ntt]; type: double
positions to be added
names array; type: string
names of bodies already accepted
list array; type: string
names of bodies to be added
nodist array: type: byte
list of distance flags of accepted bodies
distflag array: type: byte
list of distance flags to be added
OUTPUTS:
rr array[3,*,ntt]; type: double
input rr with pp added
names array; type: string
input names with list added
nodist array; type: byte
input nodist with distflag added
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
boost
CALLED BY:
big_eph
MODIFICATION HISTORY:
JUL-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
big_eph_clean
PURPOSE:
(For internal use by big_eph only)
CATEGORY:
gen/idl/ephem
CALLING SEQUENCE:
PRO big_eph_clean, tt, rr, names, nodist
INPUTS:
tt array[m]; type: time structure
times
rr array[3,n,m]; type: double
position for n bodies at m times
names array[n]; type: string
names of m bodies
nodist array[n]; type: byte
distance flags for m bodies
OUTPUTS:
tt array; type: time structure
input tt with all times removed for which no
positions are available
rr array; type: double
input rr with all times and all bodies
removed for which no positions are available
names array; type: string
input names with bodies removed for which no
positions are available
nodist array; type; byte
input nodist with bodies removed for which no
positions are available
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
IsType, destroyvar
CALLED BY:
big_eph
MODIFICATION HISTORY:
JUL-2005, Paul Hick (UCSD/CASS)
NOV-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Fixed serious bug.
[Previous]
[Next]
NAME:
big_eph_short
PURPOSE:
(For internal use by big_eph only)
CATEGORY:
gen/idl/ephem
CALLING SEQUENCE:
FUNCTION big_eph_short, bodies, list, names, add_list=add_list, found=found
INPUTS:
bodies array; type: string
list of all requested but not yet accepted bodies
list array: type: string
list of bodies in one of the ephemeris data bases
names array; type: string
list of all bodies already accepted
OUTPUTS:
Result scalar; type: integer
# new bodies accepted
OPTIONAL OUTPUT PARAMETERS:
add_list=add_list array[count]; type: string
names of new bodies accepted
The names in 'add_list' are all name in 'list'
that are not yet in 'names'
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
IsType, UNIQ, where_common
CALLED BY:
big_eph
MODIFICATION HISTORY:
JUL-2005, Paul Hick (UCSD/CASS)
OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added found keyword
[Previous]
[Next]
NAME:
big_orbit
PURPOSE:
Get coordinates arrays for the orbit of one of the
bodies supported by the big_eph ephemeris.
CATEGORY:
gen/idl/ephem
CALLING SEQUENCE:
FUNCTION big_orbit, TT , $
body = body , $
precess = precess , $
to_sphere = to_sphere , $
degrees = degrees , $
silent = silent , $
_extra = _extra
INPUTS:
TT array[1]; type: standard time structure
OPTIONAL INPUT PARAMETERS:
body=body scalar; type: string; default: jpl_body(/earth)
/precess passed to big_eph
precesses the orbital locations from
J2000 to epoch TT
/to_sphere by default rectangular coordinates are returned
If /to_sphere is set these are converted
to spherical coordinates.
/degrees if set, angles returned when /to_sphere is
set are in degrees; default is radians.
_extra=_extra passed to CvSky
this should be one of the to_* keywords
allowed for CvSky and determines the
reference frame of the orbital coordinates
OUTPUTS:
Result array[3,*] type: float
coordinate arrays for orbit of 'body'
The unit of length is AU; if /to_sphere
is set the units for the angles depends
on the setting of /degrees.
If the body is not recognized then -1 is
returned
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
CvSky, InitVar, IsTime, TimeOp, TimeSet, TimeUnit, big_body, big_eph, destroyvar, gridgen
jpl_body, mpc_body, mpc_eph_range, usno_body
CALLED BY:
PlotPlanarCut, RemoteView
PROCEDURE:
The orbit is set up by using NewcombSun on an array of times
covering one Julian year centered on TT.
Then CvSky is used to transform to heliographic coordinates.
MODIFICATION HISTORY:
JUN-1997, Paul Hick (UCSD/CASS)
OCT-2002, Paul Hick (UCSD/CASS)
Fixed bug in orbit calculation by adding /heliocentric
keyword to NewcombSun. The problem only was visible
for viewing locations extremely close (within a few
earth radii) of Earth.
JUN-2004, Paul Hick (UCSD/CASS)
Switched to JPL ephemeris instead of using NewcombSun.
This allowed adding orbits for other planets and Moon.
Renamed from RemoteView_EarthOrbit to RemoteView_PlanetOrbit
OCT-2006, Paul Hick (UCSD/CASS)
Now using big_eph instead of jpl_eph. Allows adding of
partial orbits for comets and asteroids.
Renamed to RemoteView_BodyOrbit
OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Better documentation. Renamed to big_orbit.
[Previous]
[Next]
NAME:
bin_read
PURPOSE:
Read 2D array from binary file
CALLING SEQUENCE:
FUNCTION bin_read, InFile, Array, $
errormessage = errormessage , $
type = type , $
eor = eor , $
bor = bor , $
silent = silent , $
ramdisk = ramdisk , $
nx = nX , $
twod = twod , $
block = block , $
dimonly = dimonly , $
sizeonly = sizeonly , $
unix = unix , $
drop = drop , $
header = header , $
trailer = trailer
status = bin_read(File, Array, errormessage=errormessage)
INPUTS:
File string file name
OPTIONAL INPUT PARAMETERS:
type=type scalar; type: integer
type code for returned array (see IsType)
If not set then type=2 (short integer is assumed)
header=header
scalar; type: integer; default: 0
# bytes at start of files preceding the data array
(these are skipped when reading the data).
If the file extension is .pph or .nic then
this keyword is ignored.
/eor if set, the last column of the array is discarded
(useful for reading binary files containing a CR at
the end of each record).
/bor if set, the first two bytes and the last two bytes
of each record are discarded
(some binary VAX files contain 2 bytes of leading
and trailing garbage???).
nx=nX used to fix the first dimension of the output array
/twod reads a 2D array with nX=nY (ignored if nX is used)
/block ignores the recordlength if its 512 bytes (1 VMS block)
/sizeonly returns dimensions of the array (NOT the array itself,
i.e. the file is NOT read)
/unix forces a call to IEEE_TO_HOST
OUTPUTS:
status 0: some error occurred (check 'errormessage')
1: file properly read
Array array[n,m]
2D array of requested type
if something goes wrong Array = -1 is returned
OPTIONAL OUTPUT PARAMETERS:
errormessage
scalar; type: string
Contains null string if file was read succesfully
Contains error message if an error occurred
trailer array; type: byte
if any data are found after the data area, then these
trailing data are returned here as a byte array.
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
GetFileSpec, IEEE_TO_HOST, InitVar, IsType, SetFileSpec, do_file, gunzip_file
CALLED BY:
PlotEarthSkymap [2], SMEI_cr_removal, allsky_f, even_light, even_light_info
grdout, img_read, makediff, qLine_Read, qRemoteView_Pick, smei_frm_read
stardistance, test_tmo, testsmei, trypleiades, ulysses_passage
PROCEDURE:
> The FSTAT is function is used to determine the array dimensions from
file size and record length.
> The /block keyword should be used to read files created with the /block
keyword on the open statement.
> Several file types are recognized as special types and don't require
any further keywords:
*.pph contain a header with a valid size vector
*.nic files from the SMEI camera
MODIFICATION HISTORY:
JAN-1995, Paul Hick (UCSD/CASS)
MAR-2003, Paul Hick (UCSD/CASS)
Trailer is now output as a byte array, instead of a string scalar
(the conversion string_trailer = string(byte_trailer) could destroy
a binary trailer).
APR-2003, Paul Hick (UCSD/CASS)
Added check for .gz file (by calling gunzip_file).
Added check on 3rd element in header (# bytes per number) to
distinguish between short int (2), long int (4) and float (-4).
SEP-2003, Paul Hick (UCSD/CASS)
Renamed sbinarr to bin_read.
JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added /ramdisk keyword
[Previous]
[Next]
NAME:
bin_write
PURPOSE:
Write array to binary file
CALLING SEQUENCE:
PRO bin_write, File, Array, silent=silent, block=block, trailer=trailer
INPUTS:
File string file name
Array array to be written into binary file `file'.
By default the array is written into a fixed-length
file with record length determined by the first
dimension of the array. If the /block keyword is set,
then the file is written in VMS block mode.
OPTIONAL INPUT PARAMETERS:
/block write in VMS block mode
OUTPUTS:
(None)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
GetFileSpec, InitVar, IsType, SetFileSpec
CALLED BY:
badpix, cvgrd, cvgrd_skymap, even_light, makediff, qImage_cw_SmeiMask, qLine_Write
qSave2File_Save, qView_Save2File, testsmei, ulysses_passage
RESTRICTIONS:
PROCEDURE:
File name extension '.nic':
These are assumed to be files from the SMEI camera. The Array is written to
file as an unsigned short integer array (irrespective of input type) with the
proper 6 byte header. It is the users responsibility that the conversion to
unsigned integer does not have any adverse effects on the array. A 512 byte
trailer is added using the 'trailer' keyword (padded to 512 bytes with NULL
characters, or truncated, if necessary).
File name extension '.pph'
The file is written with a header containing the IDL 'size' vector.
The trailer is added at the end.
In all other cases the array is written using a single binary write statement.
The trailer is ignored.
MODIFICATION HISTORY:
APR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
boost
PURPOSE:
Combining arrays
CATEGORY:
Toolbox
CALLING SEQUENCE:
boost, a, b [, pushdim=pushdim, plus=plus, top=top, value=value]
INPUTS:
a array; type: any
array to be added to
b array; type: same as 'a'
array to be appended to 'a'
OPTIONAL INPUT PARAMETERS:
pushdim=pushdim
scalar; type: integer
dimension to be boosted using 'b' or 'plus'
plus=plus scalar; type: integer; default: 0
only used if b_in not set or doesn't exist
# elements to be added to dimension 'pushdim'
/lead adds to the front of the array instead of the end
/top by default, the input array is put at the bottom
of dimension; if /top is set then it is shifted to
the top of the dimension (see EXAMPLE)
Additional arguments, except 'type' and 'dim' can be passed to make_array
through the _extra keyword. Probably the only useful one is:
value=value scalar; type: same as 'a'
value used to pad the output array 'a' where needed
OUTPUTS:
a array; type: same as input
input array 'a' boosted using 'b' or 'plus'
(used by make_array as initialization value).
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsType, rank_array, where_common
CALLED BY:
CvPointOnLos, CvRotation, FUNCTION smeilatest lastorbit, FindPeaks
InsituTimeSeries, InterpolateHeliosphere, PRO bold, PRO bolstrip
PlotEarthSkymap [2], RemoteView, RemoteView_Display2D, RemoteView_Display3D
ThomsonLOSDensity, ThomsonLOSFar, ThomsonLOSRomb, ThomsonLOSStep
ThomsonSetupLOS, allsky [1], allsky [2], allsky [3], allsky_f, aurora, badpix
big_elongation, big_eph_boost, cvsmei, flt_read, flt_string, forecast_ftp
forecast_html, forecast_ice, getipssources, getnagoyasources, grayburst, hide_env
ipv6_packets, ipv6_traffic, maygeometry, mk_celias, mpc_comets, nagoya_glevel
plotbars_collect, qImage_cw_DrawEphem, qTool_State, qnew_2007_013, qvu_pick
skyd_cat, smei_buf_getframe, smei_buf_prep, smei_buf_read, smei_ccd2sky
smei_findcrazy, smei_findobj, smei_findpnt, smei_frm_darkfit, smei_frm_findpoint
smei_frm_where, smei_getfile, smei_hdr_get, smei_hdr_plot, smei_mkbase, smei_mkcal
smei_mkorb_auto, smei_mksky, smei_orbit_stats, smei_property, smei_sky2cam
smei_sky_cleanedge_sample, smei_sky_hdr_check, smei_sky_read
smei_star_cleanup, smei_star_fit, smei_star_fitone, smei_star_readpnt
smei_star_remove, smei_star_writepnt, smei_www_skymaps, strbreak, timeposn
txt_block_read, vox_write, vu_correlate, vu_extract, vu_get_page, vu_linecut
vu_movie, vu_planarcut, vu_radialcut, vu_read, vu_select, vu_solardisk, vu_spherecut
vu_synopticmap, vu_vox_write, wso_read, www_help_ptr, xhcs
PROCEDURE:
print, boost( indgen(3,2), plus=5)
0 1 2 0 0 0 0 0
3 4 5 0 0 0 0 0
print, boost( indgen(3,2), plus=5, /top)
0 0 0 0 0 0 1 2
0 0 0 0 0 3 4 5
IDL> a = [0,1,2]
IDL> b = [0,1,2,3]
IDL> boost, a,b
IDL> print,a
0 1 2 0 1 2 3
(i.e. concatenats a and b)
IDL> a = [0,1,2]
IDL> b = [0,1,2,3]
IDL> boost, a,b, /push
IDL> print,a
0 1 2
0 1 2
(i.e. puts 2nd array on new array, truncating or padding as necessary)
IDL> a = indgen(3,4,5)
IDL> b = indgen(3,5)
IDL> boost, a,b
IDL> help,a
A INT = Array[3, 5, 5]
I.e. array b is merged with a by adding it to the 2nd dimension.
The dimension to be added to is determined by excluding dimension
with the same number of elements. The pushdim keyword can be
used to explicitly select the dimension.
MODIFICATION HISTORY:
FEB-2002, Paul Hick (UCSD/CASS)
Extended old version of boost considerably; also merged
boostdim with boost (using keyword 'plus')
APR-2002, Paul Hick (UCSD/CASS)
replaced explicit keyword 'value' by _extra. 'value' was passed
to make_array explicitly, but this caused problems in IDL 5.3
(the variable MUST exist).
AUG-2002, Paul Hick (UCSD/CASS)
Added keyword /lead
MAR-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Made some modifications to make this work with structures.
The change involves replacing make_array calls with replicate calls.
[Previous]
[Next]
NAME:
brachistochrone
CALLING SEQUENCE:
pro brachistochrone, figure, xsize=xsize, ysize=ysize
INCLUDE:
@compile_opt.pro
CALLS: ***
InitVar, REVERSE, gridgen, plot3darc, plot3dline, plot3dtext, setup3d, twin
vectorproduct
[Previous]
[Next]
NAME:
brightness
CALLING SEQUENCE:
PRO brightness
CALLS: ***
IsType, LOADCT, grd_read
[Previous]
[Next]
NAME:
BZero
PURPOSE:
CALLING SEQUENCE:
FUNCTION BZero, T, degrees=degrees, lzero=L0
INPUTS:
T array; type: standard time structure
times where B0 angle is requested
OPTIONAL INPUT PARAMETERS:
/degrees if set, output angles BZero and L0 are in degrees
(default: radians)
OUTPUTS:
Result heliographic latitude of the sub-Earth point (center
of the disk)
OPTIONAL OUTPUT PARAMETERS:
L0 heliographic longitude of the sub-Earth point
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
SyncDims, big_eph, jpl_body
PROCEDURE:
> For time T the heliocentric ecliptic longitude of the sub-Earth
point is L=180+(geocentric ecliptic longitude Sun); the
heliocentric latitude is D=-(geocentric latitude).
The heliographic latitude of the sub-Earth point follows by
converting L,D at time T.
1971, doy 1.0 : B0 = -3.00629, L0 = 129.631
B0 = -3.01 , L0 = 129.62 (Nautical Almanac)
> using the /Precision keyword in NewcombSun produces worse results
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD/CASS)
FEB-1998, Paul Hick (UCSD/CASS)
Replaced /radians keyword by /degrees keyword
OCT-2006, Paul Hick (UCSD/.CASS; pphick@ucsd.edu)
Replaced NewcombSun by big_eph call