# File rvsao/Xcor/xcfile.x # February 9, 1998 # By Doug Mink, Harvard-Smithsonian Center for Astrophysics # Copyright(c) 1998 Smithsonian Astrophysical Observatory # You may do anything you like with this file except remove this copyright. # The Smithsonian Astrophysical Observatory makes no representations about # the suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # Print a portion of the filtered cross-correlation function include "rvsao.h" procedure xcfile (specfile,specim,mspec,tempfile,tspec,itemp,ncor,xvel, xcor,xcorfile) char specfile[SZ_PATHNAME] # Object spectrum file name pointer specim # Spectrum header structure int mspec # Number of object aperture (ignored if < 1) char tempfile[SZ_PATHNAME] # Template spectrum file name int tspec # Number of template aperture (ignored if < 1) int itemp # Index of template in template list int ncor # Number of points in cross-correlation real xvel[ARB] # Cross-correlation velocities from xcorfit real xcor[ARB] # Cross-correlation returned from xcorfit char xcorfile[SZ_PATHNAME] # Cross-correlation output file name (returned) real rindef real xcr # Center velocity in km/sec real dxcr # Half-width in velocity char title[SZ_LINE] # Title line in output file int xcfd # File descriptor for correlation output real vmin,vmax # Velocity limits for correlation output int i, open() double dj # Julian Day of observation pointer inst, sp int strncmp() char aperture[8] include "rvsao.com" include "results.com" begin rindef = INDEFR # If SAO echelle, prefix telescope code to file name call smark (sp) call salloc (inst, SZ_LINE, TY_CHAR) call imgspar (specim, "INSTRUME",Memc[inst],SZ_LINE) if (strncmp (Memc[inst],"echelle",7) == 0) { xcorfile[1] = 'T' xcorfile[2] = EOS } else if (strncmp (Memc[inst],"mmtech",6) == 0) { xcorfile[1] = 'M' xcorfile[2] = EOS } else if (strncmp (Memc[inst],"oroech",6) == 0) { xcorfile[1] = 'W' xcorfile[2] = EOS } else xcorfile[1] = EOS call sfree (sp) # Make up a file name as .