[Previous]
[Next]
NAME:
HammerAitoff
PURPOSE:
Transforms latitude and longitude to X and Y coordinates in the
Hammer-Aitoff map projection.
CALLING SEQUENCE:
Pos = HammerAitoff(Pos)
INPUTS:
Pos array[2,n]; type: float
n locations in the sky
Pos[0,n] longitudes
Pos[1,n] latitudes in [-90.,90.]
OPTIONAL INPUT PARAMETERS:
/degrees if set then all angles are in degrees (default: radians)
dabg array[3]; type: float; default: none
Euler angles for a rotation to be applied to
'Pos' prior to the Hammer-Aitoff projection.
(see FishEye)
zero_phase scalar; type: float; default: none
Additional offset applied to phase angle
(see FishEye)
OUTPUTS:
Pos array[2,n]; type: float
X,Y Cartesian coordinates (same structure as input array)
CALLS: ***
AngleRange, EulerRotate, IsType, SyncDims, ToRadians
CALLED BY:
ColorSkybox, PlotEarthSkymap, PlotPolarSkymap
RESTRICTIONS:
PROCEDURE:
The Hammer-Aitoff projection is the format used at NOAA SEL; for
details, see the book Introduction to Map Projections by Porter W.
McDonnell Jr.
Pos[0,*] > 0 has X > 0 Pos[1,*] > 0 has Y > 0
Pos[0,*] < 0 has X < 0 Pos[1,*] < 0 has Y < 0
The returned coordinates will be in the range -sqrt(2),+sqrt(2) in the vertical
(latitudinal) direction and -2*sqrt(2),+2*sqrt(2) in the horizontal (longitudinal
direction).
MODIFICATION HISTORY:
NOV-1992, Tom Davidson (UCSD)
MAR-1999, Paul Hick (UCSD/CASS); added /degrees keyword)
JAN-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added 'dabg' keyword
[Previous]
[Next]
NAME:
HAVE_COMMAND
PURPOSE:
Determine if a shell command exists or not.
CATEGORY:
Utils
CALLING SEQUENCE:
ihave = have_command(command[, command_path])
INPUTS:
command string The command for which to search.
OUTPUTS:
ihave bool 1 if the command is found, 0 if it isn't
OPTIONAL OUTPUTS:
command_path string A fully qualified path to the command.
RESTRICTIONS:
Probably Unix/Linux only. Note we use spawn rather than
file_which as the latter doesn't find shell built in commands.
MODIFICATION HISTORY:
Original: 17/2/04; SJT
[Previous]
[Next]
NAME:
hide_env
PURPOSE:
Hides explicit directory name
CATEGORY:
CALLING SEQUENCE:
hidden_name = hide_env(file_name [, env_var=env_var, env_value=env_value])
INPUTS:
file_name
OPTIONAL INPUT PARAMETERS:
env_var=env_var array; type: string; default: none
list of env var definitions in the form name=value
If not present then the 'set' command is spawned
to pick up all env vars.
exclude=exclude list of env vars to be excluded (if they are defined).
force=force if set then the common block with internally saved
env vars and values is rewritten.
OUTPUTS:
hidden_name
INCLUDE:
@compile_opt.pro ; On error, return to caller
common hide_env_save
nvar
env_vars
env_values
CALLS: ***
CheckDir, FILEPATH, InitVar, IsType, REVERSE, boost, destroyvar
CALLED BY:
CheckDir, Get_Page, do_file, flt_read, grd_read, htmd_cat, img_read, mk_flick, mpc_body
qImage, qView, qView_FileFilter, qView_PickFiles, qsmei_sky_Pick, sgp4_eph, sgp4_tlm
sgp_body, smei_buf, smei_buf_get, smei_buf_gzip, smei_buf_mget, smei_buf_prep
smei_buf_read, smei_frm_cp, smei_frm_get, smei_frm_read, smei_frm_write
smei_getfile, smei_hdr_get, smei_hdr_make, smei_hdr_plot, smei_hdr_update
smei_htm_testcase, smei_mksidereal, smei_sky_read, smei_star_fit
smei_star_remove, smei_star_writepnt, smei_zodiac_fit, smei_zodiac_remove
txt_read, vu_get_page, vu_header, vu_insitu, vu_select, vu_update_marker, vu_write
wso_read, www_help_crosslinks, www_help_files, www_help_get_header
www_help_section
PROCEDURE:
> The env variables and their values are saved internally in a common block.
The common block is rewritten each time env_var is specified.
> If env_var is not defined then the 'set' command is spawned to get
all env variables. This is done only once (unless /force is set).
> PWD and OLDPWD are added to the list of env vars to be excluded
MODIFICATION HISTORY:
AUG-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
HIST_FIND
PURPOSE:
Find whether an operation has been applied from the history
records.
CATEGORY:
UTILS
CALLING SEQUENCE:
version = hist_find(process, history)
INPUTS:
process string The process to look for (e.g. 'Large-scale
flatfields')
history string The history fields from the fits file
(extracted as found in the structure format).
KEYWORD PARAMETERS:
boolean If set, then only return a -1/0/1 code rather
than the version number.
line_break If set, then the value lies on the next line,
rather than on the end of the keyword line
OUTPUTS:
version int/float/bool The version number of presence flag
for the process requested. Note: -1
indicates the process was not found at all.
CALLED BY:
FF_SUMMARY
MODIFICATION HISTORY:
Original: 24/3/03; SJT
Added line_break key and allow "none" as a synonym for "not
applied": 20/10/03; SJT
Better type checking: 21/10/03; SJT
[Previous]
[Next]
NAME:
HOSOrbit
PURPOSE:
Calculates the position of a Helios spacecraft at a given time
CATEGORY:
smei/gen/idl/ephem
CALLING SEQUENCE:
R = HOSOrbit(T,hos=Hos [,/degrees])
INPUTS:
T array; type: integer or standard time structure
times (UT)
hos=Hos scalar; type: integer; default: 1
spacecraft (1=Helios A; 2=Helios B)
OPTIONAL INPUT PARAMETERS:
/degrees if set all angles are returned in degrees
OUTPUTS:
R array[3,*]; type: float
longitude, latitude, distance
(longitude and latitude for Equinox 1975.0 ???)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
KeplerOrbit, SuperArray, SyncArgs, TimeGet, ToDegrees
CALLED BY:
big_eph
PROCEDURE:
The spacecraft orbit is assumed to lie in the ecliptic
See O. Montenbruck, Practical Ephemeris Calculations, p. 42-45
Perihelion passages for Helios A:
year doy JD ecl long perih
1975 74.38411 2442486.8841 257.8521 !
1975 264.5102 2677.0102 .8493 !
1976 89.6610 2867.1610 .8570 !
1976 279.7965 3057.2965 .8478 !
1977 103.9367 3247.4367 .8448 !
1977 294.0973 3437.5973 .8496 !
1978 119.2591 3627.7591 .8517 !
1978 309.4239 3817.9239 .8518 !
1979 134.5879 4008.0879 .8530 !
1979
1980 149.9095 4388.4095 .8465 !
1980 340.2279 4578.7279 .8542 !
1981 164.978 4768.729 257.978
1981
1982
1982
1983
1983
Perihelion passages for Helios B:
1976 108.1035 2442885.6035 294.2079 !
1976 293.7552 3071.2552 294.2007 !
1977 113.5434 3257.0434 294.2332 !
1977 299.3565 3442.8565 294.2353 !
1978 120.2137 3628.7137 294.2470 !
1978 306.0831 3814.5831 294.2528 !
1979 126.9678 4000.4678 294.2577 !
1979 312.8478 4186.3478 294.2553 !
MODIFICATION HISTORY:
1990, Paul Hick (UCSD)
1997, Paul Hick (UCSD), replaced explicit orbit calculation by call to KeplerOrbit
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
added option to set the first argument Yr to a standard time structure
[Previous]
[Next]
NAME:
htmd_cat
PURPOSE:
Creates the initial orbit catalogues needed by the
SMEI indexing daemon.
CALLING SEQUENCE:
PRO htmd_cat, camera=camera, mode=mode, source=source, $
dig=dig, destination=destination, smeidb=smeidb
OPTIONAL INPUTS:
camera=camera array or scalar; type: integer; default: [1,2,3]
SMEI cameras to be processed
mode=mode array or scaler; type: integer; default: [0,1,2]
modes to be processed
source=source scalar or array; type: string; default: SMEISKY?
list of directories with skymaps.
The default SMEISKY? is translated to all
directories assigned to env vars $SMEISKYn
/dig If /dig is set then the skymaps should be located
in subdirectories c1,c2,c3.
IF source=SMEISKY? then always /dig is assumed
destination=destination
scalar; type: string; default: $TEMP
destination directory for the htmd catalogues
/smeidb forces destination=$SMEIDB/cat/list
(see PROCEDURE)
INCLUDE:
@compile_opt.pro
CALLS: ***
CheckDir, FILEPATH, FXPAR [1], FXPAR [2], FindAllFiles, GetFileSpec, HEADFITS [1]
HEADFITS [2], HEADFITS [3], InitVar, TimeSplit, TimeString, TimeUnit, boost
destroyvar, flt_string, hide_env, smei_frm_name, txt_read
PROCEDURE:
The htmd catalogues are derived from the files
smei_frm_orb_m0.txt, smei_frm_orb_m1.txt and smei_frm_orb_m2.txt
in directory $SMEIDB/cat/list. These files list the numbers
of frames for each camera in each of three modes.
These files are created and maintained by the IDL procedure
smei_orbits_stat (through a daily cronjob).
The htmd_catalogues will have names htmd_c<cam>m<mode>.txt
where <cam> is the camera id (1,2,3) and <mode> the mode id
<0,1,2>. The files are written to directory 'destination'.
If /smeidb is set the destination directory is the same
as for the smei_frm_orb_m*.txt files ($SMEIDB/cat/list).
These catalogues are accessed by the Python script
htmd_orbit (which in turn is used by the SMEI
indexing daemon htmd_wait.
MODIFICATION HISTORY:
DEC-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)