Coral tools

Below is a list of matlab functions and scripts that are part of the Coral package.

Seismology tools

 Instrument response
   bb_magn       calculate Richter magnitude
   conv_response convert units of instrument response
   corr_inst     remove instrument response 
   decon_inst    deconvolve instrument response
   decon_inst_richmag deconvolve old instrument response and convolve a new one
   get_inst_resp get standard instrument responses
   response      compute impulse response and transfer function
   richmag       Richter magnitude
   synthwa       deconvolve REFTEK, convolve Wood Anderson instrument response

 Spherical geometry, and coordinate transoforms
   coortr        geocentric/geographic coordinate transformation
   delaz         compute earthquake/station distance and azimuth
   delts         read table of CMB, inner-core and turning-point PKP distances
   erot          make rotation matrix
   euler_trans   Euler Transform rotation matrix
   interaction_points  compute where rays turn and intersect CMB and inner-core
   lld2xyz       convert latitude, longitude, depth to cartesian coordinates
   rot           calculate latitude, longitude from reference location, azimuth, distance
   scrot         rotation of spherical coordinates
   sph2xyz       convert spherical polar coordinates to cartesian coordinates
   xyz2lld       convert cartesian coordinates to latitude, longitude, and depth
   xyz2sph       convert cartesian coordinates to spherical polar coordinates

 Time series
   deglitch      remove a glitch
   demean        remove mean from columns of matrix
   ft            Fourier Transform with time shift and sample interval scaling
   futterman     Futterman Filter Attenuation Operator
   hilbert_trans Hilbert Transformation
   ift           Inverse Fourier Transform, time shifts, sample interval scaling
   make_freq     make frequency vector for Fourier Transforms
   taper         make hanning taper
   taperd        apply hanning taper to a vector
   xcor          normalized cross correlograms

 Focal mechanisms
   harvard2xyz   convert moment tensor from Spherical to Cartesian coordinates
   focal_sphere  plot point data on a focal sphere
   radpat        plot moment tensor nodal lines
   radpat1       plot moment tensor nodal lines
   radpattern    calculate moment tensor radiation pattern
   radplt        plot focal mechanism nodal lines
   moment_mag    used for Richter magnitude? 

 Read external files
   getcmt        read Harvard Centroid Moment Tensor Catalog and find earthquake
   getcmt1       read Harvard Centroid Moment Tensor Catalog and find earthquake
   read_cmt      read Harvard CMT Catalog in Harvard 4-line ascii format
   read_hdf      read earthquake catalog in HDF format
   read_hdf_old  read earthquake catalog in HDF format

 Time
   time_reformat reformat time array
   timeadd       add absolute date/times
   timediff      subtract absolute date/times
   ymd           convert date format 

 General purpose
   cum_trapz     cumulative integration using the trapezoid rule
   cut_string    cut a character string into a matrix
   find_max      return indicies of all local maxima of a vector
   findmax       interpolate to find maximum value
   ginput_num    get number typed into graphics window
   interpol      linear interpolation
   left_justify  left justify strings in a character string matrix
   plegendre     associated legendre function
   pltsym        plot symbols
   remove_2blanks  remove pairs of blanks from string
   strcmp2       compare two character string arrays
   v2m           copy a vector n times into a matrix
   vec2mat       copy a vector n times into a matrix

 Other
   align_seis    align coral seismograms by cross correlation or trace extrema
   findsta       find station name from list
   gcTopo        interpolate topography along great circle
   iasp91        iasp91 radial earth model
   mod_eval      evaluate a radial earth model
   pick_event    pick event from catalog given sesimogram start/stop times
   plot_amp      plot seismic trace data in absolute values
   pptime        calculate very approximate pP-P times
   prem          PREM radial earth model
   prem2         PREM2 radial earth model
   rot_seis      rotate seismic data
   sort_ah       sort data in matlab/ah format


 Tau_P travel time tools
   elpcor        MEX interface into ellipticity correction tables
   get_tt        MEX interface into iasp91 tau_p tables (see get_ttt)
   get_tt_Ps     get travel times for Ps
   get_tt_other  find travel time and ray parameter at many offests
   get_tt_sscs   find travel time and ray parameter for sScS
   get_tt_up     get travel times for upgoing rays
   get_ttt       calculate travel time and ray parameter for iasp91 model


 Coral script and functions

   apply_window  apply time windows to coral data
   cc_rm_diag    reorganize indicies for cross correlations
   choose_event  choose event time/location 
   clean_phase   update coral header for new phase angle
   coral         script to analyze seismic record sections
   coral_deco    frequency-domain instrument response deconvolution
   coral_help    help for coral
   coral2afids   convert coral format to afids format
   demean_part   remove mean from coral data
   detrend_part  remove linear trend from coral data
   differentiate_part take derivative of coral data
   dtimes_invert invert cross-correlation lag times for self-consistent set
   envelope_part envelope function for coral data
   find_flipped  find Alaska Seismic Network stations with wrong polarity
   find_nonzero  find first and last non zeros in coral data
   fix_passcal   fill in headers if not complete
   fix_station_label  change station channel name to SEED convention
   flip_trace    flip the sign of a seismogram
   ft_part       apply fourier transform to coral data
   afids2coral   convert afids format to coral format
   hilbert_part  apply hilbert transform to coral data 
   integrate_part integrate coral data
   make_label    convert numbers to a string
   ml2ah         write matlab formated waveform data to an AH file
   my_cross_times  cross correlate coral data
   my_rsx        record section plotter
   my_xcor       cross correlate coral data
   phase_shift_part  apply phase shifts to coral data
   plot_data_dist  plot seismogram start times and earthquake times
   prepare_out   convert coral data to internal AH format
   resam         resample several seismograms to same sample rates
   rm_sta        choose seismograms to delete
   rm_zeropad    remove zero padding in a matrix
   set_title     define title for coral display
   taper_part    taper coral data
   updata_data   initialize coral headers


 Coral scripts

 scripts (not functions) that run externally from coral,
 but which opperate on data in coral
 Some of these routines have not been checked, and all are subject
 to change.

   coral_label.m           write Coral: date/time on a coral plot
   coral_recvr_fun.m       calculate receiver functions
   dassl_plot.m            plot data from DASSL experiment
   decon1.m                calculate receiver functions
   disp_corr_amp.m         display instrument corrected amplitudes
   disp_rel_amp.m          display relative amplitudes
   disp_sta_info.m         display station information
   fill_seismogram.m       display filled seismograms
   fix_ASN_polarity.m      fix known polarity problems in Alaska Seismic Network
   make_dassl_power.m      calculate power spectrum for DASSL experiment
   make_power_spec.m       calculate power spectrum
   mark_stations.m         use cursor to mark seismograms
   particle_motion.m       plot 3-D particle motions
   particle_motions.m       plot 3-D particle motions
   pick_times.m            pick travel times
   plot_radiation_bars.m   plot source mechanism radiation bars
   put_inst_resp.m         insert instrument response into coral headers?
   ray_syn.m               calculate ray synthetics (not checked!)
   read_sta_names.m        read station names
   save_sta_names.m        save station names