[Previous]
[Next]
NAME:
has_overlap.pro
PROJECT:
ETHZ Radio Astronomy, HESSI
CATEGORY:
gen
PURPOSE:
This routines accepts two arrays of intervals, and returns 1
if both overlap. Else, 0 is returned.;
CALLING SEQUENCE:
res=has_overlap(interval1,interval2 [,inter=inter])
INPUT:
interval1 : a 2-element array (float, int, double, ANYTIM string,...)
interval2 : a 2-element array (float, int, double, ANYTIM string,...)
If one or both of the intervals are in string format, then it is
assumed they are dates in an ANYTIM format, and the proper
conversion to ANYTIM format (i.e. doubles) is done for comparison.
Intervals need not be given in ascending order, i.e.:
has_overlap([a,b],[c,d])
has_overlap([b,a],[c,d])
has_overlap([a,b],[d,c])
has_overlap([b,a],[d,c])
... all give the same result.
OUTPUT:
0 (no overlap) or 1 (overlap).
KEYWORD OUTPUT:
inter : the interval which is common to both input intervals. If none, returns -1
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5]
CALLED BY:
rapp_get_spectrogram
RESTRICTIONS:
If input intervals are of string type, they are assumed to be ANYTIM-compatible times
No error checking is done.
EXAMPLES:
IDL> res=has_overlap([3,7],[2.5,3.5])
IDL> res=has_overlap(['09:00:00','10:00:00'],['09:30:00','10:30:00'])
IDL> res=has_overlap('2000/09/03 '+['09:00:00','10:00:00'],'2000/09/03 '+['09:30:00','10:30:00'])
HISTORY:
2001/05/18 created. Pascal Saint-Hilaire [shilaire@astro.phys.ethz.ch]
MODIFICATIONS:
PSH 2001/11/16 : allowed the possibility to enter intervals in any ANYTIM format.
PSH 2002/03/14 : added keyword inter
PSH 2004/08/09 : corrected a bug where we had overlap also when the end of an interval corresponded to the beginning of the other one...
Also removed conversion to ECS format...
[Previous]
[Next]
NAME: HDR_STR_DP
PURPOSE
Une structure reduite, qui sera ecrite dans le header du fichier fits
d'images, est extraite de la structure contenant les arguments d'appel
de rh_dpatchfits_nrh.
CATEGORY:
Traitement de fichiers NRH.
INPUTS:
str_dp : Structure regroupant tous les arguments d'appel necessaires au
calcul d'image.
OUTPUTS:
str_dp_hdr : Structure pour le header du fichier fits.
CALLS: ***
RH_ANTENNE
MODIFICATION HISTORY:
01 oct : ecrit par: A. Bouteille
02 mar 5 : - ajout de sel_ant pour eliminer les antennes a problemes.
02 mar 7 : - ajout de crit_arret, larg_2 devient un fltarr(2).
27 : - ajout de rot_p .
04 jan 12 : - ajout de g_AA1 etc aux listes des *STR_DP
jan 19 : - ajout de rh_common.inc pour utiliser entfi.nbant
sep 22 : - chgt de la recalibration manuelle : disparition de g_E2 etc,
introduction de phi_ew_ns, g_flag, g_amp, g_phi .
05 fev 9 : - ajout de phi_w_e a la liste d'entree.
06 mar 3 : - ajout de une dimension sipplementaire (2) a phi_ew_ns, phi_w_e,
g_amp, g_phi pour pouvoir corriger manuellement et simulta-
nement non polar et polar.
- ajout de i_affich_lobe et i_mul_pol.
06 avr 3 : - reduction de ch_cor a son noyau (ex : 14_nov_05_20:45)
[Previous]
[Next]
NAME:
HEAD_SEFRAM
PURPOSE:
Recuperation de certaines valeurs des KEYWORDS FITS des fichiers
SEFRAM.FTS
CATEGORY:
Depannage en attendant la correction du programme d'acquistion
CALLING SEQUENCE:
HEAD_SEFRAM
INPUTS:
Non
KEYWORD PARAMETERS:
DATE en retour contient la date
DEB en retour contient l'heure de debut
FIN en retour contient l'heure de fin
REPERT nom du repertoire contenant SEFRAM.fts si ce n'est pas le
repertoire courant
FILE nom du fichier si ce n'est pas SEFRAM.FTS
OUTPUTS:
Voir les KEYWORDS
CALLS: ***
HEADFITS [1], HEADFITS [2], HEADFITS [3]
COMMON BLOCKS:
Non
PROCEDURE:
Les valeurs sonrt recherchees dans les KEYWORDS
DATE_OBS
TIME_END
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par:JB le 07/02/01
[Previous]
[Next]
NAME:
HESSI_NRH
PURPOSE:
Cette procedure cree les WIDGETS de traitement des donnees
des fichiers contenant des series d'images 2D (HESSI NRH)
CATEGORY:
WIDGET
CALLING SEQUENCE:
HESSI_NRH
INPUTS:
CALLS: ***
CW_POS, GR_IMAGES, HELP_HESSI_NRH, HESSI_NRH_EVENT, HSI_NRH_FHELP, NRH2_PROJECTION
NRH_ANIM, NRH_ENVIRONNEMENT, NRH_FILTER, NRH_VISU_2D, SUN_IMAGE, XMANAGER
COMMON BLOCKS:
SELECTION DE FICHIERS
COMMON FICRH, STR_FIC= {STR_FIC}
INFORMATIONS SUR LE FICHIER
COMMON INFO2D, NRH_STR_INFIC = {NRH_STR_INFIC}
LIMITES DE TRAITEMENT
COMMON LIMIT, NRH_STR_LIM = {NRH_STR_LIM}
PARAMETRES DE VISUALISATION D IMAGES
COMMON VISU_2D, NRH_STR_VISU= {NRH_STR_VISU,
Polar :0, traitement du parametre V si = 1, sinon I
Coord:'H', transformation de coordonnee si fichier I et
str_visu.coord= 'H'
Print:0, Sortie PS si = 1
ind:0, Indice de l'image a traiter
dim: 256, Nombre de pixels de l'image visualisee
inc:1, Increment d'image pour le balayage du fichier
cont:5, Nombre de contours du trace CONTOUR
pcent:90, % du max de l'image pour le contour maximum
mcent:10} % du max de l'image pour le contour minimum
PARAMETRES POUR DONNEES EXTERIEURES
EXAMPLE:
HESSI_NRH
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 21/10/97 (@obspm.fr)
[Previous]
[Next]
NAME:
HIGHRES
PURPOSE:
Create an "image" array of high resolution data (currently taken
with 23 DOSEQ, but may be generalized later). Each row represents
4 s of data at 0.1 s per pixel, and the rows are stacked in time
order.
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
highres,filename,hrec,range[,/time][,outfile]
INPUTS:
filename the name of the file containing the data. If
omitted, the file DAILY.ARC in directory
!DEFAULTS.WORKDIR is assumed.
hrec the record number of the scan header. Data
will be processed up to the next EOS segment.
If this argument is given, then AFTER keyword
is ignored.
range a two-element array containing the start and end
range in records or if /TIME keyword is set, the
time range in seconds.
outfile optional output file name (default !DEFAULTS.WORKDIR+GENERIC.SAV)
OPTIONAL (KEYWORD) INPUT PARAMETERS:
time a switch. If 0, the RANGE is interpreted as a
record range. If 1, the RANGE is interpreted as
a time range in s.
ROUTINES CALLED:
openarc, getdata, lasthrec, tl_decode, decode, acfit
OUTPUTS:
COMMENTS:
CALLS: ***
FLAGOOL, GAINCOR, GET_CYCLE, NEWSCAN, OPENARC
SIDE EFFECTS:
RESTRICTIONS:
Initially written for 23 DOSEQ. May be generalized later.
MODIFICATION HISTORY:
Written 26-May-1999 by Dale Gary
05-Feb-2000 DG
Removed now unnecessary sin and cos lookup tables in GAINCOR call.
14-Apr-2000 DG
Get rid of C:\TEMP references (use !Defaults.workdir)
[Previous]
[Next]
NAME:
hist_plot
PURPOSE:
To plot a histogram
CATEGORY:
OVSA utils
CALLING SEQUENCE:
hist_plot,x,y,_extra=_extra
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES
OUTPUTS:
COMMENTS:
CALLS: ***
FIRST, LAST
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 12-Jan-2006 by Gelu Nita
[Previous]
[Next]
NAME:
Histogram Facility
PURPOSE:
Plots an histogram of the y-values
CALLING SEQUENCE:
HistoFacility [, y [, length ] ]
INPUT PARAMETERS:
y: the values to histogram, a 2D ( or 1D ) array
length: the number of relevant values per line in the
y-array. If not given, the histogram is
computed for all y-values.
RESTRICTION:
Works also without parameters, but then it is assumed
that the mdisp selection is active, and the plots values to
histogram will be loaded from the selection list.
CALLS: ***
GETPSSIZES, General_Menu [1], General_Menu [2], HISTOFACILITY, INIT_DEFAULTS
LOADSELECTION, MDISPWRITE, NODEFAULTS, N_SELECTED, PrintInterface, Read_Test, STDEV
SIDE EFFECTS:
Opens a separate window
A PostScript or a sixel file can be created.
MODIFICATION HISTORY
Created in March 92 on an idea from May 91
A.Csillaghy, Inst. of Astronomy, ETH Zurich
Sixel printing in Dec 92, A.Csillaghy
[Previous]
[Next]
NAME:
HMS Conversion
PURPOSE:
Converts a floating number in a string with form:
'hh:mm:ss.ss'
CALLING SEQUENCE:
result = HMSConvert( number )
INPUT PARAMETER:
number: a scalar float value
RESULT OF FUNCTION:
The created string
KEYWORDS:
/ROUNDED: Return the rounded form 'hh:mm:ss'
/NOROUND: Returns the full form. (Default).
CALLS: ***
HMSCONVERT, TSTR
MODIFICATION HISTORY:
Created by A.Csillaghy in
Inst. of Astronomy, ETH Zurich
Seconds changed to format ss.sss (before: ss.ss )
[Previous]
[Next]
NAME:
HMS
PURPOSE:
Cette fonction transforme une chaine de caractere exprimant un temps
en milliseconde (entier long) et en option en tableau (h,mn,sec,ms)
FORMAT D'ENTREE DE L'HEURE : HH:MM:SS:Millisecondes
ou HH:MM:SS.sss...
ou HH ou HH:MM ou HH:MM:SS
CATEGORY:
CONVERSION
CALLING SEQUENCE:
ih = intarr(4)
ims = hms (cheure) ou ims = hms (cheure, TAB = ih)
INPUTS:
heure en ASCII format : HH:MM:SS:Millisecondes
ou HH:MM:SS.sss...
KEYWORD PARAMETERS:
TAB: l'heure est demandee aussi sous forme de tableau (h,mn,sec,ms)
avant appel declarer un tableau ih=intarr(4)
OUTPUTS:
Ims: heure en millisec (LONG)
CALLS: ***
RSTRPOS, STR_SEP
CALLED BY:
ANIMPROF, CALCFLUX, CPT_FLUX_NRH2, CW_POS, CW_SCANSOURCE, FOLLOWPOS1D, INTGCOMP_NRH2
LEC1D, LECP1D, LECP2D, LIT_HEADER_NRH1, MENUBCKGRD, MENUCALCPOS2D, MENULISTPOS
MENUTRACEISOPH, MENUTRACEPOS, MENUTRACEPROF, MOD_NRHFILE, NRH1_ANIM, NRH1_EXTRACT
NRH2_TRISOPH, NRHR_CAL, NRH_HSI_FITS, PROFDECOMP1D, READ_CENTER_POINT [1]
READ_CENTER_POINT [2], RH_RDCMP, RH_RDCUBE, RH_RDINT, TIME_IND_NRH, TRACEPOS
TR_TIME_NRH
EXAMPLE:
ihms = HMS('10:00:00.99') ou ihms = HMS('10:00:00.777')
ou ih = intarr(4) & ihms = HMS('10:00:00.99',tab=ih)
MODIFICATION HISTORY:
Ecrit par: A. Bouteille
peut convertir les 2 types de format avec '.' ou ':' comme
separateur des secondes et decimales de secondes,
La chaine fournie peut etre incomplete : HMS('10') ou HMS('10:00')
L'option heure renvoyee en (h,m,s,ms) a ete ajoutee
[Previous]
[Next]
NAME:
HMS2SEC
PURPOSE:
Function that converts a time in HHMMSS format to time in seconds
CATEGORY:
OVRO APC UTILITY
CALLING SEQUENCE:
sec = hms2sec(hhmmss)
INPUTS:
hhmmss the time in HHMMSS format (a LONG integer or REAL)
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
sec the converted time, in seconds, as a REAL number
COMMENTS:
CALLED BY:
ANALYZE [1], ARLOCPLOT, GETGPSLIST, MAKE_APCAL, MAKE_APCAL2, NEWSCAN, OVSA__DEFINE
SOLCOORD, TPANALYZE, WRITE_DAILY, check_cals, ovsa_interact
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Sep-1997 by Dale Gary
[Previous]
[Next]
NAME:
HOCKEY
PURPOSE:
Performs the "hockey-stick" algorithm to determine the phase spectral
slope (degrees/GHz) as a function of time for a given baseline.
CATEGORY:
OVRO APC PHASE CALIBRATION
CALLING SEQUENCE:
hockey,x,y,pslope,sigma,xout,yout
INPUTS:
x array of cosine channel data, of size FLTARR(NF,NT) where NF
is the number of frequencies, NT the number of times
y array of sine channel data, of size FLTARR(NF,NT) where NF
is the number of frequencies, NT the number of times
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
flag
OUTPUTS:
pslope output array of phase slopes [degrees/GHz]
sigma the number of sigma of each slope fit, e.g. a 3-sigma or better
fit is probably good, so take values of sigma greater than 3.
xout array of cosine channel data after correction for the phase slope
yout array of sine channel data after correction for the phase slope
COMMENTS:
CALLS: ***
FLAGARR, MOMENT
SIDE EFFECTS:
RESTRICTIONS:
The standard frequency distribution is hard-coded. This should be
passed in as a parameter. Data are assumed to be distributed uniformly
in time. Routine should be generalized to pass a time array. The
background phase is determined from the first 10 samples (actually
sample 0 is skipped). Another, perhaps interactive, method should be
used to get the background.
MODIFICATION HISTORY:
Written 29-Jan-1999 by Dale E. Gary