├── .gitignore ├── CITATION.cff ├── LICENSE ├── Makefile ├── NOTICE.txt ├── README.md ├── datagen ├── createdatagen ├── local │ ├── cal_e.alpha │ ├── cal_n.alpha │ ├── cal_z.alpha │ ├── cao_e.alpha │ ├── cao_n.alpha │ ├── cao_z.alpha │ ├── cda_e.alpha │ ├── cda_n.alpha │ ├── cda_z.alpha │ ├── cdv_e.alpha │ ├── cdv_n.alpha │ ├── cdv_z.alpha │ ├── cmn_e.alpha │ ├── cmn_n.alpha │ ├── cmn_z.alpha │ ├── cps_e.alpha │ ├── cps_n.alpha │ ├── cps_z.alpha │ ├── cva_e.alpha │ ├── cva_n.alpha │ ├── cva_z.alpha │ ├── cvl_e.alpha │ ├── cvl_n.alpha │ ├── cvl_z.alpha │ ├── cvy_e.alpha │ ├── cvy_n.alpha │ ├── cvy_z.alpha │ └── tosac ├── regional │ ├── elk_e.alpha │ ├── elk_n.alpha │ ├── elk_z.alpha │ ├── knb_e.alpha │ ├── knb_n.alpha │ ├── knb_z.alpha │ ├── lac_e.alpha │ ├── lac_n.alpha │ ├── lac_z.alpha │ ├── mnv_e.alpha │ ├── mnv_n.alpha │ ├── mnv_z.alpha │ └── tosac ├── seismogram.alpha └── teleseis │ ├── ntkl_e.alpha │ ├── ntkl_n.alpha │ ├── ntkl_z.alpha │ ├── ntkm_e.alpha │ ├── ntkm_n.alpha │ ├── ntkm_z.alpha │ ├── nykl_e.alpha │ ├── nykl_n.alpha │ ├── nykl_z.alpha │ ├── nykm_e.alpha │ ├── nykm_n.alpha │ ├── nykm_z.alpha │ ├── onkl_e.alpha │ ├── onkl_n.alpha │ ├── onkl_z.alpha │ ├── onkm_e.alpha │ ├── onkm_n.alpha │ ├── onkm_z.alpha │ ├── sdkl_e.alpha │ ├── sdkl_n.alpha │ ├── sdkl_z.alpha │ ├── sdkm_e.alpha │ ├── sdkm_n.alpha │ ├── sdkm_z.alpha │ └── tosac ├── inc ├── EVRESPnames.h ├── SacHeader.h ├── TransferFcn.h ├── adobe1.30_b.h ├── adobe2.00_a.h ├── arrival.h ├── bbs.h ├── bom.h ├── cnd.h ├── cnv.h ├── color.h ├── com.h ├── comlists.h ├── complex.h ├── contouring.h ├── cpf.h ├── csf.h ├── cssListOps.h ├── cssListStrucs.h ├── cssStrucs.h ├── cssb.h ├── datafilelist.h ├── dbBuildSQLstring.h ├── dbBuildSearchlink.h ├── dbConversions.h ├── dbErrorHandler.h ├── dbPtsInside.h ├── dblErrors.h ├── dblGetDataSubs.h ├── dblPublicDefs.h ├── dblUserData.h ├── dbselect.h ├── dfir.h ├── dfm.h ├── dload.h ├── eam.h ├── exm.h ├── extfunc.h ├── fir.h ├── fks.h ├── gam.h ├── gc.h ├── gd2.h ├── gd3.x11.h ├── gd5.gui.h ├── gdm.h ├── gem.h ├── gse.h ├── gtm.h ├── gui.h ├── hdr.h ├── headerFields ├── history.h ├── icm.h ├── lhf.h ├── libgdi.h ├── mach.h ├── mem.h ├── msg.h ├── nnm.h ├── nvars.h ├── proto.h ├── sacIO.h ├── sam.h ├── scm.h ├── sddhdr.h ├── segy.h ├── segy2sac.h ├── sgfcolor.h ├── site.h ├── smDataIO.h ├── smMemory.h ├── smm.h ├── snf.h ├── spe.h ├── specdata.h ├── spectrogram.h ├── ssi.h ├── sss.h ├── stationList.h ├── stationSets.h ├── stringfun.h ├── suds.h ├── sudsDataConversions.h ├── sudsIO.h ├── sudsListOps.h ├── sudsReading.h ├── sudsWriting.h ├── timefuncs.h ├── tok.h ├── tpf.h ├── tt.h ├── uom.h ├── usr.h ├── vars.h ├── wild.h ├── wtofd.h └── xyz.h ├── macros ├── README ├── data │ ├── alphatest │ ├── cdv_z │ ├── cdv_z_alpha │ ├── contourdata │ ├── contourdata_alpha │ ├── elk_z │ ├── elk_z_alpha │ ├── elk_z_am │ ├── elk_z_am_alpha │ ├── knb_z_am │ ├── knb_z_am_alpha │ ├── mnv_z_am │ ├── mnv_z_am_alpha │ └── tosac ├── demo │ ├── demo │ ├── filter │ ├── plot │ └── read └── test │ ├── all │ ├── datafile │ ├── executive │ └── graphics ├── misc ├── clspe ├── clsss ├── clstd ├── csspickprefs ├── ctables │ ├── 16.level │ ├── 16.level.II │ ├── blu.grn.red.yellow │ ├── blue.red │ ├── blue.white │ ├── bw.linear │ ├── default │ ├── gmt.cpt │ ├── grayscale │ ├── green.pink │ ├── grn.red.blu.wht │ ├── grn.white.linear │ ├── grn.wht.exponential │ ├── prism │ ├── rainbow │ ├── red.purple │ ├── red.temperature │ ├── std.gamma.II │ ├── steps │ └── wave.special ├── datagen │ ├── local │ │ ├── cal.e │ │ ├── cal.n │ │ ├── cal.z │ │ ├── cao.e │ │ ├── cao.n │ │ ├── cao.z │ │ ├── cda.e │ │ ├── cda.n │ │ ├── cda.z │ │ ├── cdv.e │ │ ├── cdv.n │ │ ├── cdv.z │ │ ├── cmn.e │ │ ├── cmn.n │ │ ├── cmn.z │ │ ├── cps.e │ │ ├── cps.n │ │ ├── cps.z │ │ ├── cva.e │ │ ├── cva.n │ │ ├── cva.z │ │ ├── cvl.e │ │ ├── cvl.n │ │ ├── cvl.z │ │ ├── cvy.e │ │ ├── cvy.n │ │ └── cvy.z │ ├── regional │ │ ├── elk.e │ │ ├── elk.n │ │ ├── elk.z │ │ ├── knb.e │ │ ├── knb.n │ │ ├── knb.z │ │ ├── lac.e │ │ ├── lac.n │ │ ├── lac.z │ │ ├── mnv.e │ │ ├── mnv.n │ │ └── mnv.z │ └── teleseis │ │ ├── ntkl.e │ │ ├── ntkl.n │ │ ├── ntkl.z │ │ ├── ntkm.e │ │ ├── ntkm.n │ │ ├── ntkm.z │ │ ├── nykl.e │ │ ├── nykl.n │ │ ├── nykl.z │ │ ├── nykm.e │ │ ├── nykm.n │ │ ├── nykm.z │ │ ├── onkl.e │ │ ├── onkl.n │ │ ├── onkl.z │ │ ├── onkm.e │ │ ├── onkm.n │ │ ├── onkm.z │ │ ├── sdkl.e │ │ ├── sdkl.n │ │ ├── sdkl.z │ │ ├── sdkm.e │ │ ├── sdkm.n │ │ └── sdkm.z ├── external │ ├── Notes │ ├── external_interface │ ├── extfunc.h │ ├── flipxy.c │ ├── flipxy.csh │ ├── loadcom │ ├── loadcom.linux │ ├── makefile │ ├── makefile.linux │ └── makefile.solaris ├── fir │ ├── dec2 │ ├── dec3 │ ├── dec4 │ ├── dec5 │ ├── dec6 │ ├── dec7 │ ├── hp2 │ ├── lp2 │ ├── ms2 │ ├── ms4 │ └── part2 ├── fonts │ ├── complx │ ├── duplex │ ├── simplx │ └── triplx ├── help │ ├── .TEMPLATE │ ├── .intro │ ├── 3c │ ├── about │ ├── absolutevalue │ ├── add │ ├── addf │ ├── apk │ ├── arraymap │ ├── axes │ ├── bandpass │ ├── bandrej │ ├── bbfk │ ├── beam │ ├── begindevices │ ├── beginframe │ ├── beginwindow │ ├── benioff │ ├── binoperr │ ├── border │ ├── capf │ ├── chnhdr │ ├── chpf │ ├── color │ ├── comcor │ ├── contents │ ├── contour │ ├── convert │ ├── convolve │ ├── copyhdr │ ├── correlate │ ├── crr │ ├── cut │ ├── cuterr │ ├── cutim │ ├── datagen │ ├── decimate │ ├── deletechannel │ ├── depmec │ ├── dif │ ├── div │ ├── divf │ ├── divomega │ ├── echo │ ├── enddevices │ ├── endframe │ ├── envelope │ ├── erase │ ├── evaluate │ ├── exp │ ├── exp10 │ ├── external_howto │ ├── external_interface │ ├── faq │ ├── fft │ ├── fileid │ ├── filenumber │ ├── filterdesign │ ├── fir │ ├── floor │ ├── funcgen │ ├── getbb │ ├── grayscale │ ├── grid │ ├── gtext │ ├── hanning │ ├── help │ ├── highpass │ ├── hilbert │ ├── history │ ├── hlpintro │ ├── ifft │ ├── image │ ├── inicm │ ├── installmacro │ ├── int │ ├── interpolate │ ├── intro │ ├── keepam │ ├── khronhite │ ├── line │ ├── linefit │ ├── linlin │ ├── linlog │ ├── listhdr │ ├── load │ ├── loadctable │ ├── log │ ├── log10 │ ├── loglab │ ├── loglin │ ├── loglog │ ├── lowpass │ ├── macro │ ├── map │ ├── markptp │ ├── marktimes │ ├── markvalue │ ├── mat │ ├── merge │ ├── message │ ├── mtw │ ├── mul │ ├── mulf │ ├── mulomega │ ├── news │ ├── nplotc │ ├── null │ ├── oapf │ ├── ohpf │ ├── pause │ ├── pickauthor │ ├── pickphase │ ├── pickprefs │ ├── picks │ ├── plabel │ ├── plot │ ├── plot1 │ ├── plot2 │ ├── plotalpha │ ├── plotc │ ├── plotctable │ ├── plotdy │ ├── plotpk │ ├── plotpktable │ ├── plotpm │ ├── plotsp │ ├── plotxy │ ├── print │ ├── printhelp │ ├── production │ ├── qdp │ ├── quantize │ ├── quit │ ├── quitsub │ ├── read │ ├── readbbf │ ├── readcss │ ├── readdb │ ├── readerr │ ├── readgse │ ├── readhdr │ ├── readsdd │ ├── readsp │ ├── readsuds │ ├── readtable │ ├── report │ ├── reverse │ ├── rglitches │ ├── rmean │ ├── rms │ ├── rotate │ ├── rq │ ├── rtrend │ ├── sac2man │ ├── scallop │ ├── setbb │ ├── setdevice │ ├── setmacro │ ├── sgf │ ├── smooth │ ├── sonogram │ ├── sort │ ├── spe │ ├── spe_dir │ │ ├── cor │ │ ├── mem │ │ ├── mlm │ │ ├── pds │ │ ├── plotcor │ │ ├── plotspe │ │ ├── quitsub │ │ ├── read │ │ ├── writecor │ │ └── writespe │ ├── spectrogram │ ├── sqr │ ├── sqrt │ ├── sss │ ├── sss-html.doc │ │ └── sss_manual.doc │ ├── sss_dir │ │ ├── addstack │ │ ├── changestack │ │ ├── deletestack │ │ ├── deltacheck │ │ ├── distanceaxis │ │ ├── distancewindow │ │ ├── globalstack │ │ ├── incrementstack │ │ ├── liststack │ │ ├── plotrecordsection │ │ ├── plotstack │ │ ├── sumstack │ │ ├── timeaxis │ │ ├── timewindow │ │ ├── traveltime │ │ ├── velocitymodel │ │ ├── velocityroset │ │ ├── writestack │ │ └── zerostack │ ├── stretch │ ├── sub │ ├── subf │ ├── symbol │ ├── synchronize │ ├── syntax │ ├── systemcommand │ ├── taper │ ├── ticks │ ├── title │ ├── trace │ ├── transcript │ ├── transfer │ ├── transfertable │ ├── tsize │ ├── unsetbb │ ├── unwrap │ ├── user_man │ │ ├── 01intro │ │ ├── 02newusers │ │ ├── 03analysis │ │ ├── 04graphics │ │ ├── 05sac_macros │ │ ├── 06inline │ │ ├── 07blackboard │ │ ├── 08input_output │ │ ├── 09file_format │ │ ├── 10appendix │ │ └── 11tutorial │ ├── vspace │ ├── wait │ ├── whiten │ ├── whpf │ ├── width │ ├── wiener │ ├── wild │ ├── window │ ├── write │ ├── writebbf │ ├── writecss │ ├── writegse │ ├── writehdr │ ├── writesdd │ ├── writesp │ ├── xdiv │ ├── xfudge │ ├── xfull │ ├── xgrid │ ├── xlabel │ ├── xlim │ ├── xlin │ ├── xlog │ ├── xvport │ ├── ydiv │ ├── yfudge │ ├── yfull │ ├── ygrid │ ├── ylabel │ ├── ylim │ ├── ylin │ ├── ylog │ ├── yvport │ ├── zcolors │ ├── zlabels │ ├── zlevels │ ├── zlines │ └── zticks ├── macros │ └── wrxyz ├── messages ├── news ├── polezero │ └── llsn ├── seismogram ├── tables.bigendin │ ├── iasp91.hed │ └── iasp91.tbl └── tables.littlendin │ ├── iasp91.hed │ └── iasp91.tbl ├── src ├── SeisMgr │ ├── cssListOps │ │ ├── Makefile │ │ ├── byteswap.c │ │ ├── cancomp.c │ │ ├── cancomp.h │ │ ├── cssArchitecture.c │ │ ├── cssArchitecture.h │ │ ├── cssListOps.c │ │ ├── cssListOps.h │ │ ├── cssListStrucs.h │ │ ├── cssStrucs.h │ │ ├── cssTableDump.c │ │ ├── dbFillWfdisc.c │ │ ├── dblErrors.c │ │ ├── dblErrors.h │ │ ├── dblGetDataSubs.c │ │ ├── dblGetDataSubs.h │ │ ├── dblPublicDefs.h │ │ ├── dblReadE1.c │ │ ├── dblUserData.c │ │ ├── dblUserData.h │ │ ├── enlarge.c │ │ ├── g2tofloat.c │ │ └── isValid.c │ ├── cssb │ │ ├── cssRead2_8FlatFiles.c │ │ ├── cssReadFlatFiles.c │ │ ├── cssWriteFlatFiles.c │ │ ├── cssb.h │ │ ├── cssbIO.c │ │ └── makefile │ ├── dbselect │ │ ├── Makefile │ │ ├── dbBuildSQLstring.c │ │ ├── dbBuildSQLstring.h │ │ ├── dbBuildSearchlink.c │ │ ├── dbBuildSearchlink.h │ │ ├── dbDefaults.c │ │ ├── dbDefaults.h │ │ ├── dbHelp.c │ │ ├── dbHelpQuery.pc │ │ ├── dbPtsInside.c │ │ ├── dbPtsInside.h │ │ ├── dbQuerySL.pc │ │ ├── dbselect.c │ │ └── dbselect.h │ ├── gc │ │ ├── gc.h │ │ ├── gcChecks.c │ │ ├── gcCollect.c │ │ └── makefile │ ├── gse │ │ ├── GSEWaveforms.c │ │ ├── cmprs6.c │ │ ├── dcomp.c │ │ ├── gse.h │ │ ├── gseRead20.c │ │ ├── gseWrite20.c │ │ └── makefile │ ├── makefile │ ├── sacIO │ │ ├── Makefile │ │ ├── SacHeader.h │ │ ├── dbConversions.c │ │ ├── dbConversions.h │ │ ├── sacIO.h │ │ ├── sacInput.c │ │ └── sacOutput.c │ ├── smDBdata.c │ ├── smDataIO.c │ ├── smDataIO.h │ ├── smMemory │ │ ├── makefile │ │ ├── smMemory.c │ │ └── smMemory.h │ ├── smNoDBstubs.c │ ├── smWorkSets.c │ ├── stringfun.c │ ├── stringfun.h │ ├── suds │ │ ├── makefile │ │ ├── suds.h │ │ ├── sudsDataConversions.c │ │ ├── sudsDataConversions.h │ │ ├── sudsIO.c │ │ ├── sudsIO.h │ │ ├── sudsListOps.c │ │ ├── sudsListOps.h │ │ ├── sudsReading.c │ │ ├── sudsReading.h │ │ ├── sudsToCSSlist.c │ │ ├── sudsWriting.c │ │ └── sudsWriting.h │ └── time │ │ ├── Makefile │ │ ├── timefuncs.c │ │ └── timefuncs.h ├── amf │ ├── allamb.c │ ├── iniam.c │ ├── makefile │ ├── reaamb.c │ └── relamb.c ├── bbs │ ├── createbbs.c │ ├── deletebbs.c │ ├── getbbv.c │ ├── inibbs.c │ ├── makefile │ ├── readbbf.c │ ├── setbbv.c │ ├── unsetbbv.c │ └── writebbf.c ├── bom │ ├── getbfl.c │ ├── getcfl.c │ ├── inibom.c │ ├── makefile │ ├── relbfl.c │ ├── xaddf.c │ ├── xboec.c │ ├── xbomc.c │ ├── xdivf.c │ ├── xmerge.c │ ├── xmulf.c │ └── xsubf.c ├── bot │ ├── capf.c │ ├── chpf.c │ ├── clipdp.c │ ├── crname.c │ ├── indexa.c │ ├── indexb.c │ ├── indexc.c │ ├── lequal.c │ ├── locdp.c │ ├── makefile │ ├── modcase.c │ ├── nequal.c │ ├── terminate.c │ ├── upcase.c │ └── wrlist.c ├── clf │ ├── fndelcl.c │ ├── ldelcl.c │ ├── lnumcl.c │ ├── lnxtcl.c │ ├── makefile │ ├── nfndcl.c │ └── putcl.c ├── cnd │ ├── getclun.c │ ├── getdolen.c │ ├── ldolist.c │ ├── makefile │ ├── skipdo.c │ ├── skipif.c │ ├── xbreak.c │ ├── xcndc.c │ ├── xdo.c │ ├── xelse.c │ ├── xelseif.c │ ├── xenddo.c │ ├── xendif.c │ ├── xif.c │ └── xwhile.c ├── co │ ├── backspace.c │ ├── complex.c │ ├── ext_init.c │ ├── fstrncpy.c │ ├── getfline.c │ ├── getline.c │ ├── izshft.c │ ├── makefile │ ├── math.c │ ├── stdu.h │ ├── strscpy.c │ ├── subscpy.c │ ├── tokenize.c │ ├── zauxfile.c │ ├── zbasename.c │ ├── zclose.c │ ├── zclosec.c │ ├── zcloses.c │ ├── zdest.c │ ├── zdestf.c │ ├── zexecute.c │ ├── zfiles.c │ ├── zgetc.c │ ├── zgetgd.c │ ├── zgimsg.c │ ├── zgpmsg.c │ ├── zgtmsg.c │ ├── zgwindowsize.c │ ├── zinfo.c │ ├── zinquire.c │ ├── zload.c │ ├── zmemad.c │ ├── znfile.c │ ├── znfiles.c │ ├── zopen.c │ ├── zopenc.c │ ├── zopens.c │ ├── zputc.c │ ├── zquit.c │ ├── zrabs.c │ ├── zrun.c │ ├── zrunname.c │ ├── zruntext.c │ ├── zsleep.c │ ├── zsysop.c │ ├── zwabs.c │ ├── zwabs2.c │ └── zwprmt.c ├── coda │ ├── C_apply.c │ ├── C_bilin2.c │ ├── C_buroots.c │ ├── C_complex.c │ ├── C_cutoffs.c │ ├── C_design.c │ ├── C_fft.c │ ├── C_firtrn.c │ ├── C_fstrncpy.c │ ├── C_lp.c │ ├── C_lptbp.c │ ├── C_lptbr.c │ ├── C_lpthp.c │ ├── C_overlp.c │ ├── C_warp.c │ ├── C_wigint.c │ ├── C_xapiir.c │ ├── C_zshft.c │ ├── binary_op.c │ ├── calc_codaGF.c │ ├── calc_coda_amplitudes.c │ ├── calc_energy.c │ ├── calc_envelopes.c │ ├── calc_moment_magnitude.c │ ├── coda.h │ ├── coda_complex.h │ ├── fit_coda_amp.c │ ├── fit_coda_params.c │ ├── get_input.c │ ├── main.c │ ├── makefile │ ├── pickwindows.c │ ├── plotspec.c │ ├── sac_code.c │ ├── sac_header.h │ ├── send_output.c │ ├── unary_op.c │ └── xcoda.c ├── contouring │ ├── alloclabels.c │ ├── allocpoints.c │ ├── allocsegments.c │ ├── calccontlab1.c │ ├── calccontlab4.c │ ├── calccontlabs.c │ ├── calccontrlink.c │ ├── calccontsegs.c │ ├── calccontticks.c │ ├── calclastpoint.c │ ├── calcsegangle.c │ ├── fastcontdata.c │ ├── getcontlabel.c │ ├── getcontpoint.c │ ├── getcontrlink.c │ ├── getcontseg.c │ ├── getcontseglab.c │ ├── initcontattr.c │ ├── linkcontsegs.c │ ├── listcontsegs.c │ ├── makefile │ ├── markcontlabel.c │ ├── mergecontsegs.c │ ├── newcontlabel.c │ ├── newcontpoint.c │ ├── newcontseg.c │ ├── nextcontseg.c │ ├── plotcontdata.c │ ├── plotcontsegs.c │ ├── pointsequal.c │ ├── putcontlabel.c │ ├── putcontpoint.c │ ├── putcontrlink.c │ ├── putcontseg.c │ ├── putcontseglab.c │ ├── releaselabels.c │ ├── releasepoints.c │ ├── releasesegmen.c │ └── setcontdatali.c ├── cpf │ ├── cerr.c │ ├── cfmt.c │ ├── cresp.c │ ├── csinit.c │ ├── cspop.c │ ├── cspush.c │ ├── cszero.c │ ├── ctype.c │ ├── gc.c │ ├── getarg.c │ ├── ictok.c │ ├── inicom.c │ ├── inicsf.c │ ├── initcomlists.c │ ├── initpf.c │ ├── iniusr.c │ ├── lcchar.c │ ├── lccl.c │ ├── lcdfl.c │ ├── lcia.c │ ├── lcidi.c │ ├── lcint.c │ ├── lcirc.c │ ├── lcircp.c │ ├── lckey.c │ ├── lckeyExact.c │ ├── lclist.c │ ├── lclog.c │ ├── lclog2.c │ ├── lcmore.c │ ├── lcquot.c │ ├── lcra.c │ ├── lcreal.c │ ├── lcrest.c │ ├── lcrrcp.c │ ├── lcrtw.c │ ├── lctok.c │ ├── lkchar.c │ ├── lkcharExact.c │ ├── lkentries.c │ ├── lkia.c │ ├── lkint.c │ ├── lkirc.c │ ├── lklist.c │ ├── lklog.c │ ├── lklog2.c │ ├── lklogc.c │ ├── lklogi.c │ ├── lklogr.c │ ├── lklogra.c │ ├── lkquot.c │ ├── lkra.c │ ├── lkreal.c │ ├── lkrest.c │ ├── lkrrc.c │ ├── lkrrcp.c │ ├── lkrtw.c │ ├── lkt.c │ ├── makefile │ ├── non_num_com.c │ ├── pcmsg.c │ ├── savearg.c │ ├── sctok.c │ ├── setcomlist.c │ ├── tokens.c │ ├── xclog.c │ ├── xclogr.c │ ├── xcrrcp.c │ └── xcrtw.c ├── datafilelist │ ├── makefile │ ├── nextinputfile.c │ ├── selectinputfi.c │ └── setinputmode.c ├── dbh │ ├── ACKNOWLEDGEMENT │ ├── New │ │ └── levin.c │ ├── afr.c │ ├── alias.c │ ├── append.c │ ├── apply.c │ ├── autcor.c │ ├── beroots.c │ ├── bilin2.c │ ├── buroots.c │ ├── c1roots.c │ ├── c2roots.c │ ├── chebparm.c │ ├── cpolar.c │ ├── crit.c │ ├── crscor.c │ ├── cutoffs.c │ ├── decim.c │ ├── design.c │ ├── dfr.c │ ├── dircor.c │ ├── edecim.c │ ├── fft.c │ ├── firtrn.c │ ├── gauss.c │ ├── getResponse.c │ ├── iirfilter.c │ ├── inspect.c │ ├── levin.c │ ├── levinD.c │ ├── linpack.c │ ├── lp.c │ ├── lptbp.c │ ├── lptbr.c │ ├── lpthp.c │ ├── makefile │ ├── mem.c │ ├── mlm.c │ ├── overlp.c │ ├── pds.c │ ├── pef.c │ ├── phaseshift.c │ ├── pltplr.c │ ├── random.c │ ├── rms.c │ ├── shift.c │ ├── spectr.c │ ├── step.c │ ├── unit.c │ ├── warp.c │ ├── wiener.c │ ├── window.c │ ├── winmov.c │ ├── xapiir.c │ ├── zero.c │ └── zshft.c ├── describedirs ├── dff │ ├── formhv.c │ ├── formmarker.c │ ├── getfhv.c │ ├── getfil.c │ ├── gethv.c │ ├── getihv.c │ ├── getkhv.c │ ├── getlhv.c │ ├── getnfiles.c │ ├── getnhv.c │ ├── hdrfld.c │ ├── inihdr.c │ ├── inilhf.c │ ├── lgahdr.c │ ├── makefile │ ├── map_chdr_in.c │ ├── map_chdr_out.c │ ├── map_hdr_in.c │ ├── map_hdr_out.c │ ├── markhdr.c │ ├── newhdr.c │ ├── newstn.c │ ├── putfil.c │ ├── rddta.c │ ├── rdhdr.c │ ├── rdsac.c │ ├── rdsdta.c │ ├── rdsegy.c │ ├── rdshdr.c │ ├── rdxdrdta.c │ ├── rsac1.c │ ├── rsac2.c │ ├── setfhv.c │ ├── setihv.c │ ├── setkhv.c │ ├── setlhv.c │ ├── setnfiles.c │ ├── setnhv.c │ ├── setrng.c │ ├── updhdr.c │ ├── wrsac.c │ ├── wrsdd.c │ ├── wrsegy.c │ ├── wrxdr.c │ ├── wsac0.c │ ├── wsac1.c │ ├── wsac2.c │ └── xdrhdr.c ├── dfm │ ├── cleardfl.c │ ├── cnvfmt.c │ ├── cnvfre.c │ ├── crsac.c │ ├── decont.c │ ├── defcut.c │ ├── defmem.c │ ├── detnum.c │ ├── gennames.c │ ├── getatw.c │ ├── getprefs.c │ ├── getwfdiscs.c │ ├── inidfm.c │ ├── inisnf.c │ ├── iztypeMessage.c │ ├── lfilesok.c │ ├── makefile │ ├── makeuniq.c │ ├── rdci.c │ ├── readcfl.c │ ├── readfl.c │ ├── readgse.c │ ├── readsuds.c │ ├── sort.c │ ├── synch.c │ ├── updatedfl.c │ ├── vblist.c │ ├── vfeven.c │ ├── vflist.c │ ├── vfmax.c │ ├── vfmaxn.c │ ├── vfrng.c │ ├── vfspec.c │ ├── vftime.c │ ├── wrci.c │ ├── xHeaderWindow.c │ ├── xch.c │ ├── xconv.c │ ├── xcopyhdr.c │ ├── xcuter.c │ ├── xdatagen.c │ ├── xdeletechannel.c │ ├── xdfmc.c │ ├── xlh.c │ ├── xpickauthor.c │ ├── xpickphase.c │ ├── xpickprefs.c │ ├── xr.c │ ├── xra.c │ ├── xrcss.c │ ├── xrerr.c │ ├── xrgse.c │ ├── xrh.c │ ├── xrsdd.c │ ├── xrsuds.c │ ├── xrtab.c │ ├── xsort.c │ ├── xsynch.c │ ├── xw.c │ ├── xwcss.c │ ├── xwgse.c │ ├── xwh.c │ ├── xwild.c │ └── xwtab.c ├── eam │ ├── inieam.c │ ├── makefile │ ├── whpf1.c │ ├── xapk.c │ ├── xeamc.c │ ├── xoapf.c │ ├── xohpf.c │ └── xwhpf.c ├── evalresp │ ├── alloc_fctns.c │ ├── calc_fctns.c │ ├── config.h │ ├── error_fctns.c │ ├── evr_spline.c │ ├── evr_spline.h │ ├── evresp.c │ ├── evresp.h │ ├── file_ops.c │ ├── makefile │ ├── parse_fctns.c │ ├── print_fctns.c │ ├── regerror.c │ ├── regexp.c │ ├── regexp.h │ ├── regmagic.h │ ├── regsub.c │ ├── resp_fctns.c │ └── string_fctns.c ├── exm │ ├── gettextwait.c │ ├── iniexm.c │ ├── makefile │ ├── proerr.c │ ├── qam.c │ ├── qapf.c │ ├── qcolor.c │ ├── qcut.c │ ├── qdevices.c │ ├── qfid.c │ ├── qgtext.c │ ├── qhpf.c │ ├── qline.c │ ├── qmtw.c │ ├── qpicks.c │ ├── qsymbol.c │ ├── qtitle.c │ ├── qwidth.c │ ├── qxlabl.c │ ├── qxlim.c │ ├── qylabl.c │ ├── qylim.c │ ├── repav.c │ ├── reperr.c │ ├── repiv.c │ ├── repivl.c │ ├── repkv.c │ ├── replv.c │ ├── reprtw.c │ ├── reprv.c │ ├── setprompt.c │ ├── settextwait.c │ ├── tracereport.c │ ├── tracevariable.c │ ├── xabout.c │ ├── xcd.c │ ├── xecho.c │ ├── xeval.c │ ├── xexmc.c │ ├── xfg.c │ ├── xgetbb.c │ ├── xhelp.c │ ├── xinstallmacr.c │ ├── xload.c │ ├── xmacro.c │ ├── xmsg.c │ ├── xnews.c │ ├── xpause.c │ ├── xreadbbf.c │ ├── xreport.c │ ├── xsetbb.c │ ├── xsetmacro.c │ ├── xsyntx.c │ ├── xsystemcomma.c │ ├── xtrace.c │ ├── xtranscript.c │ ├── xunsetbb.c │ └── xwritebbf.c ├── extfuncs │ ├── fextlib.c │ ├── fgetahdr.c │ ├── fgetehdr.c │ ├── fgetfhdr.c │ ├── fgetlhdr.c │ ├── fgetnhdr.c │ ├── fsetahdr.c │ ├── fsetehdr.c │ ├── fsetfhdr.c │ ├── fsetlhdr.c │ ├── fsetnhdr.c │ ├── getahdr.c │ ├── getehdr.c │ ├── getfhdr.c │ ├── getfield.c │ ├── getlhdr.c │ ├── getnhdr.c │ ├── makefile │ ├── makehdr.c │ ├── setahdr.c │ ├── setehdr.c │ ├── setfhdr.c │ ├── setlhdr.c │ └── setnhdr.c ├── fks │ ├── calcBeamOffsets.c │ ├── calcoffsets.c │ ├── inifks.c │ ├── makefile │ ├── xbbfk.c │ ├── xbeam.c │ ├── xfksc.c │ ├── xgmtmap.c │ └── xmap.c ├── gam │ ├── dispid.c │ ├── disppk.c │ ├── disppkLandscape.c │ ├── getxlm.c │ ├── getylm.c │ ├── inigam.c │ ├── makefile │ ├── markvert.c │ ├── markwf.c │ ├── pcmcur.c │ ├── pcmrpl.c │ ├── pcrrpl.c │ ├── pcxcur.c │ ├── pcxop1.c │ ├── pcxop2.c │ ├── pcxope.c │ ├── pcxops.c │ ├── pcxrpl.c │ ├── pkchar.c │ ├── pkdet.c │ ├── pkeval.c │ ├── pkfilt.c │ ├── pkfunc.c │ ├── wavfrm.c │ ├── xfid.c │ ├── xfilenumber.c │ ├── xfitxy.c │ ├── xgamc.c │ ├── xp.c │ ├── xp1.c │ ├── xp2.c │ ├── xpc.c │ ├── xpicks.c │ ├── xplotalpha.c │ ├── xplotdy.c │ ├── xplotpm.c │ ├── xplotxy.c │ ├── xppk.c │ ├── xprint.c │ ├── xsetdevice.c │ └── xylim.c ├── gcm │ ├── makefile │ ├── xbegindevice.c │ ├── xenddevices.c │ ├── xgcmc.c │ ├── xgcmc.error │ ├── xsgf.c │ └── xvspac.c ├── gd2 │ ├── beginSGFtemp.c │ ├── begindevice2.c │ ├── beginframe2.c │ ├── beginwindow2.c │ ├── calc_loc2.c │ ├── cbar_window2.c │ ├── changectable2.c │ ├── createwindo2.c │ ├── cursor2.c │ ├── cursortext2.c │ ├── draw2.c │ ├── endSGFtemp.c │ ├── enddevice2.c │ ├── endframe2.c │ ├── erase2.c │ ├── fill_clrbar2.c │ ├── fill_image2.c │ ├── flushbuffer2.c │ ├── get_geometry2.c │ ├── getalphainf2.c │ ├── getdevicein2.c │ ├── getdevicera2.c │ ├── getratio2.c │ ├── getwindowst2.c │ ├── hardwaretex2.c │ ├── initdevice2.c │ ├── makefile │ ├── move2.c │ ├── put_image2.c │ ├── setcolor2.c │ ├── setctable2.c │ ├── setlinestyl2.c │ ├── setsgfdir.c │ ├── setsgfnumber.c │ ├── setsgfprefix.c │ ├── setsgfsize.c │ ├── settextangl2.c │ ├── settextsize2.c │ └── setwidth2.c ├── gd3.x11 │ ├── begindevice3.c │ ├── beginframe3.c │ ├── beginwindow3.c │ ├── calc_loc3.c │ ├── cbar_window3.c │ ├── changectable3.c │ ├── createwindo3.c │ ├── cursor3.c │ ├── cursortext3.c │ ├── dispatcheve3.c │ ├── draw3.c │ ├── drawpoly3.c │ ├── enddevice3.c │ ├── endframe3.c │ ├── erase3.c │ ├── fill_clrbar3.c │ ├── fill_image3.c │ ├── flushbuffer3.c │ ├── get_geometry3.c │ ├── getalphainf3.c │ ├── getdevicein3.c │ ├── getdevicera3.c │ ├── getratio3.c │ ├── getwindowst3.c │ ├── initdevice3.c │ ├── make_label3.c │ ├── makefile │ ├── move3.c │ ├── put_image3.c │ ├── sac.bitmap │ ├── setcolor3.c │ ├── setctable3.c │ ├── setlinestyl3.c │ ├── setpsctable3.c │ ├── settextsize3.c │ └── setwidth3.c ├── gd4.null │ ├── batchoff4.c │ ├── batchon4.c │ ├── batchshow4.c │ ├── begindevice4.c │ ├── beginframe4.c │ ├── beginwindow4.c │ ├── createwindo4.c │ ├── cursor4.c │ ├── cursortext4.c │ ├── draw4.c │ ├── drawpoly4.c │ ├── enddevice4.c │ ├── endframe4.c │ ├── erase4.c │ ├── flushbuffer4.c │ ├── getalphainf4.c │ ├── getdevicein4.c │ ├── getdevicera4.c │ ├── getratio4.c │ ├── getwindowst4.c │ ├── graphics.icon │ ├── initdevice4.c │ ├── makefile │ ├── move4.c │ ├── setcolor4.c │ ├── setctable4.c │ ├── setlinestyl4.c │ ├── settextsize4.c │ ├── setwidth4.c │ └── signal.c ├── gd5.gui │ ├── begindevice5.c │ ├── beginframe5.c │ ├── beginwindow5.c │ ├── calc_loc5.c │ ├── cbar_window5.c │ ├── changectable5.c │ ├── createwindo5.c │ ├── cursor5.c │ ├── cursortext5.c │ ├── dispatcheve5.c │ ├── draw5.c │ ├── drawpoly5.c │ ├── enddevice5.c │ ├── endframe5.c │ ├── erase5.c │ ├── fill_clrbar5.c │ ├── fill_image5.c │ ├── flushbuffer5.c │ ├── get_geometry5.c │ ├── getalphainf5.c │ ├── getdevicein5.c │ ├── getdevicera5.c │ ├── getratio5.c │ ├── getwindowst5.c │ ├── initdevice5.c │ ├── makefile │ ├── move5.c │ ├── put_image5.c │ ├── sac.bitmap │ ├── setcolor5.c │ ├── setctable5.c │ ├── setlinestyl5.c │ ├── setpsctable5.c │ ├── settextsize5.c │ └── setwidth5.c ├── gdm │ ├── adj_geometry.c │ ├── begindevice.c │ ├── begindevices.c │ ├── beginframe.c │ ├── beginwindow.c │ ├── calstatus.c │ ├── calvspace.c │ ├── changectable.c │ ├── convcolornam.c │ ├── convcolornum.c │ ├── createwindow.c │ ├── cursor0.c │ ├── cursoroff.c │ ├── cursoron.c │ ├── cursortext.c │ ├── draw.c │ ├── enddevice.c │ ├── endframe.c │ ├── endgraphics.c │ ├── erase.c │ ├── fill_colorbar.c │ ├── fill_image.c │ ├── flushbuffer.c │ ├── get_geometry.c │ ├── getalphainfo.c │ ├── getdevicein1.c │ ├── getdevicenam.c │ ├── getdevicerat.c │ ├── getlinestyle.c │ ├── getmaxdevice.c │ ├── getratio.c │ ├── getstatus.c │ ├── getstringsiz.c │ ├── gettextjust.c │ ├── gettextsize.c │ ├── getvspace.c │ ├── getvspacetyp.c │ ├── getwindowsta.c │ ├── inigdm.c │ ├── initctable.c │ ├── loadctable.c │ ├── makefile │ ├── move.c │ ├── put_image.c │ ├── readctable.c │ ├── setcolor.c │ ├── setcolorname.c │ ├── setlinestyle.c │ ├── setlinewidth.c │ ├── setpsctable.c │ ├── settextangle.c │ ├── settextfont.c │ ├── settextjust.c │ ├── settextsize.c │ ├── settexttype.c │ ├── setvspacecli.c │ ├── setvspacetyp.c │ ├── softwaretext.c │ ├── stubs1.c │ └── text.c ├── gem │ ├── inisym.c │ ├── makefile │ ├── xaxes.c │ ├── xbeginframe.c │ ├── xbeginwindow.c │ ├── xcolor.c │ ├── xendframe.c │ ├── xgemc.c │ ├── xgrid.c │ ├── xgt.c │ ├── xlct.c │ ├── xline.c │ ├── xplab.c │ ├── xqdp.c │ ├── xsym.c │ ├── xticks.c │ ├── xtitle.c │ ├── xtsize.c │ ├── xwait.c │ ├── xwidth.c │ ├── xwindow.c │ ├── xxdiv.c │ ├── xxgrid.c │ ├── xxlab.c │ ├── xydiv.c │ ├── xygrid.c │ └── xylab.c ├── gpm │ ├── begingraphic.c │ └── makefile ├── gtm │ ├── calwvtransfo.c │ ├── getvport.c │ ├── getworld.c │ ├── inigtm.c │ ├── line.c │ ├── makefile │ ├── polyline.c │ ├── rectangle.c │ ├── setsymbolgap.c │ ├── setsymbolnum.c │ ├── setsymbolsiz.c │ ├── setvport.c │ ├── setvportrat.c │ ├── setworld.c │ ├── symbol.c │ ├── vporttoworld.c │ ├── worldcursor.c │ ├── worlddraw.c │ ├── worldline.c │ ├── worldmove.c │ ├── worldpolylin.c │ ├── worldsector.c │ ├── worldtovport.c │ ├── xaxis.c │ ├── xlinaxis.c │ ├── xlogaxis.c │ ├── yaxis.c │ ├── ylinaxis.c │ └── ylogaxis.c ├── history │ ├── History.doc │ ├── history.c │ └── makefile ├── icm │ ├── EVRESPnames.c │ ├── EvrespGateway.c │ ├── NDC │ │ ├── cdefs.h │ │ ├── cmplx.h │ │ ├── complexNDC.c │ │ ├── complexNDC.h │ │ ├── css_general.h │ │ ├── csserrno.h │ │ ├── csserror.c │ │ ├── cssresponse.h │ │ ├── fap.c │ │ ├── fir.c │ │ ├── lagrange.c │ │ ├── libresponse.h │ │ ├── libresponse_version.c │ │ ├── makefile │ │ ├── ndcTransfer.c │ │ ├── odfftr.c │ │ ├── paz.c │ │ ├── polar.c │ │ ├── scaled_response.c │ │ └── unscaled_response.c │ ├── acc.c │ ├── balance.c │ ├── bbdisp.c │ ├── bbvel.c │ ├── benbog.c │ ├── ckinst.c │ ├── clh.c │ ├── clz.c │ ├── cmh.c │ ├── cmz.c │ ├── csh.c │ ├── csz.c │ ├── dbFuncs.h │ ├── dcpft.c │ ├── dewit.c │ ├── dseis.c │ ├── dss.c │ ├── dwwssn.c │ ├── ekalp6.c │ ├── ekasp2.c │ ├── elmag.c │ ├── eyeomg.c │ ├── gbalp.c │ ├── gbasp.c │ ├── general.c │ ├── getins.c │ ├── getran.c │ ├── getroots.c │ ├── gsref.c │ ├── hfslpwb.c │ ├── hqr.c │ ├── hs3.c │ ├── iniicm.c │ ├── lll.c │ ├── llsn.c │ ├── lrsmlp.c │ ├── lrsmsp.c │ ├── makefile │ ├── nonOracle │ │ ├── dbaseCommand.c │ │ └── makefile │ ├── noress.c │ ├── noresshf.c │ ├── oldbb.c │ ├── oldkir.c │ ├── oracle │ │ ├── dbFuncs.pc │ │ ├── dbaseCommand.c │ │ └── makefile │ ├── polezero.c │ ├── portable.c │ ├── predfl.c │ ├── prewit.c │ ├── ptbllp.c │ ├── redkir.c │ ├── reftek.c │ ├── rs7.c │ ├── rsk.c │ ├── rsl.c │ ├── rsm.c │ ├── rstn.c │ ├── sandia.c │ ├── snla3.c │ ├── sro.c │ ├── taper.c │ ├── thisfft.c │ ├── transfer.c │ ├── vel.c │ ├── wa.c │ ├── wabn.c │ ├── wiech.c │ ├── wwlpbn.c │ ├── wwsp.c │ ├── wwspbn.c │ ├── xicmc.c │ ├── xprewit.c │ ├── xtransfer.c │ ├── ykalp.c │ └── ykasp.c ├── main │ ├── makefile │ └── sac.c ├── makefile ├── msg │ ├── apcmsg.c │ ├── apcmsg2.c │ ├── apcmsgnum.c │ ├── apfmsg.c │ ├── apimsg.c │ ├── aplmsg.c │ ├── autooutmsg.c │ ├── clrmsg.c │ ├── getsmsg.c │ ├── inimsg.c │ ├── inquiremsg.c │ ├── makefile │ ├── outmsg.c │ ├── pltmsg.c │ ├── sacmsg.c │ ├── sendmesg.c │ ├── setmsg.c │ ├── typmsg.c │ └── wrtmsg.c ├── ncpf │ ├── appendstring.c │ ├── changestring.c │ ├── closemacro.c │ ├── deletestring.c │ ├── executemacro.c │ ├── getembedded.c │ ├── getepoch.c │ ├── getmacroinfo.c │ ├── getnumericarg.c │ ├── getstringargs.c │ ├── gettime.c │ ├── hrtoe.c │ ├── indexs.c │ ├── inicpf.c │ ├── macrokeyword.c │ ├── macroline.c │ ├── macroordered.c │ ├── macropreambl.c │ ├── macrostatus.c │ ├── makefile │ ├── nstrlensp.c │ ├── openmacro.c │ ├── prependstring.c │ ├── processembed.c │ ├── processfunc.c │ ├── processline.c │ ├── processnum.c │ ├── processstring.c │ ├── readableToEpoch.c │ ├── setmacrolev.c │ └── setmacrostat.c ├── nnm │ ├── makefile │ ├── xnnmc.c │ └── xwritenn.c ├── pl │ ├── centxt.c │ ├── incat.c │ ├── inicol.c │ ├── inigem.c │ ├── inilin.c │ ├── iniwidth.c │ ├── logdta.c │ ├── makefile │ ├── pl2d.c │ ├── plalpha.c │ ├── plblank.c │ ├── plcalwvtrans.c │ ├── plclip.c │ ├── pldta.c │ ├── plgrid.c │ ├── plhome.c │ ├── plmap.c │ ├── plnocl.c │ ├── plplab.c │ ├── plrest.c │ ├── plsave.c │ ├── pltext.c │ ├── xlinax.c │ ├── xlogax.c │ ├── ylinax.c │ └── ylogax.c ├── sam │ ├── chkpha.c │ ├── cpft.c │ ├── estpha.c │ ├── fdWhitenWrite.c │ ├── fdWriteFiles.c │ ├── fdbp.c │ ├── fdbr.c │ ├── fdhp.c │ ├── fdlp.c │ ├── fdplot.c │ ├── filtb.c │ ├── filterdesign.c │ ├── filtk.c │ ├── inisam.c │ ├── makefile │ ├── rfir.c │ ├── spcval.c │ ├── toamph.c │ ├── torlim.c │ ├── unwrap.c │ ├── xbenioff.c │ ├── xbp.c │ ├── xbr.c │ ├── xconvolve.c │ ├── xcorrelate.c │ ├── xdft.c │ ├── xdivomega.c │ ├── xenvelope.c │ ├── xfir.c │ ├── xhan.c │ ├── xhilbert.c │ ├── xhp.c │ ├── xidft.c │ ├── xkeepam.c │ ├── xkhronhite.c │ ├── xlp.c │ ├── xmulomega.c │ ├── xpsp.c │ ├── xrsp.c │ ├── xsamc.c │ ├── xunwr.c │ ├── xwnr.c │ └── xwsp.c ├── scm │ ├── iniscm.c │ ├── lifite.c │ ├── lifitu.c │ ├── linear.c │ ├── makefile │ ├── rotate.c │ ├── wigint.c │ ├── xabsgl.c │ ├── xdecimate.c │ ├── xinterpolate.c │ ├── xlinefit.c │ ├── xpowgl.c │ ├── xquantize.c │ ├── xreverse.c │ ├── xrglitches.c │ ├── xrmean.c │ ├── xrotate.c │ ├── xrq.c │ ├── xrtr.c │ ├── xscmc.c │ ├── xsmooth.c │ ├── xstretch.c │ └── xtaper.c ├── site │ ├── initsite.c │ ├── makefile │ ├── xsitecom.c │ └── xtestsite.c ├── smm │ ├── inismm.c │ ├── makefile │ ├── ptp.c │ ├── xmarkptp.c │ ├── xmarktimes.c │ ├── xmarkvalue.c │ ├── xrms.c │ └── xsmmc.c ├── spe │ ├── inispe.c │ ├── makefile │ ├── xcor.c │ ├── xmem.c │ ├── xmlm.c │ ├── xpcor.c │ ├── xpds.c │ ├── xppe.c │ ├── xpspe.c │ ├── xquitspe.c │ ├── xrcor.c │ ├── xspe.c │ ├── xspec.c │ ├── xwcor.c │ ├── xwhiten.c │ └── xwspe.c ├── ssi │ ├── CSStoSAC.c │ ├── DBheaderToSac.c │ ├── DBwfToSac.c │ ├── OnOrOff.c │ ├── SacHeaderToDB.c │ ├── SeisMgrCode.c │ ├── SeisMgrToSac.c │ ├── alignFiles.c │ ├── deleteAllSacFiles.c │ ├── inissi.c │ ├── makefile │ ├── prefPicksToHeader.c │ ├── rollback.c │ ├── sacToSeisMgr.c │ ├── uniqueStaAndChan.c │ ├── xblend.c │ ├── xcommit.c │ ├── xcutim.c │ ├── xreaddb.c │ ├── xrecall.c │ ├── xrollback.c │ └── xtablname.c ├── sss │ ├── definelimits.c │ ├── iaspmodel.c │ ├── inisss.c │ ├── libtau.c │ ├── makefile │ ├── phaseadj.c │ ├── rscursor.c │ ├── timeadj.c │ ├── timecrossing.c │ ├── ttint.c │ ├── ttlim.h │ ├── velocityadj.c │ ├── vmcalc.c │ ├── vmdly.c │ ├── vmline.c │ ├── xaddstack.c │ ├── xchangestack.c │ ├── xdeletestack.c │ ├── xdeltacheck.c │ ├── xdistanceaxis.c │ ├── xdistancewind.c │ ├── xglobalstack.c │ ├── xincrementsta.c │ ├── xliststack.c │ ├── xphase.c │ ├── xplotrecords.c │ ├── xplotstack.c │ ├── xquitsss.c │ ├── xsss.c │ ├── xsssc.c │ ├── xsumstack.c │ ├── xtimeaxis.c │ ├── xtimewindow.c │ ├── xtraveltime.c │ ├── xvelocitymode.c │ ├── xvelocityrose.c │ ├── xwritestack.c │ └── xzerostack.c ├── top │ ├── executecomman.c │ ├── findcommand.c │ ├── initcommon.c │ ├── initsac.c │ ├── makefile │ └── saccommands.c ├── ucf │ ├── basenm.c │ ├── byteswap.c │ ├── cnvatf.c │ ├── cnvati.c │ ├── cnvfta.c │ ├── cnvita.c │ ├── copy.c │ ├── copydouble.c │ ├── copyi.c │ ├── copykc.c │ ├── ddttm.c │ ├── delims.c │ ├── distaz.c │ ├── evallogical.c │ ├── extrma.c │ ├── fill.c │ ├── getxw.c │ ├── getyw.c │ ├── idttm.c │ ├── idttmf.c │ ├── incdat.c │ ├── inctim.c │ ├── inctimf.c │ ├── initok.c │ ├── kadate.c │ ├── kadttm.c │ ├── katime.c │ ├── kidate.c │ ├── kijdat.c │ ├── lbsrch.c │ ├── ldttm.c │ ├── linrng.c │ ├── ljust.c │ ├── makefile │ ├── nccomp.c │ ├── next2.c │ ├── ophelp.c │ ├── poptok.c │ ├── sorti.c │ ├── srtndx.c │ ├── timecheck.c │ ├── tokdel.c │ ├── tosecs.c │ ├── wapf.c │ ├── wrcom.c │ ├── wrhelp.c │ └── wrindx.c ├── uom │ ├── dif2.c │ ├── dif3.c │ ├── dif5.c │ ├── iniuom.c │ ├── makefile │ ├── xabs.c │ ├── xadd.c │ ├── xdif.c │ ├── xdiv.c │ ├── xexp.c │ ├── xexp10.c │ ├── xint.c │ ├── xlog.c │ ├── xlog10.c │ ├── xmul.c │ ├── xsqr.c │ ├── xsqrt.c │ ├── xsub.c │ └── xuomc.c ├── vars │ ├── allocatevnode.c │ ├── convlistname.c │ ├── createvlist.c │ ├── decodevdesc.c │ ├── deletev.c │ ├── deletevlist.c │ ├── encodevdesc.c │ ├── encodeventry.c │ ├── encodevnil.c │ ├── existsv.c │ ├── existsvlist.c │ ├── findvnil.c │ ├── getvFILEptr.c │ ├── getventry.c │ ├── getvlist.c │ ├── getvlist2.c │ ├── getvvstring.c │ ├── increasenlist.c │ ├── initializevar.c │ ├── initvlist.c │ ├── inivars.c │ ├── makefile │ ├── nextvlist.c │ ├── putvFILEptr.c │ ├── putventry.c │ ├── putvvstring.c │ ├── readvfile.c │ ├── releasevnode.c │ ├── setvreadonly.c │ ├── splitvname.c │ └── writevfile.c ├── wild │ ├── getdir.c │ ├── lfilec.c │ ├── lwildc.c │ ├── makefile │ ├── wildch.c │ └── wildfl.c └── xyz │ ├── adjust_height.c │ ├── adjust_width.c │ ├── calcfftsize.c │ ├── calcloc.c │ ├── calcsize.c │ ├── cbar_window.c │ ├── flipdata.c │ ├── getdata.c │ ├── inixyz.c │ ├── label_cbar.c │ ├── linear_interp.c │ ├── makefile │ ├── plotimage.c │ ├── scaleimage.c │ ├── scallop.c │ ├── smooth.c │ ├── spcgrm.c │ ├── specplot.c │ ├── spectrogram.c │ ├── subtract.c │ ├── vfxyz.c │ ├── window_data.c │ ├── writezdata.c │ ├── xcontour.c │ ├── xgrayscale.c │ ├── ximage.c │ ├── xscallop.c │ ├── xspectrogram.c │ ├── xxyzc.c │ ├── xyzcleanup.c │ ├── xzcolors.c │ ├── xzlabels.c │ ├── xzlevels.c │ ├── xzlines.c │ ├── xzticks.c │ └── zfft.c └── utils ├── SAC2LINUX ├── Makefile ├── sac.h ├── saclinux2sun.c └── sacsun2linux.c ├── mach ├── makefile ├── makefile.linux ├── makefile.solaris ├── sgflist.f ├── sgfmerge.f ├── sgfplot.f ├── sgftoai.c └── sgftops.c /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.o 3 | *~ 4 | *.lis 5 | bin/sacndb 6 | bin/sac 7 | *.pkg 8 | /.cproject 9 | /.project 10 | .settings/** 11 | Default/** 12 | *.a 13 | *.ipch 14 | *.bin 15 | .vscode* 16 | *.wfdisc 17 | *.w 18 | *.sac 19 | src/SeisMgr/dbselect/dbHelpQuery.c 20 | src/SeisMgr/dbselect/dbQuerySL.c 21 | src/icm/oracle/dbFuncs.c 22 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | message: "If you use this software, please cite it as below." 3 | title: "SAC2000" 4 | version: 07.10.8 5 | doi: 10.11578/dc.20220705.1 6 | date-released: 2022-07-05 -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: 4 | cd src && make all 5 | 6 | clean: 7 | cd src && make clean 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SAC2000 (Seismic Analysis Code for the third millennium) is a general purpose interactive program designed for the study of sequential signals, especially time-series data. 2 | 3 | 4 | Emphasis has been placed on analysis tools used by research seismologists in the detailed study of seismic events. 5 | 6 | 7 | Analysis capabilities include general arithmetic operations, Fourier transforms, three spectral estimation techniques, IIR and FIR filtering, signal stacking, decimation, interpolation, correlation, and seismic phase picking. 8 | 9 | Additional documentation and help is available in the misc/help directory in this source repository. 10 | 11 | 12 | DOI 10.11578/dc.20220705.1 13 | 14 | 15 | SAC2000 is distributed under the terms of the MIT license. All new 16 | contributions must be made under this license. 17 | 18 | 19 | SPDX-License-Identifier: MIT -------------------------------------------------------------------------------- /datagen/createdatagen: -------------------------------------------------------------------------------- 1 | # create the "funcgen seis" data 2 | sac< 2 | 3 | #ifdef DB_ERROR_HANDLER 4 | jmp_buf env; 5 | char dbErrorString[500]; 6 | #else 7 | extern jmp_buf env; 8 | extern char dbErrorString[]; 9 | #endif 10 | -------------------------------------------------------------------------------- /inc/dbPtsInside.h: -------------------------------------------------------------------------------- 1 | struct point{ 2 | float x; 3 | float y; 4 | }; 5 | 6 | struct line{ 7 | struct point p1; 8 | struct point p2; 9 | }; 10 | 11 | 12 | 13 | extern int inside(struct point t, struct point *p, int N); 14 | -------------------------------------------------------------------------------- /inc/dblErrors.h: -------------------------------------------------------------------------------- 1 | #ifndef _DBLERRORS_H 2 | #define _DBLERRORS_H 3 | #include 4 | 5 | 6 | jmp_buf dblJmpBuf; 7 | 8 | void dblClearErrorList(void); 9 | void dblSetError(int Severe, const char * string); 10 | char *dblGetErrorMessage(void); 11 | int dblGetNumErrors(void); 12 | 13 | #endif /* _DBLERRORS_H */ 14 | -------------------------------------------------------------------------------- /inc/dblGetDataSubs.h: -------------------------------------------------------------------------------- 1 | #ifndef DBL_GET_DATA_SUBS_H 2 | #define DBL_GET_DATA_SUBS_H 3 | 4 | int dblGetE1 ( int NPTS , FILE *fptr , struct wfdiscList * wfStruc ); 5 | int dblGetS2I2G2 ( int NPTS , 6 | FILE *fptr , 7 | struct wfdiscList * wfStruc , 8 | char * pType ); 9 | int dblGetS3 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc ); 10 | int dblGetT4F4 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc , short swapFlag ); 11 | int dblGetS4I4 ( int NPTS , FILE *fptr , struct wfdiscList *wfStruc ); 12 | int dblGetT8F8 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc ); 13 | void enlarge(FILE *fp, int outMax, int* data, /* int * byteOff,*/ int* nerr); 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /inc/dload.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/dload.h */ 2 | #define MEXTCOMS 50 3 | 4 | struct t_cmextcom { 5 | int nfiles; 6 | int (*extfuncs[MEXTCOMS])(); 7 | } cmextcom; 8 | 9 | -------------------------------------------------------------------------------- /inc/fir.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/fir.h */ 2 | 3 | #define MFIR 255 4 | 5 | 6 | 7 | struct t_kmfir { 8 | char kidfir[81]; 9 | } kmfir; 10 | struct t_cmfir { 11 | int ncfir; 12 | float cfir[MFIR], dtfir; 13 | } cmfir; 14 | 15 | 16 | 17 | #ifdef DOINITS 18 | float *const Cfir = &cmfir.cfir[0] - 1; 19 | #else 20 | extern float *const Cfir; 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /inc/gse.h: -------------------------------------------------------------------------------- 1 | int gseRead20(char *fileName, char *WorkSetName, int Replace, int MaxWaveforms, int verbose, double MaxPhysMem ) ; 2 | 3 | int WriteGSEFile( char *outFile, DBlist tree, char *datasource, int cm6 ) ; 4 | 5 | int ReadCompData(FILE *ptr, int Nsamp, int *Data, char *fmt) ; 6 | 7 | int CheckSumFromIntArray(int *data, int Npts) ; 8 | int PutArrivalData ( FILE *ptr , DBlist tree ) ; 9 | int PutOriginData ( FILE *ptr , DBlist tree ) ; 10 | -------------------------------------------------------------------------------- /inc/gui.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | struct gui_state { 6 | Widget history_list; 7 | }cmgui; 8 | -------------------------------------------------------------------------------- /inc/history.h: -------------------------------------------------------------------------------- 1 | #ifndef TRUE 2 | #define TRUE 1 3 | #endif 4 | #ifndef FALSE 5 | #define FALSE 0 6 | #endif 7 | 8 | 9 | 10 | /* These are the function prototypes for this module */ 11 | char *AddToHistory( ); 12 | 13 | -------------------------------------------------------------------------------- /inc/mem.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/mem.h */ 2 | 3 | /* old initializations 4 | #ifdef DOINITS 5 | int *const isacmem = (int*)cmmem.sacmem; 6 | 7 | int *const Isacmem = (int*)&cmmem.sacmem[0] - 1; 8 | 9 | float *const Sacmem = &cmmem.sacmem[0] - 1; 10 | #else 11 | extern int *const isacmem; 12 | extern int *const Isacmem; 13 | extern float *const Sacmem; 14 | #endif 15 | old initializations */ 16 | 17 | /* These dynamic pointers now must be initialized and 18 | managed in routines like iniam, allamb, reaamb. 19 | Isacmem and Sacmem will no inter be needed, I 20 | think. */ 21 | 22 | #ifdef DOINITS 23 | struct t_cmmem cmmem = { 0, NULL }; 24 | #else 25 | extern struct t_cmmem cmmem; 26 | #endif 27 | -------------------------------------------------------------------------------- /inc/msg.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/msg.h */ 2 | 3 | #define MCOMMANDS 4 4 | #define MERRORS 1 5 | #define MFMSG 500 6 | #define MLIMSG 5 7 | #define MMACROS 5 8 | #define MOUTPUT 3 9 | #define MPROCESSED 6 10 | #define MTPMSG 6 11 | #define MUNITS 5 12 | #define MWARNINGS 2 13 | 14 | 15 | 16 | struct t_kmmsg { 17 | char ktpmsg[MTPMSG][9], 18 | klimsg[MLIMSG][MCMSG+1], /* list of messages */ 19 | kfmsg[MFMSG][MCMSG+1]; 20 | } kmmsg; 21 | struct t_cmmsg { 22 | int nummsg, itpmsg, nlimsg, nchmsg; 23 | int autoout; 24 | int nunits; 25 | FILE *iunits[MUNITS]; 26 | int lsend[MUNITS][MTPMSG]; 27 | int nfmsg, ifmsg[MFMSG]; 28 | } cmmsg; 29 | 30 | 31 | #ifdef DOINITS 32 | int *const Ifmsg = &cmmsg.ifmsg[0] - 1; 33 | #else 34 | extern int *const Ifmsg; 35 | extern int *const Iunits; 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /inc/nnm.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/nnm.h */ 2 | 3 | struct t_kmnnm { 4 | char kwritenn[MCPFN+1]; 5 | } kmnnm; 6 | struct t_cmnnm { 7 | int numpoints, numfiles; 8 | float headerarray[MDFL]; 9 | } cmnnm; 10 | 11 | 12 | #ifdef DOINITS 13 | float *const Headerarray = &cmnnm.headerarray[0] - 1; 14 | #else 15 | extern float *const Headerarray; 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /inc/nvars.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/nvars.h */ 2 | -------------------------------------------------------------------------------- /inc/scm.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/scm.h */ 2 | 3 | #define MQGAIN 8 4 | #define MRGLMT 3 5 | #define MRGLTP 2 6 | 7 | 8 | 9 | struct t_cmscm { 10 | float usraz, usrang; 11 | int lnpreq; 12 | float rqqcon, rqrcon, rqccon, dtnew, eps; 13 | int lbreq; 14 | float breq; 15 | int lnreq; 16 | int nreq, iqgain[MQGAIN + 1]; 17 | float qlevel; 18 | int nqmant, nstrfc; 19 | int lstrfi, lmean; 20 | int nhalf, irgltp, irglmt; 21 | float thold; 22 | int lrglwin; 23 | float orglwin[2]; 24 | int ndecfc; 25 | int ldecfi; 26 | } cmscm; 27 | struct t_kmscm { 28 | char krottp[9], krgltp[MRGLTP][9], krglmt[MRGLMT][9], krglwin[2][9]; 29 | } kmscm; 30 | 31 | 32 | #ifdef DOINITS 33 | int *const Iqgain = &cmscm.iqgain[0] - 1; 34 | float *const Orglwin = &cmscm.orglwin[0] - 1; 35 | #else 36 | extern int *const Iqgain; 37 | extern float *const Orglwin; 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /inc/site.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/site.h */ 2 | 3 | #define MODULESITECOM 99 4 | #define MSITECOMNAMES 10 5 | 6 | 7 | 8 | struct t_cmsite { 9 | int nsitecomnames, isitecomindex[MSITECOMNAMES]; 10 | } cmsite; 11 | struct t_kmsite { 12 | char ksitecomnames[MSITECOMNAMES][9]; 13 | } kmsite; 14 | 15 | 16 | #ifdef DOINITS 17 | int *const Isitecomindex = &cmsite.isitecomindex[0] - 1; 18 | #else 19 | extern int *const Isitecomindex; 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /inc/smMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef SM_MEMORY_H 2 | #define SM_MEMORY_H 3 | 4 | void * smMalloc(size_t size); 5 | void *smCalloc(size_t count, size_t size); 6 | void *smRealloc(void *ptr, size_t size); 7 | void smFree(void *ptr); 8 | size_t smTotalPhysicalBytes(void); 9 | size_t smAvailPhysicalBytes(void); 10 | size_t smAllocatedBytes(void); 11 | double smFracPhysMemUsed(void); 12 | void smPrintContents(void); 13 | 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /inc/smm.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/smm.h */ 2 | 3 | #define MVEL 10 4 | 5 | 6 | 7 | struct t_cmsmm { 8 | int lmtw; 9 | float omtw[2]; 10 | int nvel; 11 | float vel[MVEL]; 12 | int ldistr; 13 | float distr; 14 | int loriginr; 15 | float originr; 16 | int lgmt; 17 | int iodttm[6]; 18 | float value; 19 | int lgedata; 20 | float winlen; 21 | int lnoisemtw; 22 | float onoisemtw[2]; 23 | int irmspick; 24 | } cmsmm; 25 | struct t_kmsmm { 26 | char kmtw[2][9], ktmark[9], kvmark[9], kpmark[9], knoisemtw[2][9]; 27 | } kmsmm; 28 | 29 | 30 | #ifdef DOINITS 31 | int *const Iodttm = &cmsmm.iodttm[0] - 1; 32 | float *const Omtw = &cmsmm.omtw[0] - 1; 33 | float *const Onoisemtw = &cmsmm.onoisemtw[0] - 1; 34 | float *const Vel = &cmsmm.vel[0] - 1; 35 | #else 36 | extern int *const Iodttm; 37 | extern float *const Omtw; 38 | extern float *const Onoisemtw; 39 | extern float *const Vel; 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /inc/snf.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/snf.h */ 2 | 3 | #define MSN 15 4 | 5 | 6 | 7 | struct t_kmsnf { 8 | char ksnold[MSN][5], ksnnew[MSN][5], kxtsnf[40][9]; 9 | } kmsnf; 10 | 11 | -------------------------------------------------------------------------------- /inc/specdata.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/specdata.h */ 2 | 3 | struct t_filesinfo { 4 | int ptrbuffer, ptrfiles, ifile; 5 | int bufferfull, filesread, nodata; 6 | int lbuff; 7 | int first; 8 | } filesinfo; 9 | 10 | -------------------------------------------------------------------------------- /inc/spectrogram.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/spectrogram.h */ 2 | 3 | #define IIMGFFT 10 4 | #define IMGFFT 1024 5 | #define MAXBUFSIZE 50000 6 | #define MAXLFFT 4096 7 | 8 | 9 | -------------------------------------------------------------------------------- /inc/ssi.h: -------------------------------------------------------------------------------- 1 | #ifndef SSI_H_ 2 | # define SSI_H_ 3 | 4 | # include "mach.h" 5 | # include "SacHeader.h" 6 | 7 | struct SACheader globalSacHeader[ MDFL ] ; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /inc/stationList.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #ifndef TRUE 7 | #define TRUE 1 8 | #endif 9 | #ifndef FALSE 10 | #define FALSE 0 11 | #endif 12 | 13 | struct ChannelData{ 14 | int traceNum; 15 | char KCMPNM[16]; 16 | int NPTS; 17 | float B; 18 | float *data; 19 | float A; 20 | float USER0; 21 | float USER1; 22 | float T[10]; 23 | int year; 24 | int jday; 25 | int hour; 26 | int min; 27 | int sec; 28 | int msec; 29 | char KA[8]; 30 | char KUSER0[8]; 31 | char KUSER1[8]; 32 | char KT09[80]; 33 | 34 | }; 35 | 36 | 37 | void AddToStationList(int, int, float *); 38 | void UpdateFromStationList(int ); 39 | -------------------------------------------------------------------------------- /inc/stringfun.h: -------------------------------------------------------------------------------- 1 | #ifdef DEFINE_STRING_FUN 2 | char* upstring(char* string); 3 | char *stringcat(char *str1, ...); 4 | 5 | /* concatenate string2 to string1 after allocating necessary space */ 6 | char *strAllocCat(char * string1, char *string2); 7 | 8 | #else 9 | 10 | extern char *Upstring(char *str); 11 | extern char *stringcat(char *str1, ...); 12 | extern char *CpUpstring(const char *str); 13 | /* concatenate string2 to string1 after allocating necessary space */ 14 | extern char *strAllocCat(char * string1, char *string2); 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /inc/sudsDataConversions.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDS_CONVERT_H 2 | #define SUDS_CONVERT_H 3 | 4 | #include "suds.h" 5 | 6 | void Convert2(void *in); 7 | void Convert4(void *in); 8 | void Convert8(void *in); 9 | 10 | void ConvertPZArray(SUDS_CALIBR *PZA, int npts); 11 | #endif 12 | -------------------------------------------------------------------------------- /inc/sudsIO.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDSIO_H 2 | #define SUDSIO_H 3 | 4 | 5 | int sudsToCSSlist(const char* filename, const char *WorkSetName, int Replace, 6 | int MaxTraces, int Verbose, double MaxPhysMem); 7 | 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /inc/sudsListOps.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDS_LIST_OPS_H 2 | #define SUDS_LIST_OPS_H 3 | 4 | #include "suds.h" 5 | 6 | 7 | 8 | void *AddSudsListElement(SUDS *S, short StructID); 9 | void FreeSuds(SUDS *S); 10 | SUDS *NewSudsList(void); 11 | char *Phasecode(short obs_phase); 12 | char *Instcode(short code); 13 | char *GetCharAuth(short authority); 14 | char *GetCharProg(char program); 15 | char *GetCharMagType(short mag_type); 16 | #endif 17 | -------------------------------------------------------------------------------- /inc/tok.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/tok.h */ 2 | 3 | #define MMSGDL 5 4 | #define MTOKDL 5 5 | 6 | 7 | 8 | struct t_kmtok { 9 | byte ktokdl[MTOKDL], kmsgdl[MMSGDL]; 10 | } kmtok; 11 | struct t_cmtok { 12 | int ntokdl, nmsgdl; 13 | } cmtok; 14 | 15 | 16 | -------------------------------------------------------------------------------- /inc/tpf.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/tpf.h */ 2 | 3 | #define MCPS 8 4 | #define MDL 8 5 | 6 | 7 | 8 | struct t_cmtpf { 9 | int jtok1, ntokdl, nmsgdl; 10 | float exttpf[20]; 11 | } cmtpf; 12 | struct t_kmtpf { 13 | byte ktok1[MCPS], kbl1, ktokdl[MDL], kmsgdl[MDL]; 14 | char kxttpf[10][9]; 15 | } kmtpf; 16 | 17 | 18 | #ifdef DOINITS 19 | float *const Exttpf = &cmtpf.exttpf[0] - 1; 20 | byte *const Kmsgdl = &kmtpf.kmsgdl[0] - 1; 21 | byte *const Ktok1 = &kmtpf.ktok1[0] - 1; 22 | byte *const Ktokdl = &kmtpf.ktokdl[0] - 1; 23 | #else 24 | extern float *const Exttpf; 25 | extern byte *const Kmsgdl; 26 | extern byte *const Ktok1; 27 | extern byte *const Ktokdl; 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /inc/uom.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/uom.h */ 2 | 3 | #define MDIFTP 5 4 | #define MUOCON MDFL 5 | 6 | 7 | 8 | struct t_cmuom { 9 | float conadd[MUOCON], consub[MUOCON], conmul[MUOCON], condiv[MUOCON]; 10 | int ndiftp, idiftp; 11 | int ltrap; 12 | float extuom[400]; 13 | } cmuom; 14 | struct t_kmuom { 15 | char kdiftp[MDIFTP][9]; 16 | } kmuom; 17 | 18 | 19 | #ifdef DOINITS 20 | float *const Conadd = &cmuom.conadd[0] - 1; 21 | float *const Condiv = &cmuom.condiv[0] - 1; 22 | float *const Conmul = &cmuom.conmul[0] - 1; 23 | float *const Consub = &cmuom.consub[0] - 1; 24 | float *const Extuom = &cmuom.extuom[0] - 1; 25 | #else 26 | extern float *const Conadd; 27 | extern float *const Condiv; 28 | extern float *const Conmul; 29 | extern float *const Consub; 30 | extern float *const Extuom; 31 | #endif 32 | -------------------------------------------------------------------------------- /inc/usr.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/usr.h */ 2 | 3 | #define MLUSR 10 4 | #define MUSR 30 5 | #define MVUSR 100 6 | 7 | 8 | 9 | struct t_cmusr { 10 | int nusr, ndxusr[MUSR], numusr[MUSR]; 11 | float vusr[MVUSR]; 12 | int nlusr; 13 | int lusr[MLUSR]; 14 | } cmusr; 15 | struct t_kmusr { 16 | char kusr[MUSR][9], klusr[MLUSR][9]; 17 | } kmusr; 18 | 19 | 20 | #ifdef DOINITS 21 | int *const Lusr = &cmusr.lusr[0] - 1; 22 | int *const Ndxusr = &cmusr.ndxusr[0] - 1; 23 | int *const Numusr = &cmusr.numusr[0] - 1; 24 | float *const Vusr = &cmusr.vusr[0] - 1; 25 | #else 26 | extern int *const Lusr; 27 | extern int *const Ndxusr; 28 | extern int *const Numusr; 29 | extern float *const Vusr; 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /inc/wild.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/wild.h */ 2 | 3 | struct t_kmwild { 4 | byte sngl, mult; 5 | char ccon[3]; 6 | } kmwild; 7 | struct t_cmwild { 8 | int igcon; 9 | } cmwild; 10 | 11 | -------------------------------------------------------------------------------- /inc/wtofd.h: -------------------------------------------------------------------------------- 1 | #ifndef _WTOFD_H 2 | #define _WTOFD_H 3 | 4 | struct roots { 5 | float real , imag ; 6 | } ; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /inc/xyz.h: -------------------------------------------------------------------------------- 1 | /* ../../inc/xyz.h */ 2 | 3 | #define MZLLIST 40 4 | #define MZREGIONS (2*MZLLIST + 1) 5 | 6 | 7 | 8 | struct t_cmxyz { 9 | int lcleanup; 10 | float zllist[MZLLIST]; 11 | int nzllist; 12 | int lzllist, lzlmin; 13 | float zlmin; 14 | int lzlmax; 15 | float zlmax; 16 | int lzlinc; 17 | float zlinc; 18 | int lzlines; 19 | int izlines[MZLLIST], nzlines; 20 | float zregions[MZREGIONS]; 21 | int nzregions; 22 | int laspect; 23 | } cmxyz; 24 | 25 | 26 | #ifdef DOINITS 27 | int *const Izlines = &cmxyz.izlines[0] - 1; 28 | float *const Zllist = &cmxyz.zllist[0] - 1; 29 | float *const Zregions = &cmxyz.zregions[0] - 1; 30 | #else 31 | extern int *const Izlines; 32 | extern float *const Zllist; 33 | extern float *const Zregions; 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /macros/data/alphatest: -------------------------------------------------------------------------------- 1 | 0.0 0.0 2 | 1.0 10.0 3 | 2.0 20.0 4 | 3.0 30.0 5 | 4.0 40.0 6 | 5.0 30.0 7 | 6.0 20.0 8 | 7.0 10.0 9 | 8.0 0.0 10 | 9.0 0.0 11 | -------------------------------------------------------------------------------- /macros/data/cdv_z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/cdv_z -------------------------------------------------------------------------------- /macros/data/contourdata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/contourdata -------------------------------------------------------------------------------- /macros/data/elk_z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/elk_z -------------------------------------------------------------------------------- /macros/data/elk_z_am: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/elk_z_am -------------------------------------------------------------------------------- /macros/data/knb_z_am: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/knb_z_am -------------------------------------------------------------------------------- /macros/data/mnv_z_am: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/macros/data/mnv_z_am -------------------------------------------------------------------------------- /macros/data/tosac: -------------------------------------------------------------------------------- 1 | * 2 | * PURPOSE: To convert from alphanumeric to binary SAC data files. 3 | * 4 | $keys dir 5 | $default dir . 6 | do station list cdv elk 7 | conv from alpha $dir$/$station$_z_alpha to sac $dir$/$station$_z 8 | enddo 9 | do station list elk knb mnv 10 | conv from alpha $dir$/$station$_z_am_alpha to sac $dir$/$station$_z_am 11 | enddo 12 | conv from alpha $dir$/contourdata_alpha to sac $dir$/contourdata 13 | -------------------------------------------------------------------------------- /macros/demo/read: -------------------------------------------------------------------------------- 1 | echo off 2 | message ' ' 3 | message 'Each SAC data file contains the data from a single seismic' 4 | message 'component along with header information describing that data.' 5 | message 'SAC can process up to 100 data files at a time.' 6 | message 'The READ command reads data from disk, the CUT command can' 7 | message 'be used to specify what part of the data to read, and the' 8 | message 'PLOT command graphically displays the data currently read in.' 9 | message ' ' 10 | echo on 11 | pause 12 | read $1$cdv_z 13 | title 'A sample seismogram from a local event' 14 | plot 15 | listhdr columns 2 16 | pause 17 | cut a f 18 | read $1$cdv_z 19 | title 'Same seismogram windowed around the event' 20 | plot 21 | listhdr 22 | pause 23 | cut a -0.2 2.0 24 | read $1$cdv_z 25 | title 'Same seismogram windowed around the arrival time' 26 | plot 27 | listhdr 28 | pause 29 | cut off 30 | -------------------------------------------------------------------------------- /macros/test/all: -------------------------------------------------------------------------------- 1 | * 2 | * PURPOSE: To test all (most? many?) of the SAC commands. 3 | * 4 | * ARGUMENTS: 5 | * 6 | $default 1 sgf 7 | $default 2 ../results/ 8 | $default 3 ../data/ 9 | macro executive $1$ $2$ $3$ 10 | macro datafile $1$ $2$ $3$ 11 | macro graphics $1$ $2$ $3$ 12 | quit 13 | -------------------------------------------------------------------------------- /macros/test/datafile: -------------------------------------------------------------------------------- 1 | * 2 | * Purpose: To test the SAC commands in the data file module. 3 | * 4 | transcript create file $2$datafile.trans content all 5 | wait text off 6 | read $3$elk_z 7 | listhdr default columns 2 8 | read more $3$elk_z 9 | listhdr picks columns 1 10 | write $3$temp1 $3$temp2 11 | convert from sac $3$temp1 to alpha $3$temp3 12 | convert from alpha $3$temp3 to sac $3$temp4 13 | read $3$temp4 14 | listhdr default columns 2 15 | cut b n 512 16 | read 17 | listhdr 18 | chnhdr b 100 19 | chnhdr kevnm 'Just Testing' 20 | chnhdr iftype ixy 21 | listhdr 22 | cut off 23 | read $3$*_z_am 24 | listhdr npts 25 | readalpha content p $3$alphatest 26 | listhdr default 27 | transcript close file $2$datafile.trans 28 | -------------------------------------------------------------------------------- /macros/test/executive: -------------------------------------------------------------------------------- 1 | * 2 | * Purpose: To test the SAC commands in the executive module. 3 | * 4 | transcript create file $2$executive.trans content all 5 | wait text off 6 | report memory 7 | report devices 8 | funcgen impulse npts 51 9 | listhdr 10 | datagen sub regional *.z 11 | listhdr columns 2 12 | message 'Test of SAC message command' 13 | news 14 | help news 15 | syntax news 16 | setbb a 1.0 17 | setbb b 5.0 18 | setbb c 'this is a test of SAC blackboard' 19 | getbb 20 | setbb d (%a% / %b%) 21 | setbb e "(before " blackboard" "(after a "%c%")")" 22 | getbb d e 23 | unsetbb a b 24 | getbb all 25 | setbb f 10.0 26 | trace on c f 27 | setbb f (%f% / 2.0) 28 | unsetbb c 29 | getbb 30 | trace off c f 31 | transcript close file $2$executive.trans 32 | -------------------------------------------------------------------------------- /misc/csspickprefs: -------------------------------------------------------------------------------- 1 | flori 2 | 3 | t0 P - 4 | t1 Pn - 5 | t2 Pg - 6 | t3 S - 7 | t4 Sn - 8 | t5 Sg - 9 | t6 Lg - 10 | t7 LR - 11 | t8 Rg - 12 | t9 pP - 13 | -------------------------------------------------------------------------------- /misc/ctables/default: -------------------------------------------------------------------------------- 1 | 1.0 1.0 1.0 WHITE 2 | 1.0 0.0 0.0 RED 3 | 0.0 1.0 0.0 GREEN 4 | 0.0 0.0 1.0 BLUE 5 | 1.0 1.0 0.0 YELLOW 6 | 0.0 1.0 1.0 CYAN 7 | 1.0 0.0 1.0 MAGENTA 8 | 0.0 0.0 0.0 BLACK 9 | -------------------------------------------------------------------------------- /misc/ctables/grayscale: -------------------------------------------------------------------------------- 1 | 1.00000 1.00000 1.00000 WHITE 2 | 0.857 0.857 0.857 GRAY1 3 | 0.714 0.714 0.714 GRAY2 4 | 0.571 0.571 0.571 GRAY3 5 | 0.428 0.428 0.428 GRAY4 6 | 0.285 0.285 0.285 GRAY5 7 | 0.142 0.142 0.142 GRAY6 8 | 0.000 0.000 0.000 BLACK 9 | -------------------------------------------------------------------------------- /misc/ctables/rainbow: -------------------------------------------------------------------------------- 1 | 1.00 1.00 1.00 WHITE 2 | 1.00 0.00 0.00 RED 3 | 0.75 0.25 0.00 ORANGE 4 | 1.00 1.00 0.00 YELLOW 5 | 0.00 1.00 0.00 GREEN 6 | 0.00 0.00 1.00 BLUE 7 | 0.25 0.00 0.30 INDIGO 8 | 1.00 0.00 0.70 VIOLET 9 | -------------------------------------------------------------------------------- /misc/datagen/local/cal.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cal.e -------------------------------------------------------------------------------- /misc/datagen/local/cal.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cal.n -------------------------------------------------------------------------------- /misc/datagen/local/cal.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cal.z -------------------------------------------------------------------------------- /misc/datagen/local/cao.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cao.e -------------------------------------------------------------------------------- /misc/datagen/local/cao.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cao.n -------------------------------------------------------------------------------- /misc/datagen/local/cao.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cao.z -------------------------------------------------------------------------------- /misc/datagen/local/cda.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cda.e -------------------------------------------------------------------------------- /misc/datagen/local/cda.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cda.n -------------------------------------------------------------------------------- /misc/datagen/local/cda.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cda.z -------------------------------------------------------------------------------- /misc/datagen/local/cdv.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cdv.e -------------------------------------------------------------------------------- /misc/datagen/local/cdv.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cdv.n -------------------------------------------------------------------------------- /misc/datagen/local/cdv.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cdv.z -------------------------------------------------------------------------------- /misc/datagen/local/cmn.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cmn.e -------------------------------------------------------------------------------- /misc/datagen/local/cmn.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cmn.n -------------------------------------------------------------------------------- /misc/datagen/local/cmn.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cmn.z -------------------------------------------------------------------------------- /misc/datagen/local/cps.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cps.e -------------------------------------------------------------------------------- /misc/datagen/local/cps.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cps.n -------------------------------------------------------------------------------- /misc/datagen/local/cps.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cps.z -------------------------------------------------------------------------------- /misc/datagen/local/cva.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cva.e -------------------------------------------------------------------------------- /misc/datagen/local/cva.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cva.n -------------------------------------------------------------------------------- /misc/datagen/local/cva.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cva.z -------------------------------------------------------------------------------- /misc/datagen/local/cvl.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvl.e -------------------------------------------------------------------------------- /misc/datagen/local/cvl.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvl.n -------------------------------------------------------------------------------- /misc/datagen/local/cvl.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvl.z -------------------------------------------------------------------------------- /misc/datagen/local/cvy.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvy.e -------------------------------------------------------------------------------- /misc/datagen/local/cvy.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvy.n -------------------------------------------------------------------------------- /misc/datagen/local/cvy.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/local/cvy.z -------------------------------------------------------------------------------- /misc/datagen/regional/elk.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/elk.e -------------------------------------------------------------------------------- /misc/datagen/regional/elk.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/elk.n -------------------------------------------------------------------------------- /misc/datagen/regional/elk.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/elk.z -------------------------------------------------------------------------------- /misc/datagen/regional/knb.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/knb.e -------------------------------------------------------------------------------- /misc/datagen/regional/knb.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/knb.n -------------------------------------------------------------------------------- /misc/datagen/regional/knb.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/knb.z -------------------------------------------------------------------------------- /misc/datagen/regional/lac.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/lac.e -------------------------------------------------------------------------------- /misc/datagen/regional/lac.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/lac.n -------------------------------------------------------------------------------- /misc/datagen/regional/lac.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/lac.z -------------------------------------------------------------------------------- /misc/datagen/regional/mnv.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/mnv.e -------------------------------------------------------------------------------- /misc/datagen/regional/mnv.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/mnv.n -------------------------------------------------------------------------------- /misc/datagen/regional/mnv.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/regional/mnv.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkl.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkl.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkl.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkl.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkl.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkl.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkm.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkm.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkm.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkm.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/ntkm.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/ntkm.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykl.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykl.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykl.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykl.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykl.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykl.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykm.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykm.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykm.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykm.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/nykm.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/nykm.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkl.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkl.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkl.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkl.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkl.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkl.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkm.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkm.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkm.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkm.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/onkm.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/onkm.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkl.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkl.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkl.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkl.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkl.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkl.z -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkm.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkm.e -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkm.n: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkm.n -------------------------------------------------------------------------------- /misc/datagen/teleseis/sdkm.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/datagen/teleseis/sdkm.z -------------------------------------------------------------------------------- /misc/external/flipxy.csh: -------------------------------------------------------------------------------- 1 | #!/bin/csh -f 2 | # script to add an external command to libext.so, 3 | # my a shared external command library. 4 | # 5 | # 6 | # 1) setup the SACSOLIST and LD_LIBRARY_PATH environments. 7 | # 8 | setenv SACSOLIST libext.so # note can have multiple shared libs if use quotes 9 | setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/us/peterg/res1/sac/bin/extern # 10 | # 11 | # 2) compile srcs and load into one or more external libs as indicated above. 12 | cc -o libext.so -G flipxy.c # note: can have multiple srcs on this line 13 | # 14 | # Now were ready to run sac load the command and use it. 15 | # May want to use and init script to load automatically. 16 | alias sac "/usr/local/bin/sac /us/peterg/bin/sacmac/sac.init" 17 | # where sac.init includes the command load command_name 18 | 19 | 20 | -------------------------------------------------------------------------------- /misc/external/loadcom: -------------------------------------------------------------------------------- 1 | cc -o libcom.so -G *.c 2 | -------------------------------------------------------------------------------- /misc/external/loadcom.linux: -------------------------------------------------------------------------------- 1 | cc -shared -o libcom.so flipxy.c ../../lib/sac.a 2 | -------------------------------------------------------------------------------- /misc/external/makefile: -------------------------------------------------------------------------------- 1 | libcom.so: flipxy.c 2 | cc -o libcom.so -G flipxy.c 3 | -------------------------------------------------------------------------------- /misc/external/makefile.linux: -------------------------------------------------------------------------------- 1 | SRC = $(SACDIR)/src 2 | LIB = $(SACDIR)/lib 3 | libcom.so: flipxy.c $(LIB)/sac.a 4 | cc -shared -o libcom.so flipxy.c $(LIB)/sac.a 5 | $(LIB)/sac.a: $(SRC)/make_stamp 6 | -------------------------------------------------------------------------------- /misc/external/makefile.solaris: -------------------------------------------------------------------------------- 1 | libcom.so: flipxy.c 2 | cc -o libcom.so -G flipxy.c 3 | -------------------------------------------------------------------------------- /misc/fir/dec2: -------------------------------------------------------------------------------- 1 | FIR-FILT: FIR FILTER DESIGN CODE OUTPUT 2 | 0.10000000E+01 48 3 | 0.47312629E+00 0.31697387E+00 0.26678406E-01 -0.10212776E+00 -0.26100356E-01 4 | 0.57145566E-01 0.25159817E-01 -0.36581896E-01 -0.23883324E-01 0.24321463E-01 5 | 0.22318326E-01 -0.16004425E-01 -0.20517055E-01 0.99688675E-02 0.18537275E-01 6 | -0.54459628E-02 -0.16433518E-01 0.20369552E-02 0.14277564E-01 0.50962088E-03 7 | -0.12123583E-01 -0.23524212E-02 0.10030696E-01 0.36127516E-02 -0.80487542E-02 8 | -0.43881042E-02 0.62203603E-02 0.47640391E-02 -0.45795627E-02 -0.48192143E-02 9 | 0.31499979E-02 0.46267062E-02 -0.19449759E-02 -0.42532040E-02 0.96769247E-03 10 | 0.37597087E-02 -0.21371132E-03 -0.32004546E-02 -0.32992219E-03 0.26274207E-02 11 | 0.67918003E-03 -0.20938036E-02 -0.85202418E-03 0.16962707E-02 0.87003352E-03 12 | -0.19099547E-02 -0.33559431E-02 -0.33131917E-03 13 | -------------------------------------------------------------------------------- /misc/fir/ms4: -------------------------------------------------------------------------------- 1 | FIR-FILT: FIR FILTER DESIGN CODE OUTPUT 2 | 0.40000000E+01 34 3 | 0.15282795E+00 0.47694109E-01 -0.11714904E+00 -0.11346427E+00 0.36400869E-01 4 | 0.11481214E+00 0.34108639E-01 -0.66938892E-01 -0.56981802E-01 0.15140668E-01 5 | 0.38060643E-01 0.69916882E-02 -0.10458943E-01 -0.63375352E-04 0.19154462E-03 6 | -0.13281779E-01 -0.78964029E-02 0.15045734E-01 0.18140923E-01 -0.52992310E-02 7 | -0.19105650E-01 -0.49837008E-02 0.11656754E-01 0.79274848E-02 -0.37887436E-02 8 | -0.45609279E-02 0.92109165E-03 0.56364713E-03 -0.23750002E-02 0.65454619E-03 9 | 0.32771872E-02 0.37220824E-02 -0.12208197E-01 -0.39601158E-02 10 | -------------------------------------------------------------------------------- /misc/help/about: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ABOUT 3 | 4 | SUMMARY: 5 | Displays version and copywrite information. 6 | 7 | SYNTAX: 8 | ABOUT 9 | 10 | LATEST REVISION: 11 | January 20, 1999 (Version 0.58) 12 | -------------------------------------------------------------------------------- /misc/help/absolutevalue: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ABS 3 | 4 | SUMMARY: 5 | Takes the absolute value of each data point. 6 | 7 | SYNTAX: 8 | ABS 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | LATEST REVISION: 20 | January 8, 1983 (Version 8.0) 21 | -------------------------------------------------------------------------------- /misc/help/border: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual BORDER 3 | 4 | SUMMARY: 5 | Controls the plotting of a border around plots. 6 | 7 | SYNTAX: 8 | BORDER {ON|OFF} 9 | 10 | INPUT: 11 | {ON} : Turn border plotting on. 12 | 13 | OFF : Turn border plotting off. 14 | 15 | DEFAULT VALUES: 16 | BORDER OFF 17 | 18 | DESCRIPTION: 19 | When this option is on, a solid border is drawn around the sides of the plot 20 | at the edge of the viewport (see XVPORT.) Note that an axis line is always 21 | drawn on each side of the plot that contains an annotated axis (see AXES) or 22 | a set of tick marks (see TICKS). Thus the border option only applies to those 23 | sides without axes or tick marks. 24 | 25 | SEE COMMANDS: 26 | XVPORT, YVPORT, AXES, TICKS 27 | 28 | LATEST REVISION: 29 | January 8, 1983 (Version 8.0) 30 | -------------------------------------------------------------------------------- /misc/help/capf: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual CAPF 3 | 4 | SUMMARY: 5 | Closes the currently open alphanumeric pick file. 6 | 7 | SYNTAX: 8 | CAPF 9 | 10 | SEE COMMANDS: 11 | OAPF 12 | 13 | LATEST REVISION: 14 | January 8, 1983 (Version 8.0) 15 | -------------------------------------------------------------------------------- /misc/help/chpf: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual CHPF 3 | 4 | SUMMARY: 5 | Closes the currently open HYPO pick file. 6 | 7 | SYNTAX: 8 | CHPF 9 | 10 | DESCRIPTION: 11 | Automatically appends the instruction card "10" to the end of the file being 12 | closed. 13 | 14 | SEE COMMANDS: 15 | OHPF, WHPF 16 | 17 | LATEST REVISION: 18 | March 20, 1992 (Version 10.6e) 19 | -------------------------------------------------------------------------------- /misc/help/comcor: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual COMCOR 3 | 4 | SUMMARY: 5 | Controls SAC's command correction option. 6 | 7 | SYNTAX: 8 | COMCOR {ON|OFF} 9 | 10 | INPUT: 11 | ON : Turn command correction option on. 12 | 13 | OFF : Turn command correction option off. 14 | 15 | DEFAULT VALUES: 16 | COMCOR OFF 17 | 18 | DESCRIPTION: 19 | SAC checks the form and content of each command you type. When it detects an 20 | error, it sends an error message to you, telling you what the error was and 21 | where it occurred. If the command correction option is on, SAC then lets you 22 | correct the command and have SAC automatically reexecute it. If this option 23 | is off, SAC merely prints the error message and returns control to you. More 24 | details and several examples are given in the User's Guide. "Command 25 | Correction Capability" in the SAC Users Manual. 26 | 27 | LATEST REVISION: 28 | October 11, 1984 (Version 9.1) 29 | -------------------------------------------------------------------------------- /misc/help/convert: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual CONVERT 3 | 4 | SUMMARY: 5 | Converts data files from one format to another. 6 | 7 | SYNTAX: 8 | CONVERT {FROM} {format} infile 9 | {TO {format} outfile}|{OVER {format}} 10 | where format is one of the following: 11 | SAC|ALPHA 12 | 13 | INPUT: 14 | infile : The name of the input data file. 15 | 16 | outfile : The name of the output data file. 17 | 18 | OVER : Overwrite the input data file. 19 | 20 | SAC : SAC formatted binary data file. 21 | 22 | ALPHA : Alphanumeric equivalent of SAC binary data file. 23 | 24 | DEFAULT VALUES: 25 | CONVERT FROM SAC infile OVER SAC 26 | 27 | DESCRIPTION: 28 | This command converts a single data file from one format to another. It will 29 | be replaced in a future update with an improved system that will use the READ 30 | and WRITE commands. 31 | 32 | LATEST REVISION: 33 | January 8, 1983 (Version 8.0) 34 | -------------------------------------------------------------------------------- /misc/help/enddevices: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ENDDEVICES 3 | 4 | SUMMARY: 5 | Terminates one or more graphics devices. 6 | 7 | SYNTAX: 8 | ENDDEVICES TERMINAL,SGF,XWINDOWS,SUNWINDOWS 9 | 10 | ALTERNATE FORMS: 11 | ENDG or EG are obsolete but acceptable names for this command. 12 | 13 | INPUT: 14 | TERMINAL : The graphics terminal you are currently logged into. 15 | 16 | SGF : The SAC Graphics File device driver. 17 | 18 | XWINDOWS : The X-windows window display system. 19 | 20 | SUNWINDOWS : The Sun window display system. 21 | 22 | DESCRIPTION: 23 | This command terminates one or more graphics devices. Devices are activated 24 | using the BEGINDEVICES command. The BEGINDEVICES command has a description of 25 | each of these graphics devices. 26 | 27 | SEE COMMANDS: 28 | BEGINDEVICES 29 | 30 | LATEST REVISION: 31 | April 13, 1987 (Version 10.1) 32 | -------------------------------------------------------------------------------- /misc/help/endframe: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ENDFRAME 3 | 4 | SUMMARY: 5 | Resumes automatic new frame actions between plots. 6 | 7 | SYNTAX: 8 | ENDFRAME 9 | 10 | ALTERNATE FORMS: 11 | ENDFR is an obsolete but allowable form of this command. 12 | 13 | DESCRIPTION: 14 | See the BEGINFRAME documentation. 15 | 16 | SEE COMMANDS: 17 | BEGINFRAME 18 | 19 | LATEST REVISION: 20 | May 15, 1987 (Version 10.2) 21 | -------------------------------------------------------------------------------- /misc/help/envelope: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ENVELOPE 3 | 4 | SUMMARY: 5 | Computes the envelope function using a Hilbert transform. 6 | 7 | SYNTAX: 8 | ENVELOPE 9 | 10 | DESCRIPTION: 11 | This command computes the envelope function of the data in memory. The 12 | envelope is defined by: where x(n) is the original signal and y(n) its 13 | Hilbert transform (see HILBERT.) As with HILBERT, very long period data 14 | should be decimated (see DECIMATE) prior to processing. 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | SEE COMMANDS: 20 | HILBERT, DECIMATE 21 | 22 | 23 | ACKNOWLEDGEMENT: The subroutines used to perform the Hilbert transform were 24 | designed and developed by Dave Harris. 25 | 26 | LATEST REVISION: 27 | April 21, 1989 (Version 10.4c) 28 | -------------------------------------------------------------------------------- /misc/help/erase: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ERASE 3 | 4 | SUMMARY: 5 | Erases the graphics display area. 6 | 7 | SYNTAX: 8 | ERASE 9 | 10 | DESCRIPTION: 11 | This command works only if SAC knows what graphics device you are using. 12 | This is true only if you have already done some plotting. 13 | This command is necessary for the ADM terminal which does not have an 14 | erase screen key and is useful in command files when you want the screen 15 | erased prior to sending out a large amount of text. 16 | 17 | LATEST REVISION: 18 | October 11, 1984 (Version 9.1) 19 | -------------------------------------------------------------------------------- /misc/help/exp: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual EXP 3 | 4 | SUMMARY: 5 | Computes the exponential of each data point. 6 | 7 | SYNTAX: 8 | EXP 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | LATEST REVISION: 20 | January 15, 1985 (Version 9.10) 21 | -------------------------------------------------------------------------------- /misc/help/exp10: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual EXP10 3 | 4 | SUMMARY: 5 | Computes the base 10 exponential (10.**y) of each data point. 6 | 7 | SYNTAX: 8 | EXP10 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | LATEST REVISION: 20 | January 15, 1985 (Version 9.10) 21 | -------------------------------------------------------------------------------- /misc/help/filenumber: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual FILENUMBER 3 | 4 | SUMMARY: 5 | Controls the file number display found on most SAC plots. 6 | 7 | SYNTAX: 8 | FILENUMBER {ON|OFF} 9 | 10 | INPUT: 11 | FILENUMBER ON : Turn on file number option. 12 | 13 | FILENUMBER {OFF} : Turn off file number option. 14 | 15 | 16 | DEFAULT VALUES: 17 | FILENUMBER OFF 18 | 19 | DESCRIPTION: 20 | This command controls the file number that is displayed on most SAC plots. 21 | When filenumber is on, the file number appears on the plot. This can be 22 | used to identify a specific waveform by number when a command requires 23 | the information. 24 | 25 | EXAMPLES: 26 | 27 | 28 | LATEST REVISION: 29 | February 5, 1997 (Version 53) 30 | -------------------------------------------------------------------------------- /misc/help/floor: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual FLOOR 3 | 4 | SUMMARY: 5 | Puts a minimum value on logarithmically scaled data. 6 | 7 | SYNTAX: 8 | FLOOR {ON|OFF|v} 9 | 10 | INPUT: 11 | {ON} : Turn floor option on but don't change value of floor. 12 | 13 | OFF : Turn floor option off. 14 | 15 | v : Turn floor option on and change value of floor. 16 | 17 | DEFAULT VALUES: 18 | FLOOR 1.0E-10 19 | 20 | DESCRIPTION: 21 | The floor option applies only when logarithmic scaling is being used. It 22 | applies to both the x and y axes. When this option is on, any data values 23 | less than the floor are set to the floor before plotting. By using a small 24 | positive value for the floor, errors in taking logarithms of non-positive 25 | numbers are avoided. 26 | 27 | LATEST REVISION: 28 | January 8, 1983 (Version 8.0) 29 | -------------------------------------------------------------------------------- /misc/help/grid: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual GRID 3 | 4 | SUMMARY: 5 | Controls the plotting of grid lines in plots. 6 | 7 | SYNTAX: 8 | GRID {ON|OFF|SOLID|DOTTED} 9 | 10 | INPUT: 11 | ON : Turn grid plotting on but don't change grid type. 12 | 13 | OFF : Turn grid plotting off. 14 | 15 | SOLID : Turn grid plotting on using solid grid lines. 16 | 17 | DOTTED : Turn grid plotting on using dotted grid lines. 18 | 19 | DEFAULT VALUES: 20 | GRID OFF 21 | 22 | 23 | FUNCTIONAL MODULE: Graphic Environment 24 | 25 | DESCRIPTION: 26 | This command controls grid lines in both directions. The XGRID and YGRID 27 | commands can be used to generate grid lines in only one direction. 28 | 29 | SEE COMMANDS: 30 | XGRID, YGRID 31 | 32 | LATEST REVISION: 33 | January 8, 1983 (Version 8.0) 34 | -------------------------------------------------------------------------------- /misc/help/hanning: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual HANNING 3 | 4 | SUMMARY: 5 | Applies a "hanning" window to each data file. 6 | 7 | SYNTAX: 8 | HANNING 9 | 10 | DESCRIPTION: 11 | The "hanning" window is a recursive smoothing algorithm defined at each 12 | interior data point, j, as: 13 | 14 | Y(j) = 0.25*Y(j-1) + 0.50*Y(j) + 0.25*Y(j+1) 15 | 16 | Each end point is set equal to its closest interior point. 17 | 18 | ERROR MESSAGES: 19 | 1301: No data files read in. 20 | 21 | 1306: Illegal operation on unevenly spaced file 22 | 23 | 24 | HEADER CHANGES: 25 | DEPMIN, DEPMAX, DEPMEN Blackman and Tukey, "The Measurement of Power Spectra", 26 | Dover Publications, New York, 1958. 27 | 28 | LATEST REVISION: 29 | January 8, 1983 (Version 8.0) 30 | -------------------------------------------------------------------------------- /misc/help/inicm: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual INICM 3 | 4 | SUMMARY: 5 | Reinitializes all of SAC's common blocks. 6 | 7 | SYNTAX: 8 | INICM 9 | 10 | DESCRIPTION: 11 | This command can be used at any time to put SAC back into its initial state. 12 | All active graphics devices are terminated and the graphics library ended. 13 | All common blocks are reinitialized to their original values. All data in 14 | memory is lost. 15 | 16 | LATEST REVISION: 17 | January 8, 1983 (Version 8.0) 18 | -------------------------------------------------------------------------------- /misc/help/installmacro: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual INSTALLMACRO 3 | 4 | SUMMARY: 5 | Installs macro files in the global SAC macro directory. 6 | 7 | SYNTAX: 8 | INSTALLMACRO name {name ...} 9 | 10 | INPUT: 11 | name : The name of a SAC macro file. 12 | 13 | DESCRIPTION: 14 | This command lets you install your macro files into the global SAC macro 15 | directory so they can be used by anyone on your system. The location of this 16 | directory is defined by the SACAUX environmental variable, as SACAUX/macros. 17 | See the section on Macros in the SAC Users Manual. 18 | 19 | SEE COMMANDS: 20 | MACRO 21 | 22 | LATEST REVISION: 23 | March 20, 1992, (version 10.6e) 24 | -------------------------------------------------------------------------------- /misc/help/int: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual INT 3 | 4 | SUMMARY: 5 | Performs integration using the trapezoidal or rectangular rule. 6 | 7 | SYNTAX: 8 | INT TRAPEZOIDAL | RECTANGULAR 9 | 10 | DEFAULT VALUES: 11 | INT TRAPEZOIDAL 12 | 13 | DESCRIPTION: 14 | This command uses the trapezoidal or rectangular integration method. The 15 | first output data point is set to zero. If the trapezoidal option is used, 16 | the number of points is reduced by one. The data does not have to be evenly 17 | spaced. 18 | 19 | ERROR MESSAGES: 20 | 1301: No data files read in. 21 | 22 | 1307: Illegal operation on spectral file 23 | 24 | 25 | HEADER CHANGES: 26 | DEPMIN, DEPMAX, DEPMIN 27 | 28 | LATEST REVISION: 29 | March 20, 1992 (Version 10.6e) 30 | -------------------------------------------------------------------------------- /misc/help/keepam: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual KEEPAM 3 | 4 | SUMMARY: 5 | Keep amplitude component of spectral files (of either the AMPH or RLIM 6 | format) in SAC memory. 7 | 8 | SYNTAX: 9 | KEEPAM 10 | 11 | DESCRIPTION: 12 | This command is an easy way for users to drop the phase component, so that 13 | the amplitude data may be subjected to algebraic operations which require 14 | single-dimensional data. If the files exist in the RLIM format, the data is 15 | first converted to the AMPH format, before phase is dropped. The resulting 16 | data files containing the amplitude component will exist as as generic xy 17 | files, so that they can be distinguished for time-domain files. May 28, 1991 18 | (Version 10.5c) 19 | -------------------------------------------------------------------------------- /misc/help/khronhite: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual KHRONHITE 3 | 4 | SUMMARY: 5 | Applies a Khronhite filter to the data. 6 | 7 | SYNTAX: 8 | KHRONHITE {v} 9 | 10 | INPUT: 11 | v : Cutoff frequency in hertz. 12 | 13 | DEFAULT VALUES: 14 | KHRONHITE 2.0 15 | 16 | DESCRIPTION: 17 | This lowpass filter is a digital approximation of an analog filter which was 18 | a cascade of two fourth-order Butterworth lowpass filters. This lowpass 19 | filter has been used with a corner frequency of 0.1 Hz to enhance 20 | measurements of the amplitudes of the fundamental mode Rayleigh wave (Rg) at 21 | regional distances. 22 | 23 | HEADER CHANGES: 24 | DEPMIN, DEPMAX, DEPMEN 25 | 26 | LATEST REVISION: 27 | February 15, 1987 28 | -------------------------------------------------------------------------------- /misc/help/linefit: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LINEFIT 3 | 4 | SUMMARY: 5 | Computes the best straight line fit to the data in memory and writes 6 | the results to header blackboard variables. 7 | 8 | SYNTAX: 9 | LINEFIT 10 | 11 | DESCRIPTION: 12 | A least squares curve fit to a straight line is calculated. The slope, 13 | y intercept, standard deviation of the slope, standard deviation of the 14 | y intercept, standard deviation of the data and correlation coefficient 15 | between the data and the linear fit are written to blackboard variables 16 | SLOPE, YINT, SDSLOPE, SDYINT, SDDATA and CORRCOEF respectively. The 17 | data does not have to be evenly spaced. 18 | 19 | ERROR MESSAGES: 20 | 1301: No data files read in. 21 | 22 | 1307: Illegal operation on spectral file 23 | 24 | 25 | HEADER CHANGES: 26 | none 27 | 28 | LATEST REVISION: 29 | September 12, 1995 (Version 00.38) 30 | -------------------------------------------------------------------------------- /misc/help/linlin: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LINLIN 3 | 4 | SUMMARY: 5 | Turns on linear scaling for the x and y axes. 6 | 7 | SYNTAX: 8 | LINLIN 9 | 10 | DEFAULT VALUES: 11 | Linear scaling for both axes. 12 | 13 | SEE COMMANDS: 14 | LINLOG, LOGLOG, LOGLIN 15 | 16 | LATEST REVISION: 17 | January 8, 1983 (Version 8.0) 18 | -------------------------------------------------------------------------------- /misc/help/linlog: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LINLOG 3 | 4 | SUMMARY: 5 | Turns on linear scaling for x axis and logarithmic for y axis. 6 | 7 | SYNTAX: 8 | LINLOG 9 | 10 | DEFAULT VALUES: 11 | Linear scaling for both axes. 12 | 13 | SEE COMMANDS: 14 | LINLIN, LOGLOG, LOGLIN 15 | 16 | LATEST REVISION: 17 | January 8, 1983 (Version 8.0) 18 | -------------------------------------------------------------------------------- /misc/help/log: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LOG 3 | 4 | SUMMARY: 5 | Takes the natural logarithm of each data point. 6 | 7 | SYNTAX: 8 | LOG 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 1340: data points outside allowed range contained in file 16 | 17 | - All data points must be positive. 18 | 19 | HEADER CHANGES: 20 | DEPMIN, DEPMAX, DEPMEN 21 | 22 | LATEST REVISION: 23 | January 15, 1985 (Version 9.10) 24 | -------------------------------------------------------------------------------- /misc/help/log10: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LOG10 3 | 4 | SUMMARY: 5 | Takes the base 10 logarithm of each data point. 6 | 7 | SYNTAX: 8 | LOG10 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 1340: data points outside allowed range contained in file 16 | 17 | - All data points must be positive. 18 | 19 | HEADER CHANGES: 20 | DEPMIN, DEPMAX, DEPMEN 21 | 22 | LATEST REVISION: 23 | January 15, 1985 (Version 9.10) 24 | -------------------------------------------------------------------------------- /misc/help/loglab: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LOGLAB 3 | 4 | SUMMARY: 5 | Controls labels on logarithmically scaled axes. 6 | 7 | SYNTAX: 8 | LOGLAB {ON|OFF} 9 | 10 | INPUT: 11 | {ON} : Turn log labeling option on. 12 | 13 | OFF : Turn log labeling option off. 14 | 15 | DEFAULT VALUES: 16 | LOGLAB ON 17 | 18 | DESCRIPTION: 19 | Labels are normally put on each decade of logarithmically interpolated axes. 20 | Secondary labels (ones between full decades) are placed on these axes if this 21 | option is on and if there is enough room. 22 | 23 | LATEST REVISION: 24 | January 8, 1983 (Version 8.0) 25 | -------------------------------------------------------------------------------- /misc/help/loglin: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LOGLIN 3 | 4 | SUMMARY: 5 | Turns on logarithmic scaling for x axis and linear for y axis. 6 | 7 | SYNTAX: 8 | LOGLIN 9 | 10 | DEFAULT VALUES: 11 | Linear scaling for both axes. 12 | 13 | SEE COMMANDS: 14 | LINLIN, LINLOG, LOGLOG 15 | 16 | LATEST REVISION: 17 | January 8, 1983 (Version 8.0) 18 | -------------------------------------------------------------------------------- /misc/help/loglog: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual LOGLOG 3 | 4 | SUMMARY: 5 | Turns on logarithmic scaling for the x and y axes. 6 | 7 | SYNTAX: 8 | LOGLOG 9 | 10 | DEFAULT VALUES: 11 | Linear scaling for both axes. 12 | 13 | SEE COMMANDS: 14 | LINLIN, LINLOG, LOGLIN 15 | 16 | LATEST REVISION: 17 | January 8, 1983 (Version 8.0) 18 | -------------------------------------------------------------------------------- /misc/help/macro: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual MACRO 3 | 4 | SUMMARY: 5 | Executes a SAC macro file. 6 | 7 | SYNTAX: 8 | MACRO name {arguments} 9 | 10 | INPUT: 11 | name : The name of the SAC macro to execute. 12 | 13 | arguments : The arguments (if any) of the macro. 14 | 15 | DESCRIPTION: 16 | A SAC macro is a file that contains a set of SAC commands that you want to 17 | execute as a group. You can pass arguments to the macro, define default 18 | values for these arguments, evaluate blackboard and header variables within 19 | the body of a macro, etc. The macro file can be in the current directory, in 20 | a predefined directory you specify using the SETMACRO command, or in the 21 | global SAC macro directory. See the section on Macros in the SAC Users Manual. 22 | 23 | SEE COMMANDS: 24 | SETMACRO, INSTALLMACRO 25 | 26 | LATEST REVISION: 27 | May 15, 1987 (Version 10.2) 28 | -------------------------------------------------------------------------------- /misc/help/message: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual MESSAGE 3 | 4 | SUMMARY: 5 | Sends a message to the user's terminal. 6 | 7 | SYNTAX: 8 | MESSAGE text 9 | 10 | INPUT: 11 | text : Text of message to be sent. If there are blanks in the message 12 | it must be enclosed within single quotes. 13 | 14 | DESCRIPTION: 15 | This command is useful within macro files to send status or informational 16 | messages to the user while the macro file is executing. It is not 17 | particularly useful in the interactive mode (unless you like to talk to 18 | yourself.) 19 | 20 | EXAMPLES: 21 | To send a message without any blanks: 22 | 23 | u: MESSAGE FINISHED 24 | 25 | s: FINISHED 26 | 27 | To send a message with blanks, you must use single or double quotes: 28 | 29 | u: MESSAGE 'Job has finished.' 30 | 31 | s: Job has finished. 32 | 33 | 34 | LATEST REVISION: 35 | January 8, 1983 (Version 8.0) 36 | -------------------------------------------------------------------------------- /misc/help/mulomega: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual MULOMEGA 3 | 4 | SUMMARY: 5 | Performs differentiation in the frequency domain. 6 | 7 | DESCRIPTION: 8 | This command multiplies each point of a spectral file by its frequency given 9 | by: 10 | 11 | OMEGA = 2.0 * PI * FREQ 12 | 13 | This is analogous to differentiating the equivalent time series file. The 14 | spectral file can in either amplitude-phase or real-imaginary format. 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | LATEST REVISION: 20 | May 15, 1987 (Version 10.2) 21 | -------------------------------------------------------------------------------- /misc/help/news: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual NEWS 3 | 4 | SUMMARY: 5 | Prints current news concerning SAC. 6 | 7 | SYNTAX: 8 | NEWS 9 | 10 | DESCRIPTION: 11 | If there is news to report, a "headline" will usually be written to the 12 | terminal when you start up SAC. You can then type NEWS if you want to see 13 | details. 14 | 15 | LATEST REVISION: 16 | January 8, 1983 (Version 8.0) 17 | -------------------------------------------------------------------------------- /misc/help/null: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual NULL 3 | 4 | SUMMARY: 5 | Controls the plotting of null values. 6 | 7 | SYNTAX: 8 | NULL {ON|OFF|value} 9 | 10 | INPUT: 11 | ON : Turns the NULL option on for plotting. 12 | 13 | OFF : Turns the NULL option off for plotting. 14 | 15 | value : Sets the value of a NULL to be value. 16 | 17 | DEFAULT VALUES: 18 | NULL OFF 19 | 20 | DESCRIPTION: 21 | Many times in a data set, when there are gaps in the data, no data is 22 | available. In many cases the data has been set to a predefined value. 23 | Typical values are 0.0, -1.0, -99. Usually the user will not want these 24 | values displayed on plots. The NULL command allows the user to define the 25 | NULL value and not connect a line through these data points. To set the NULL 26 | value to -1.0 and enable the NULL option during plotting: 27 | 28 | u: NULL ON -1.0 29 | 30 | 31 | LATEST REVISION: 32 | March 20, 1992 (Version 10.6e) 33 | -------------------------------------------------------------------------------- /misc/help/print: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual PRINT 3 | 4 | SUMMARY: 5 | Prints the most recent SGF file. This command requires that at least 6 | one SGF file has been produced. 7 | 8 | SYNTAX: 9 | PRINT {printer} 10 | 11 | INPUT: 12 | printer : sends output to the named printer, if no printer name is 13 | supplied, it will print to the system's default printer. 14 | 15 | Note: PRINT will not work if the SGF device has remained off since boot. 16 | Use BEGINDEVICES to turn on the SGF device. Use the SGF command 17 | to set prefered behavior for the SGF device. 18 | The SGF command has an overwrite option which prevents disk file 19 | buildup by clobbering previous SGF files with the new ones. 20 | 21 | DEFAULT VALUES: 22 | PRINT 23 | 24 | 25 | ERROR MESSAGES: 26 | 2405: Cannot PRINT: no SGF files produced. 27 | 28 | 29 | SEE COMMANDS: 30 | SGF, BEGINDEVICES 31 | 32 | LATEST REVISION: 33 | April 22, 1999 (Version 0.58) 34 | -------------------------------------------------------------------------------- /misc/help/production: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual PRODUCTION 3 | 4 | SUMMARY: 5 | Controls the production mode option. 6 | 7 | SYNTAX: 8 | PRODUCTION ON|OFF 9 | 10 | INPUT: 11 | ON : Turn production mode option on. 12 | 13 | OFF : Turn production mode option off. 14 | 15 | DEFAULT VALUES: 16 | PROD OFF 17 | 18 | DESCRIPTION: 19 | When this option is on, fatal errors terminate SAC immediately. When this 20 | option if off, control is returned to the terminal after fatal errors. 21 | 22 | LATEST REVISION: 23 | January 8, 1983 (Version 8.0) 24 | -------------------------------------------------------------------------------- /misc/help/quit: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual QUIT 3 | 4 | SUMMARY: 5 | Terminates SAC. 6 | 7 | SYNTAX: 8 | QUIT 9 | 10 | ALTERNATE FORMS: 11 | END, EXIT, and DONE are also allowed. 12 | 13 | DESCRIPTION: 14 | This command terminates SAC gracefully. (There are a number of ways to 15 | terminate it ungracefully!) Before terminating, SAC ends all active graphics 16 | devices, closes all output files, and destroys any temporary files it has 17 | created. 18 | 19 | LATEST REVISION: 20 | October 11, 1984 (Version 9.1) 21 | -------------------------------------------------------------------------------- /misc/help/quitsub: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual QUITSUB 3 | 4 | SUMMARY: 5 | Terminates the currently active subprocess. 6 | 7 | SYNTAX: 8 | QUITSUB 9 | 10 | DESCRIPTION: 11 | This command terminates the currently active subprocess, returning to the 12 | main SAC command environment. Files in memory are retained. There are 13 | currently two subprocesses available in SAC: 14 | 15 | SES Spectral Estimation Subproess 16 | 17 | SSS Signal Stacking Subprocess 18 | 19 | 20 | SEE COMMANDS: 21 | SES, SSS 22 | 23 | LATEST REVISION: 24 | October 11, 1984 (Version 9.1) 25 | -------------------------------------------------------------------------------- /misc/help/readbbf: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual READBBF 3 | 4 | SUMMARY: 5 | Reads a blackboard variable file into memory. 6 | 7 | SYNTAX: 8 | READBBF {file} 9 | 10 | INPUT: 11 | file : The name of a blackboard variable file. It may be a simple 12 | filename or a relative or absolute pathname. 13 | 14 | DEFAULT VALUES: 15 | READBBF BBF 16 | 17 | DESCRIPTION: 18 | This command lets you read in a blackboard variable file. This file must have 19 | been previously written to disk using the WRITEBBF command. This feature lets 20 | you save information from one execution of SAC to another. You can also add 21 | coding to your own programs to access the information in these blackboard 22 | variable files. This lets you transfer information between your own programs 23 | and SAC. See the SAC Subroutines Reference Manual for details. 24 | 25 | SEE COMMANDS: 26 | WRITEBBF, SETBB, GETBB 27 | 28 | LATEST REVISION: 29 | May 15, 1987 (Version 10.2) 30 | -------------------------------------------------------------------------------- /misc/help/reverse: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual REVERSE 3 | 4 | SUMMARY: 5 | Reverse the order of data points. 6 | 7 | SYNTAX: 8 | REVERSE 9 | 10 | DESCRIPTION: 11 | This command reverses the order of data points in each file in memory. 12 | 13 | LATEST REVISION: 14 | May 15, 1987 (Version 10.2) 15 | -------------------------------------------------------------------------------- /misc/help/rmean: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual RMEAN 3 | 4 | SUMMARY: 5 | Removes the mean. 6 | 7 | SYNTAX: 8 | RMEAN 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 16 | HEADER CHANGES: 17 | DEPMEN 18 | 19 | LATEST REVISION: 20 | October 11, 1984 (Version 9.1) 21 | -------------------------------------------------------------------------------- /misc/help/setdevice: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual SETDEVICE 3 | 4 | SUMMARY: 5 | Defines a default graphics device to use in subsequent plots. 6 | 7 | SYNTAX: 8 | SETDEVICE name 9 | 10 | INPUT: 11 | name : The name of a graphics device. 12 | 13 | DESCRIPTION: 14 | This command lets you define the name of a default graphics device to use in 15 | subsequent plots. This command is only useful before you do any plotting. It 16 | should be placed in your default macro file. You can override the name 17 | specified in this command by using the BEGINDEVICES command. See the section 18 | on Graphics Devices in the SAC Users Manual. Also see the section on Macros 19 | for information on specifying and using a default macro file. 20 | 21 | SEE COMMANDS: 22 | BEGINDEVICES 23 | 24 | LATEST REVISION: 25 | May 15, 1987 (Version 10.2) 26 | -------------------------------------------------------------------------------- /misc/help/spe_dir/plotspe: -------------------------------------------------------------------------------- 1 | PLOTSPE 2 | 3 | 4 | SUMMARY: Plots the spectral estimate. 5 | 6 | SYNTAX: [P]LOT[SPE] {[P]OWER|[L]OG|[A]MPLITUDE}, 7 | {[C]ONFIDENCE {ON|OFF}} 8 | 9 | INPUT: 10 | POWER Plot the power response using linear interpolation. 11 | LOG Plot the power response using logarithmic interpolation. 12 | AMPLITUDE Plot the amplitude response. 13 | CONFIDENCE {ON} Include confidence limits on the plot. 14 | CONFIDENCE OFF Do not include confidence limits. 15 | 16 | DEFAULT VALUES: PLOTSP POWER CONFIDENCE OFF 17 | 18 | 19 | DESCRIPTION 20 | The plot includes a legend describing the parameters used to calculate 21 | the correlation function and the spectral estimate. 22 | 23 | ERROR MESSAGES: 5004 No spectral estimate claculated. 24 | 25 | -------------------------------------------------------------------------------- /misc/help/spe_dir/quitsub: -------------------------------------------------------------------------------- 1 | QUITSUB 2 | 3 | SUMMARY: Terminates a SAC subprocess. 4 | 5 | SYNTAX: [Q]UIT[S]UB 6 | 7 | 8 | DESCRIPTION 9 | SAC has several subprocesses which act like separate programs. 10 | Use this command to exit one of these subprocesses and return to the 11 | main SAC program. 12 | 13 | -------------------------------------------------------------------------------- /misc/help/spe_dir/read: -------------------------------------------------------------------------------- 1 | READ 2 | 3 | SUMMARY: Reads data from a SAC data file into memory. 4 | 5 | SYNTAX: [R]EAD file 6 | 7 | INPUT: file A legal filename. 8 | 9 | 10 | 11 | DESCRIPTION 12 | This command works just like the READ command in the main SAC program 13 | with two exceptions. 14 | First, only ONE file may be read in while in SPE. 15 | Second, executing this command deletes any correlation function or 16 | spectral estimate that may already have been computed. 17 | Parameters within SPE, such as the number of prewhitening coefficients 18 | or the window type and length, are not changed when this command 19 | is executed. 20 | To reinitialize all SPE parameters, terminate the subprocess using 21 | the QUITSUB command and then start it over again. 22 | 23 | SEE COMMANDS: QUITSUB 24 | 25 | -------------------------------------------------------------------------------- /misc/help/spe_dir/writespe: -------------------------------------------------------------------------------- 1 | WRITESPE 2 | 3 | SUMMARY: Writes a SAC file containing the spectral estimate. 4 | 5 | SYNTAX: [W]RITE[SPE] {file} 6 | 7 | INPUT: file The name of the SAC file to write. 8 | 9 | DEFAULT VALUES: WRITESPE SPE 10 | 11 | 12 | DESCRIPTION 13 | The spectral estimate file contains the spectral estimate from 14 | zero up to the folding frequency. 15 | The spectral estimate is calculated with an FFT. 16 | The number of points in this file is half the length of the FFT used 17 | plus one. 18 | This format was chosen so that multiple spectra computed with SPE could 19 | be compared using the P2 plotting function, without any need to cut the 20 | files prior to plotting. 21 | 22 | ERROR MESSAGES: 5004:No spectral estimate calculated. 23 | 24 | -------------------------------------------------------------------------------- /misc/help/sqr: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual SQR 3 | 4 | SUMMARY: 5 | Squares each data point. 6 | 7 | SYNTAX: 8 | SQR 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 16 | HEADER CHANGES: 17 | DEPMIN, DEPMAX, DEPMEN 18 | 19 | LATEST REVISION: 20 | January 8, 1983 (Version 8.0) 21 | -------------------------------------------------------------------------------- /misc/help/sqrt: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual SQRT 3 | 4 | SUMMARY: 5 | Takes the square root of each data point. 6 | 7 | SYNTAX: 8 | SQRT 9 | 10 | ERROR MESSAGES: 11 | 1301: No data files read in. 12 | 13 | 1307: Illegal operation on spectral file 14 | 15 | 1702: Non-positive values found in file 16 | 17 | 18 | HEADER CHANGES: 19 | DEPMIN, DEPMAX, DEPMEN 20 | 21 | LATEST REVISION: 22 | January 8, 1983 (Version 8.0) 23 | -------------------------------------------------------------------------------- /misc/help/sss_dir/deletestack: -------------------------------------------------------------------------------- 1 | DELETESTACK 2 | 3 | SUMMARY: 4 | Deletes one or more files from the stack file list. 5 | 6 | SYNTAX: 7 | [D]ELETE[S]TACK filename|filenumber {filename|filenumber...} 8 | 9 | INPUT: 10 | 11 | filename: The name of the file in the stack file list. 12 | 13 | filenumber: The number of the file in the stack file list. 14 | 15 | TYPE: Parameter-setting 16 | 17 | EXAMPLES: See the example for the ADDSTACK command. 18 | 19 | ERROR MESSAGES: 5106: File name not in file list 20 | 5107: File number not in file list 21 | 22 | SEE COMMANDS: ADDSTACK 23 | 24 | -------------------------------------------------------------------------------- /misc/help/sss_dir/liststack: -------------------------------------------------------------------------------- 1 | LISTSTACK 2 | 3 | SUMMARY: Lists the properties of the files in the stack file list. 4 | 5 | SYNTAX: [L]IST[S]TACK {[N]ARROW |[W]IDE} 6 | 7 | INPUT: 8 | NARROW Use the narrow report format. Two lines of about 9 | 70 characters in width are output for each file. 10 | WIDE Use the wide report format. A single line of about 11 | 120 characters in width is output for each file. 12 | 13 | DEFAULT VALUES: LISTSTACK NARROW 14 | 15 | TYPE: Action-producing 16 | 17 | -------------------------------------------------------------------------------- /misc/help/sss_dir/timewindow: -------------------------------------------------------------------------------- 1 | TIMEWINDOW 2 | 3 | SUMMARY: Sets the time window limits for subsequent stack summations. 4 | 5 | SYNTAX: [T]IME[W]INDOW v1 v2 6 | 7 | INPUT 8 | v1 v2 The time window limits to use when reading in files 9 | before doing a stack summation. 10 | 11 | DEFAULT VALUES: None. You MUST specify a time window before 12 | doing a summation (see SUMSTACK.) 13 | 14 | DESCRIPTION 15 | This command sets the stack time window. 16 | This is the time window that will be used in subsequent SUMSTACK 17 | PLOTSTACK, and PLOTRECORDSECTION commands. 18 | The stack time window must be defined before any of these commands are executed. 19 | If a particular file does not fall entirely within this stack time window 20 | enough zeros are added before or after the actual data to make up the difference. 21 | 22 | SEE COMMANDS: SUMSTACK, PLOTSTACK, PLOTRECORDSECTION 23 | 24 | -------------------------------------------------------------------------------- /misc/help/sss_dir/velocityroset: -------------------------------------------------------------------------------- 1 | VELOCITYROSET 2 | 3 | SUMMARY: Controls the placement of a velocity roset 4 | on subsequent record section plots. 5 | 6 | SYNTAX: [V]ELOCITY[R]OSET [ON|OFF] [[L]OCATION UL|UR|LL|LR] 7 | 8 | INPUT: 9 | ON | OFF Turn velocity roset plotting option on or off. 10 | 11 | LOCATION UL|UR|LL|LR Change location on plot of velocity roset. 12 | Locations are respectively upper left, 13 | upper right, lower left, and lower right 14 | of the record section plot. 15 | 16 | DEFAULTS: VELOCITYROSET OFF LOCATION LL 17 | 18 | TYPE: Parmeter-setting 19 | 20 | -------------------------------------------------------------------------------- /misc/help/sss_dir/zerostack: -------------------------------------------------------------------------------- 1 | ZEROSTACK 2 | 3 | SUMMARY: Zeros or reinitializes the signal stack. 4 | 5 | SYNTAX: [Z]ERO[S]TACK 6 | 7 | DESCRIPTION 8 | This command zeros the signal stack. 9 | It deletes all entries in the stack file list 10 | and sets the global stack properties back to their original values. 11 | 12 | -------------------------------------------------------------------------------- /misc/help/syntax: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual SYNTAX 3 | 4 | SUMMARY: 5 | Prints basic information about SAC commands. 6 | 7 | SYNTAX: 8 | SYNTAX {item ...} 9 | 10 | INPUT: 11 | item : The (full or abbreviated) name of a command. 12 | 13 | DESCRIPTION: 14 | This is like the HELP command with two exceptions: 15 | 16 | (1) Only the SUMMARY and SYNTAX sections are printed. 17 | 18 | (2) Only commands are printed. 19 | 20 | 21 | ERROR MESSAGES: 22 | 1103: No help package is available. 23 | 24 | - SAC can't find the help package. Contact the programmer. 25 | 1105: Error reading help information for 26 | 27 | - Usually a transient system glitch has occurred. Contact the programmer if 28 | this error persists. 29 | 30 | SEE COMMANDS: 31 | HELP January 8, 1983 (Version 8.0) 32 | -------------------------------------------------------------------------------- /misc/help/systemcommand: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual SYSTEMCOMMAND 3 | 4 | SUMMARY: 5 | Executes system commands from SAC. 6 | 7 | SYNTAX: 8 | SYSTEMCOMMAND command {options} 9 | 10 | INPUT: 11 | command : The name of the system command. 12 | 13 | options : Any options needed by that command. 14 | 15 | DESCRIPTION: 16 | This command allows you to execute system command while running SAC. 17 | 18 | EXAMPLES: 19 | To get a list of files in the current UNIX directory: 20 | 21 | u: SYSTEMCOMMAND LS 22 | 23 | s: ... produces a list of files 24 | 25 | 26 | LATEST REVISION: 27 | May 15, 1987 (Version 10.2) 28 | -------------------------------------------------------------------------------- /misc/help/writebbf: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual WRITEBBF 3 | 4 | SUMMARY: 5 | Writes a blackboard variable file to disk. 6 | 7 | SYNTAX: 8 | WRITEBBF {file} 9 | 10 | INPUT: 11 | file : The name of a blackboard variable file. It may be a simple 12 | filename or a relative or absolute pathname. 13 | 14 | DEFAULT VALUES: 15 | WRITEBBF BBF 16 | 17 | DESCRIPTION: 18 | This command lets you write a blackboard variable file to disk. It can later 19 | be read into SAC using the READBBF command. This feature lets you save 20 | information from one execution of SAC to another. You can also add coding to 21 | your own programs to access the information in these blackboard variable 22 | files. This lets you transfer information between your own programs and SAC. 23 | See the SAC Subroutines Reference Manual for details. 24 | 25 | SEE COMMANDS: 26 | READBBF, SETBB, GETBB 27 | 28 | LATEST REVISION: 29 | May 15, 1987 (Version 10.2) 30 | -------------------------------------------------------------------------------- /misc/help/xfull: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual XFULL 3 | 4 | SUMMARY: 5 | Controls plotting of x axis full logarithmic decades. 6 | 7 | SYNTAX: 8 | XFULL {ON|OFF} 9 | 10 | INPUT: 11 | {ON} : Turn full decade plotting on. 12 | 13 | OFF : Turn full decade plotting off. 14 | 15 | DEFAULT VALUES: 16 | XFULL ON 17 | 18 | DESCRIPTION: 19 | Full decade plotting applies only when logarithmic interpolation is being 20 | used and when the fixed limits option is off (see XLIM.) When on, the actual 21 | axis limits will be set to the first full decade before and after the data 22 | limits. When off, the actual data limits will be used. 23 | 24 | SEE COMMANDS: 25 | XLIM 26 | 27 | LATEST REVISION: 28 | January 8, 1983 (Version 8.0) 29 | -------------------------------------------------------------------------------- /misc/help/xgrid: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual XGRID 3 | 4 | SUMMARY: 5 | Controls plotting of grid lines in the x direction. 6 | 7 | SYNTAX: 8 | XGRID {ON|OFF|SOLID|DOTTED} 9 | 10 | INPUT: 11 | {ON} : Turn x axis grid plotting on but don't change grid type. 12 | 13 | OFF : Turn x axis grid plotting off. 14 | 15 | SOLID : Turn x axis grid plotting on using solid grid lines. 16 | 17 | DOTTED : Turn x axis grid plotting on using dotted grid lines. 18 | 19 | DEFAULT VALUES: 20 | XGRID OFF 21 | 22 | DESCRIPTION: 23 | This command controls only x grid lines. The GRID command can be used to 24 | control grid lines in both directions. 25 | 26 | SEE COMMANDS: 27 | GRID 28 | 29 | LATEST REVISION: 30 | January 8, 1983 (Version 8.0) 31 | -------------------------------------------------------------------------------- /misc/help/xlin: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual XLIN 3 | 4 | SUMMARY: 5 | Turns on linear scaling for the x axis. 6 | 7 | SYNTAX: 8 | XLIN 9 | 10 | DEFAULT VALUES: 11 | Linear scaling. 12 | 13 | LATEST REVISION: 14 | January 8, 1983 (Version 8.0) 15 | -------------------------------------------------------------------------------- /misc/help/xlog: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual XLOG 3 | 4 | SUMMARY: 5 | Turns on logarithimic scaling for the x axis. 6 | 7 | SYNTAX: 8 | XLOG 9 | 10 | DEFAULT VALUES: 11 | Linear scaling. 12 | 13 | LATEST REVISION: 14 | January 8, 1983 (Version 8.0) 15 | -------------------------------------------------------------------------------- /misc/help/yfudge: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual YFUDGE 3 | 4 | SUMMARY: 5 | Changes the y axis "fudge factor." 6 | 7 | SYNTAX: 8 | YFUDGE ON|OFF|v 9 | 10 | INPUT: 11 | ON : Turn fudge option on but don't change fudge factor. 12 | 13 | OFF : Turn fudge option off. 14 | 15 | v : Turn fudge option on and change fudge factor to v. 16 | 17 | DEFAULT VALUES: 18 | YFUDGE 0.03 19 | 20 | DESCRIPTION: 21 | When this option is on, the actual axis limits are changed by a "fudge 22 | factor". The algorithm for a linearly scaled axis is: 23 | 24 | YDIFF=YFUDGE*(YMAX-YMIN) 25 | 26 | YMIN=YMIN-YDIFF 27 | 28 | YMAX=YMAX+YDIFF 29 | 30 | where YMIN and YMAX are the data extrema and YFUDGE is the fudge factor. The 31 | algorithm is similiar for logarithmically scaled axes. The fudge option only 32 | applies when the axis limits are scaled to the data extrema (see YLIM.) 33 | 34 | SEE COMMANDS: 35 | YLIM 36 | 37 | LATEST REVISION: 38 | January 8, 1983 (Version 8.0) 39 | -------------------------------------------------------------------------------- /misc/help/yfull: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual YFULL 3 | 4 | SUMMARY: 5 | Controls plotting of y axis full logarithmic decades. 6 | 7 | SYNTAX: 8 | YFULL {ON|OFF} 9 | 10 | INPUT: 11 | {ON} : Turn full decade plotting on. 12 | 13 | OFF : Turn full decade plotting off. 14 | 15 | DEFAULT VALUES: 16 | YFULL ON 17 | 18 | DESCRIPTION: 19 | Full decade plotting applies only when logarithmic scaling is being used and 20 | when the fixed limits option is off (see YLIM.) When on, the actual axis 21 | limits will be set to the first full decade before and after the data limits. 22 | When off, the actual data limits will be used. 23 | 24 | SEE COMMANDS: 25 | YLIM 26 | 27 | LATEST REVISION: 28 | January 8, 1983 (Version 8.0) 29 | -------------------------------------------------------------------------------- /misc/help/ygrid: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual YGRID 3 | 4 | SUMMARY: 5 | Controls plotting of grid lines in the y direction. 6 | 7 | SYNTAX: 8 | YGRID {ON|OFF|SOLID|DOTTED} 9 | 10 | INPUT: 11 | {ON} : Turn y axis grid plotting on but don't change grid type. 12 | 13 | OFF : Turn y axis grid plotting off. 14 | 15 | SOLID : Turn y axis grid plotting on using solid grid lines. 16 | 17 | DOTTED : Turn y axis grid plotting on using dotted grid lines. 18 | 19 | DEFAULT VALUES: 20 | YGRID OFF 21 | 22 | DESCRIPTION: 23 | This command controls only y grid lines. The GRID command can be used to 24 | control grid lines in both directions. 25 | 26 | SEE COMMANDS: 27 | GRID 28 | 29 | LATEST REVISION: 30 | January 8, 1983 (Version 8.0) 31 | -------------------------------------------------------------------------------- /misc/help/ylin: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual YLIN 3 | 4 | SUMMARY: 5 | Turns on linear scaling for the y axis. 6 | 7 | SYNTAX: 8 | YLIN 9 | 10 | DEFAULT VALUES: 11 | Linear scaling. 12 | 13 | LATEST REVISION: 14 | January 8, 1983 (Version 8.0) 15 | -------------------------------------------------------------------------------- /misc/help/ylog: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual YLOG 3 | 4 | SUMMARY: 5 | Turns on logarithimic scaling for the y axis. 6 | 7 | SYNTAX: 8 | YLOG 9 | 10 | DEFAULT VALUES: 11 | Linear scaling. 12 | 13 | LATEST REVISION: 14 | January 8, 1983 (Version 8.0) 15 | -------------------------------------------------------------------------------- /misc/help/zcolors: -------------------------------------------------------------------------------- 1 | 2 | SAC Command Reference Manual ZCOLORS 3 | 4 | SUMMARY: 5 | Controls the color display of contour lines. 6 | 7 | SYNTAX: 8 | ZCOLORS {ON|OFF} {options} 9 | where options is currently limited to: 10 | 11 | LIST c1 c2 ... cn 12 | 13 | More options will be added in the future. 14 | 15 | INPUT: 16 | ON : Turn color display of contour lines on. 17 | 18 | OFF : Turn color display of contour lines off. 19 | 20 | LIST c1 c2 ... cn : Set the list of contour color names to use. Each 21 | entry in this list is used for the corresponding contour level. If 22 | the number of contour levels is larger than the length of this list, 23 | the entire list is repeated. 24 | 25 | cn : The name of a color from SAC's current color table. 26 | 27 | DEFAULT VALUES: 28 | ZCOLORS OFF LIST RED GREEN BLUE 29 | 30 | SEE COMMANDS: 31 | CONTOUR, COLOR 32 | 33 | LATEST REVISION: 34 | April 30, 1990 (Version 10.5b) 35 | -------------------------------------------------------------------------------- /misc/macros/wrxyz: -------------------------------------------------------------------------------- 1 | * macro wrxyz -- write new x,y,z offsets to a SAC file 2 | * syntax: macro wrxyz filename xnew ynew znew 3 | * note: (1) xnew, ynew, znew are expected to be in kilometers, 4 | * by commands in the fks module; 5 | * (2) filename is relative to current dir. 6 | 7 | readhdr $1 8 | message 'file $1 has these values in header for XYZ offsets:' 9 | listhdr user7 user8 user9 10 | evaluate to x $2 11 | evaluate to y $3 12 | evaluate to z $4 13 | chnhdr user7 %x user8 %y user9 %z 14 | message '' 15 | message 'These new XYZ offsets were installed, are now written to disk:' 16 | listhdr user7 user8 user9 17 | writehdr $1 18 | -------------------------------------------------------------------------------- /misc/polezero/llsn: -------------------------------------------------------------------------------- 1 | CONSTANT -3.57425e15 2 | ZEROS 5 3 | POLES 10 4 | -5.026548 3.769911 5 | -5.026548 -3.769911 6 | -0.5969026 0.0 7 | -0.5969026 0.0 8 | -276.460154 0.0 9 | -276.460154 0.0 10 | -376.99112 0.0 11 | -376.99112 0.0 12 | -571.76986 583.32194 13 | -571.76986 -583.32194 14 | -------------------------------------------------------------------------------- /misc/seismogram: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/seismogram -------------------------------------------------------------------------------- /misc/tables.bigendin/iasp91.hed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/tables.bigendin/iasp91.hed -------------------------------------------------------------------------------- /misc/tables.bigendin/iasp91.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/tables.bigendin/iasp91.tbl -------------------------------------------------------------------------------- /misc/tables.littlendin/iasp91.hed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/tables.littlendin/iasp91.hed -------------------------------------------------------------------------------- /misc/tables.littlendin/iasp91.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/SAC2000/c347f4fc367b25b226bc89c6bc62255f508293bc/misc/tables.littlendin/iasp91.tbl -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | .c.o: 4 | $(CC) $(CFLAGS) -c $< 5 | 6 | OBJS = cssArchitecture.o cssListOps.o cssTableDump.o dbFillWfdisc.o \ 7 | dblErrors.o dblGetDataSubs.o dblUserData.o enlarge.o g2tofloat.o \ 8 | isValid.o byteswap.o cancomp.o dblReadE1.o 9 | 10 | library: $(OBJS) 11 | ar -r ../../../lib/libsac.a *.o 12 | 13 | clean: 14 | /bin/rm -f *.o 15 | 16 | {OBJS}: cssArchitecture.h cssListOps.h cssListStrucs.h cssStrucs.h dblErrors.h \ 17 | dblGetDataSubs.h dblPublicDefs.h dblUserData.h 18 | 19 | cssArchitecture.o: cssArchitecture.c 20 | cssListOps.o: cssListOps.c 21 | cssTableDump.o: cssTableDump.c 22 | dbFillWfdisc.o: dbFillWfdisc.c 23 | dblErrors.o: dblErrors.c 24 | dblGetDataSubs.o: dblGetDataSubs.c 25 | dblUserData.o: dblUserData.c 26 | enlarge.o: enlarge.c 27 | g2tofloat.o: g2tofloat.c 28 | isValid.o: isValid.c 29 | byteswap.o: byteswap.c 30 | cancomp.o: cancomp.c 31 | dblReadE1.o: dblReadE1.c 32 | -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/cancomp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _cancomp_h_ 3 | #define _cancomp_h_ 4 | 5 | /*************************************** 6 | ** Include files. 7 | */ 8 | #include 9 | 10 | /*************************************** 11 | ** Definitions. 12 | */ 13 | #define CANCOMP_ERR -1 /* unrecoverable error (malloc fails) */ 14 | #define CANCOMP_SUCCESS 0 /* success */ 15 | #define CANCOMP_NOT_20 1 /* number of samples not divisible by 20 */ 16 | #define CANCOMP_CORRUPT 2 /* corrupted call */ 17 | #define CANCOMP_EXCEED 3 /* number of bytes available in compressed 18 | data exceeded during decompression */ 19 | /*************************************** 20 | ** Function declarations. 21 | */ 22 | int cancomp( unsigned char *b, unsigned int *y, int *n, int m, unsigned int *v0 ); 23 | int uncancomp( unsigned char *b, unsigned int *y, int *n, int m, int *v0 ); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/cssArchitecture.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | /* prototype */ 6 | void archErr( char *message ) ; /* handles errors for SetIndianSize() */ 7 | 8 | const int endian = 0x12345678; 9 | 10 | /* Accessor */ 11 | int IsBigendinX() 12 | { return (*(unsigned char *)&endian == 0x12); } 13 | 14 | int IsBigendin() 15 | { 16 | union { 17 | uint32_t i; 18 | char c[4]; 19 | } e = { 0x01000000 }; 20 | 21 | return e.c[0]; 22 | 23 | } 24 | 25 | void archErr( char *message ) 26 | { 27 | printf( "Error determining byte order\n%s\n", message ) ; 28 | printf("Will assume machine is bigendian when reading CSS waveforms\n" ); 29 | } 30 | -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/cssArchitecture.h: -------------------------------------------------------------------------------- 1 | #ifndef __CSSARCHITECTURE_H__ 2 | #define __CSSARCHITECTURE_H__ 3 | 4 | /* 5 | There is a static int defined in cssArchitecture.c 6 | static int big = 1 ; 7 | One indicates that the code is being run on a bigendin machine. 8 | Zero indicates a littlendin machine. 9 | 10 | This value is set by SetIndianSize(), and is accessed by IsBigendin(). 11 | */ 12 | 13 | void SetIndianSize() ; 14 | int IsBigendin() ; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/dblErrors.h: -------------------------------------------------------------------------------- 1 | #ifndef _DBLERRORS_H 2 | #define _DBLERRORS_H 3 | 4 | 5 | void dblClearErrorList(void); 6 | void dblSetError(int Severe, const char * string); 7 | char *dblGetErrorMessage(void); 8 | int dblGetNumErrors(void); 9 | 10 | #endif /* _DBLERRORS_H */ 11 | -------------------------------------------------------------------------------- /src/SeisMgr/cssListOps/dblGetDataSubs.h: -------------------------------------------------------------------------------- 1 | #ifndef DBL_GET_DATA_SUBS_H 2 | #define DBL_GET_DATA_SUBS_H 3 | 4 | int dblGetE1 ( int NPTS , FILE *fptr , struct wfdiscList * wfStruc ); 5 | int dblGetS2I2G2 ( int NPTS , 6 | FILE *fptr , 7 | struct wfdiscList * wfStruc , 8 | char * pType ); 9 | int dblGetS3 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc ); 10 | int dblGetT4F4 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc , 11 | char* pType ); 12 | int dblGetS4I4 ( int NPTS , FILE *fptr , struct wfdiscList *wfStruc , 13 | char* pType ); 14 | int dblGetT8F8 ( int NPTS , FILE * fptr , struct wfdiscList *wfStruc , 15 | char* pType ); 16 | void enlarge(FILE *fp, int outMax, int* data, /* int * byteOff,*/ int* nerr); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/SeisMgr/cssb/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/libseismgr.a 8 | 9 | LIBOBJS = cssbIO.o cssRead2_8FlatFiles.o cssReadFlatFiles.o cssWriteFlatFiles.o 10 | 11 | library: $(LIBOBJS) 12 | ar r ../../../lib/libsac.a $(LIBOBJS) 13 | 14 | clean: 15 | /bin/rm -f *.o 16 | 17 | cssbIO.o: cssbIO.c cssb.h 18 | cssRead2_8FlatFiles.o: cssRead2_8FlatFiles.c 19 | cssReadFlatFiles.o: cssReadFlatFiles.c 20 | cssWriteFlatFiles.o: cssWriteFlatFiles.c 21 | -------------------------------------------------------------------------------- /src/SeisMgr/dbselect/dbPtsInside.h: -------------------------------------------------------------------------------- 1 | struct point{ 2 | float x; 3 | float y; 4 | }; 5 | 6 | struct line{ 7 | struct point p1; 8 | struct point p2; 9 | }; 10 | 11 | 12 | 13 | extern int inside(struct point t, struct point *p, int N); 14 | -------------------------------------------------------------------------------- /src/SeisMgr/gc/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/libsac.a 8 | 9 | 10 | LIBOBJS = gcChecks.o gcCollect.o 11 | 12 | library: $(LIBOBJS) 13 | ar r ../../../lib/libsac.a $(LIBOBJS) 14 | 15 | clean: 16 | /bin/rm -f *.o 17 | 18 | gcChecks.o: gcChecks.c gc.h 19 | gcCollect.o: gcCollect.c gc.h 20 | -------------------------------------------------------------------------------- /src/SeisMgr/gse/gse.h: -------------------------------------------------------------------------------- 1 | int gseRead20(char *fileName, char *WorkSetName, int Replace, int MaxWaveforms, int verbose, double MaxPhysMem ) ; 2 | 3 | int WriteGSEFile( char *outFile, DBlist tree, char *datasource, int cm6 ) ; 4 | 5 | int ReadCompData(FILE *ptr, int Nsamp, int *Data, char *fmt) ; 6 | 7 | int CheckSumFromIntArray(int *data, int Npts) ; 8 | int PutArrivalData ( FILE *ptr , DBlist tree ) ; 9 | int PutOriginData ( FILE *ptr , DBlist tree ) ; 10 | -------------------------------------------------------------------------------- /src/SeisMgr/gse/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/libsac.a 8 | 9 | LIBOBJS = cmprs6.o dcomp.o gseRead20.o GSEWaveforms.o gseWrite20.o 10 | 11 | library: $(LIBOBJS) 12 | ar r ../../../lib/libsac.a $(LIBOBJS) 13 | 14 | clean: 15 | /bin/rm -f *.o 16 | 17 | cmprs6.o: cmprs6.c gse.h 18 | dcomp.o: dcomp.c gse.h 19 | gseRead20.o: gseRead20.c gse.h 20 | GSEWaveforms.o: GSEWaveforms.c gse.h 21 | gseWrite20.o: gseWrite20.c gse.h 22 | -------------------------------------------------------------------------------- /src/SeisMgr/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o: 5 | $(CC) $(CFLAGS) -c $< 6 | 7 | 8 | DIRS = cssb cssListOps gc gse sacIO smMemory suds time 9 | 10 | SEISMGR_LIB: smDataIO.o smWorkSets.o stringfun.o 11 | for i in $(DIRS); do ( if [ -d $$i ]; then cd $$i ; make library; fi; ) ; done; \ 12 | ar -r ../../lib/libSMnonOracleFuncs.a smDataIO.o smWorkSets.o stringfun.o 13 | 14 | 15 | DATABASE_LIB: smDBdata.o 16 | cd dbselect; make library; cd ..; ar -r ../../lib/libSMOracleFuncs.a smDBdata.o 17 | 18 | NON_DATABASE_STUB: smNoDBstubs.o 19 | ar -r ../../lib/libSacOracleStubFuncs.a smNoDBstubs.o 20 | 21 | clean: 22 | @ /bin/rm -f *.o; 23 | @ cd dbselect; make clean; 24 | for i in $(DIRS); do ( if [ -d $$i ]; then cd $$i ; make clean; fi; ) ; done; 25 | 26 | 27 | 28 | 29 | smDataIO.o: smDataIO.c smDataIO.h 30 | smWorkSets.o: smWorkSets.c 31 | stringfun.o: stringfun.c stringfun.h 32 | smDBdata.o: smDBdata.c 33 | smNoDBstubs.o: smNoDBstubs.c 34 | -------------------------------------------------------------------------------- /src/SeisMgr/sacIO/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | .c.o: 4 | $(CC) $(CFLAGS) -c $< 5 | 6 | library: dbConversions.o sacInput.o sacOutput.o 7 | ar -r ../../../lib/libsac.a *.o 8 | 9 | clean: 10 | /bin/rm -f *.o 11 | 12 | dbConversions.o: dbConversions.c dbConversions.h SacHeader.h 13 | sacInput.o: sacInput.c SacHeader.h 14 | sacOutput.o: sacOutput.c SacHeader.h 15 | -------------------------------------------------------------------------------- /src/SeisMgr/sacIO/dbConversions.h: -------------------------------------------------------------------------------- 1 | #ifndef DB_CONVERSIONS_H 2 | #define DB_CONVERSIONS_H 3 | 4 | void dbDelaz(float *slat, float *slon, float *elat, float *elon, 5 | float *delt, float *dist, float *azim, float *bazim); 6 | 7 | void dbGetEnclosingBox(float latc, float lonc, float radius, float *minLat, 8 | float *maxLat, float *minLon, float *maxLon); 9 | 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/SeisMgr/smMemory/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/libsac.a 8 | 9 | LIBOBJS = smMemory.o 10 | 11 | library: $(LIBOBJS) 12 | ar r ../../../lib/libsac.a $(LIBOBJS) 13 | 14 | clean: 15 | /bin/rm -f *.o 16 | 17 | smMemory.o: smMemory.c smMemory.h 18 | -------------------------------------------------------------------------------- /src/SeisMgr/smMemory/smMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef SM_MEMORY_H 2 | #define SM_MEMORY_H 3 | 4 | void * smMalloc(size_t size); 5 | void *smCalloc(size_t count, size_t size); 6 | void *smRealloc(void *ptr, size_t size); 7 | void smFree(void *ptr); 8 | size_t smTotalPhysicalBytes(void); 9 | size_t smAvailPhysicalBytes(void); 10 | size_t smAllocatedBytes(void); 11 | double smFracPhysMemUsed(void); 12 | void smPrintContents(void); 13 | 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/SeisMgr/smNoDBstubs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int smLoadOracleData(int takeEvid, char *specifier,...) 5 | { 6 | printf("This version of SAC does not support database queries.\n"); 7 | return 0; 8 | 9 | } 10 | /*----------------------------------------------------------------------*/ 11 | 12 | 13 | 14 | char *dbGetCropFromPath(void){return 0;} 15 | 16 | 17 | char *dbGetPrependToPath(void){return 0;} 18 | 19 | 20 | void dbSetQueryDefaults(void){} 21 | 22 | char *dbGetQueryLogin(void) {return 0;} 23 | 24 | char *dbGetQueryPasswd(void) {return 0;} 25 | 26 | -------------------------------------------------------------------------------- /src/SeisMgr/stringfun.h: -------------------------------------------------------------------------------- 1 | #ifdef DEFINE_STRING_FUN 2 | char* upstring(char* string); 3 | char *stringcat(char *str1, ...); 4 | 5 | /* concatenate string2 to string1 after allocating necessary space */ 6 | char *strAllocCat(char * string1, char *string2); 7 | 8 | #else 9 | 10 | extern char *Upstring(char *str); 11 | extern char *stringcat(char *str1, ...); 12 | extern char *CpUpstring(const char *str); 13 | /* concatenate string2 to string1 after allocating necessary space */ 14 | extern char *strAllocCat(char * string1, char *string2); 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/SeisMgr/suds/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/libsac.a 8 | 9 | LIBOBJS = sudsDataConversions.o sudsIO.o sudsListOps.o sudsReading.o \ 10 | sudsToCSSlist.o sudsWriting.o 11 | 12 | library: $(LIBOBJS) 13 | ar r ../../../lib/libsac.a $(LIBOBJS) 14 | 15 | clean: 16 | /bin/rm -f *.o 17 | 18 | sudsDataConversions.o: sudsDataConversions.c 19 | sudsIO.o: sudsIO.c sudsIO.h 20 | sudsListOps.o: sudsListOps.c sudsListOps.h 21 | sudsReading.o: sudsReading.c sudsReading.h 22 | sudsToCSSlist.o: sudsToCSSlist.c 23 | sudsWriting.o: sudsWriting.c sudsWriting.h 24 | -------------------------------------------------------------------------------- /src/SeisMgr/suds/sudsDataConversions.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDS_CONVERT_H 2 | #define SUDS_CONVERT_H 3 | 4 | #include "suds.h" 5 | 6 | void Convert2(void *in); 7 | void Convert4(void *in); 8 | void Convert8(void *in); 9 | 10 | void ConvertPZArray(SUDS_CALIBR *PZA, int npts); 11 | #endif 12 | -------------------------------------------------------------------------------- /src/SeisMgr/suds/sudsIO.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDSIO_H 2 | #define SUDSIO_H 3 | 4 | 5 | int sudsToCSSlist(const char* filename, const char *WorkSetName, int Replace, 6 | int MaxTraces, int Verbose, double MaxPhysMem); 7 | 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/SeisMgr/suds/sudsListOps.h: -------------------------------------------------------------------------------- 1 | #ifndef SUDS_LIST_OPS_H 2 | #define SUDS_LIST_OPS_H 3 | 4 | #include "suds.h" 5 | 6 | 7 | 8 | void *AddSudsListElement(SUDS *S, short StructID); 9 | void FreeSuds(SUDS *S); 10 | SUDS *NewSudsList(void); 11 | char *Phasecode(short obs_phase); 12 | char *Instcode(short code); 13 | char *GetCharAuth(short authority); 14 | char *GetCharProg(char program); 15 | char *GetCharMagType(short mag_type); 16 | #endif 17 | -------------------------------------------------------------------------------- /src/SeisMgr/time/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | .c.o: 4 | $(CC) $(CFLAGS) -c $< 5 | 6 | library: timefuncs.o 7 | ar -r ../../../lib/libsac.a *.o 8 | 9 | clean: 10 | /bin/rm -f *.o 11 | 12 | timefuncs.o: timefuncs.c timefuncs.h 13 | -------------------------------------------------------------------------------- /src/amf/makefile: -------------------------------------------------------------------------------- 1 | CFLAGS = $(SACCFLAGS) 2 | 3 | CC = gcc 4 | 5 | .c.o: 6 | $(CC) $(CFLAGS) -c $< 7 | 8 | 9 | LIBOBJS = allamb.o relamb.o iniam.o reaamb.o 10 | 11 | library: $(LIBOBJS) 12 | ar r ../../lib/libsac.a $(LIBOBJS) 13 | 14 | 15 | clean: 16 | /bin/rm -f *.o 17 | 18 | allamb.o: allamb.c 19 | iniam.o: iniam.c 20 | relamb.o: relamb.c 21 | reaamb.o: reaamb.c 22 | -------------------------------------------------------------------------------- /src/bbs/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o: 7 | $(CC) $(CFLAGS) -c $< 8 | 9 | LIBOBJS = createbbs.o deletebbs.o getbbv.o inibbs.o readbbf.o \ 10 | setbbv.o unsetbbv.o writebbf.o 11 | 12 | library: $(LIBOBJS) 13 | ar r ../../lib/libsac.a $(LIBOBJS) 14 | 15 | clean: 16 | /bin/rm -f *.o 17 | 18 | createbbs.o: createbbs.c $(INC)/mach.h $(INC)/bbs.h 19 | deletebbs.o: deletebbs.c $(INC)/mach.h $(INC)/bbs.h 20 | getbbv.o: getbbv.c $(INC)/mach.h $(INC)/bbs.h 21 | inibbs.o: inibbs.c $(INC)/mach.h $(INC)/bbs.h 22 | readbbf.o: readbbf.c $(INC)/mach.h $(INC)/mem.h $(INC)/bbs.h 23 | setbbv.o: setbbv.c $(INC)/mach.h $(INC)/bbs.h 24 | unsetbbv.o: unsetbbv.c $(INC)/mach.h $(INC)/bbs.h 25 | writebbf.o: writebbf.c $(INC)/mach.h $(INC)/bbs.h 26 | -------------------------------------------------------------------------------- /src/bot/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libbot.a 10 | 11 | 12 | LIBOBJS = capf.o chpf.o clipdp.o crname.o indexa.o \ 13 | indexb.o indexc.o lequal.o locdp.o \ 14 | modcase.o nequal.o terminate.o upcase.o wrlist.o 15 | 16 | library: $(LIBOBJS) 17 | ar r ../../lib/libsac.a $(LIBOBJS) 18 | 19 | clean: 20 | /bin/rm -f *.o 21 | 22 | 23 | capf.o: capf.c $(INC)/mach.h $(INC)/eam.h 24 | chpf.o: chpf.c $(INC)/mach.h $(INC)/eam.h 25 | clipdp.o: clipdp.c $(INC)/mach.h 26 | crname.o: crname.c $(INC)/mach.h 27 | indexa.o: indexa.c 28 | indexb.o: indexb.c 29 | indexc.o: indexc.c 30 | lequal.o: lequal.c $(INC)/mach.h 31 | locdp.o: locdp.c $(INC)/mach.h 32 | modcase.o: modcase.c 33 | nequal.o: nequal.c $(INC)/mach.h 34 | terminate.o: terminate.c 35 | upcase.o: upcase.c 36 | wrlist.o: wrlist.c $(INC)/mach.h 37 | -------------------------------------------------------------------------------- /src/bot/terminate.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | /* Takes a space-padded string, and terminates it at the first space. * 7 | * Returns 0 if terminated successfully, or 1 if no padding found. */ 8 | 9 | /* Note: Requires that string be terminated at the end of the padding. */ 10 | 11 | int terminate ( char * paddedString ) 12 | { 13 | char * cPtr ; 14 | int nLen ; 15 | 16 | for ( nLen = strlen ( paddedString ) - 1 ; isspace ( paddedString[ nLen ] ) ; 17 | nLen-- ) 18 | paddedString[ nLen ] = '\0' ; 19 | return 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/clf/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libclf.a 10 | 11 | LIBOBJS = fndelcl.o ldelcl.o lnumcl.o lnxtcl.o nfndcl.o putcl.o 12 | 13 | 14 | library: $(LIBOBJS) 15 | ar r ../../lib/libsac.a $(LIBOBJS) 16 | 17 | clean: 18 | /bin/rm -f *.o 19 | 20 | 21 | 22 | fndelcl.o: fndelcl.c 23 | ldelcl.o: ldelcl.c $(INC)/mach.h 24 | lnumcl.o: lnumcl.c 25 | lnxtcl.o: lnxtcl.c 26 | nfndcl.o: nfndcl.c $(INC)/mach.h 27 | putcl.o: putcl.c 28 | -------------------------------------------------------------------------------- /src/co/fstrncpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | char *fstrncpy( to, tolen, from, fromlen ) 7 | char *to, *from; 8 | int tolen, fromlen; 9 | { 10 | int cpylen; 11 | 12 | if( to == NULL || from == NULL || tolen <= 0 || fromlen <= 0 ) 13 | return( NULL ) ; 14 | 15 | cpylen = fromlen ; 16 | if( fromlen > tolen ) cpylen = tolen ; 17 | 18 | memcpy( to, from, cpylen ) ; 19 | if( cpylen < tolen ) 20 | memset( to+cpylen, (int)' ', tolen - cpylen ) ; 21 | to[ tolen ] = '\0' ; 22 | 23 | return( to ) ; 24 | } 25 | -------------------------------------------------------------------------------- /src/co/strscpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char *strscpy( to, from, l ) 6 | char *to; 7 | char *from; 8 | int l; 9 | { 10 | int len; 11 | 12 | if ((to==NULL) || (from==NULL) || (l <= 0)) return NULL; 13 | 14 | len = strlen(from); 15 | if ( l < len ) len = l; 16 | 17 | strncpy(to,from,len); 18 | 19 | to[len] = '\0'; 20 | 21 | return to ; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/co/tokenize.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | /* Tokenize a character string. */ 4 | 5 | void tokenize(argv, argc, linein, nerr) 6 | char ***argv; 7 | int *argc; 8 | char *linein; 9 | int *nerr; 10 | { 11 | char *temp, *token; 12 | int i; 13 | 14 | *nerr = 0; 15 | *argc = 0; 16 | 17 | 18 | if((temp = malloc(strlen(linein)+1)) == NULL){ 19 | *nerr = 301; 20 | return; 21 | } 22 | 23 | strcpy(temp, linein); 24 | 25 | token = strtok(temp, " \t\n\0"); 26 | if( token != NULL ) (*argc)++; 27 | 28 | while( (token = strtok(NULL, " \t\n\0")) != NULL ) (*argc)++; 29 | 30 | if( *argc > 0 ){ 31 | if((*argv = malloc(*argc * sizeof(char *))) == NULL){ 32 | *nerr = 301; 33 | return; 34 | }else{ 35 | (*argv)[0] = strtok(linein, " \t\n\0"); 36 | for( i=1; i<*argc; i++ ){ 37 | (*argv)[i] = strtok(NULL, " \t\n\0"); 38 | } 39 | } 40 | 41 | } 42 | 43 | free(temp); 44 | 45 | return; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/co/zclosec.c: -------------------------------------------------------------------------------- 1 | /* 2 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3 | 4 | *** Function: zclosec_(pfd) 5 | 6 | *** Purpose: Close a "C" file descriptor (see zopenc_) 7 | 8 | *** Inputs: pfd A pointer to the negative of a "C" file descriptor. 9 | 10 | *** Notes: SAC carries around FORTRAN logical unit numbers, but it 11 | doesn't currently have hooks for "C" file descriptors. 12 | Therefore, the "C" descriptors are carried in the same 13 | variable as the logical unit numbers. The file descriptors 14 | are negated to distinguish them from logical unit numbers. 15 | 16 | *** History: 12/16/85 Tested--D. Trimmer 17 | 01/15/88 Changed name from zclosc to zclosec--J. Tull 18 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 19 | */ 20 | 21 | #include 22 | 23 | 24 | void zclosec(pfd) 25 | int *pfd; /* negative of a file descriptor */ 26 | { 27 | close(-(*pfd)); 28 | return; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/co/zgetgd.c: -------------------------------------------------------------------------------- 1 | /* 2 | CDOC 3 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4 | 5 | *** Function: zgetgd_(name,name_len) 6 | 7 | *** Purpose: To get the name of the default SAC graphics device. 8 | 9 | *** Returns: The device name. 10 | 11 | *** Notes: This program is designed to be called from a f77 routine. 12 | 13 | *** History: 11/22/88 Original version based upon zbasename. 14 | 15 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 16 | CEND 17 | */ 18 | 19 | #include 20 | #include 21 | extern char *getenv(); 22 | 23 | 24 | void zgetgd(name,name_len) 25 | char name[]; 26 | int name_len; 27 | 28 | { 29 | 30 | char *temp; 31 | int i; 32 | 33 | if ((temp = getenv("SACGRAPHICSDEVICE")) != NULL) 34 | strcpy(name,temp); 35 | else { 36 | strcpy(name,"xwindows"); 37 | } 38 | 39 | for(i=strlen(name);i 2 | #include 3 | #include 4 | 5 | 6 | char *C_fstrncpy( char* to, int tolen, char* from, int fromlen ) 7 | { 8 | int cpylen; 9 | 10 | if ( to==NULL || from==NULL || 11 | tolen <= 0 || fromlen <= 0 ) return(NULL); 12 | 13 | cpylen = fromlen; 14 | if ( fromlen > tolen ) cpylen = tolen; 15 | 16 | memcpy(to,from,cpylen); 17 | if(cpylen < tolen) memset(to+cpylen,(int)' ',tolen-cpylen); 18 | to[tolen] = '\0'; 19 | 20 | return( to ); 21 | } 22 | -------------------------------------------------------------------------------- /src/coda/binary_op.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int binary_op (float* data1, float* data2, int n, char* op) 6 | { 7 | int i,j; 8 | 9 | if (!(strcmp(op,"addf"))) { 10 | for(i=0;i 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | void /*FUNCTION*/ gauss(seed, v1, v2) 7 | int *seed; 8 | float *v1, *v2; 9 | { 10 | double x, y, z; 11 | 12 | 13 | 14 | x = dbh_random( seed ); 15 | y = dbh_random( seed ); 16 | z = sqrt( -2.0e0*log( x ) ); 17 | 18 | *v1 = z*cos( 6.2831853*y ); 19 | *v2 = z*sin( 6.2831853*y ); 20 | 21 | return; 22 | } /* end of function */ 23 | 24 | -------------------------------------------------------------------------------- /src/dbh/random.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | double /*FUNCTION*/ dbh_random(seed) 7 | int *seed; 8 | { 9 | float random_v; 10 | 11 | 12 | 13 | *seed = 2045**seed + 1; 14 | *seed = *seed - (*seed/1048576)*1048576; 15 | random_v = (float)( *seed + 1 )/1048577.0; 16 | 17 | return( random_v ); 18 | } /* end of function */ 19 | 20 | -------------------------------------------------------------------------------- /src/dbh/zero.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | /* Given an array of floats, and the length of the array, 4 | set each element to zero. */ 5 | 6 | void /*FUNCTION*/ zero(a, n) 7 | float a[]; 8 | int n; 9 | { 10 | int k ; 11 | 12 | for( k = 0 ; k < n ; k++ ) 13 | a[ k ] = 0.0 ; 14 | 15 | } /* end of function */ 16 | 17 | -------------------------------------------------------------------------------- /src/dff/map_chdr_in.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../inc/complex.h" 6 | #include "../../inc/proto.h" 7 | #include "../../inc/mach.h" 8 | #include "../../inc/hdr.h" 9 | void /*FUNCTION*/ map_chdr_in(memarray,buffer) 10 | float *memarray, *buffer; 11 | { 12 | 13 | /* Copy the character header variables into the memory */ 14 | /* buffer, supplying the additional null termination */ 15 | /* character. */ 16 | 17 | 18 | char *ptr1, *ptr2; 19 | int i; 20 | 21 | ptr1 = (char *)memarray; 22 | ptr2 = (char *)buffer; 23 | 24 | memcpy(ptr1,ptr2,8); *(ptr1+8) = '\0'; 25 | ptr1 += 9; ptr2 += 8; 26 | 27 | memcpy(ptr1,ptr2,16);*(ptr1+16) = '\0'; 28 | ptr1 += 18; ptr2 += 16; 29 | 30 | for (i=0; i<21; i++){ 31 | memcpy(ptr1,ptr2,8); 32 | *(ptr1+8) = '\0'; 33 | ptr1 += 9; 34 | ptr2 += 8; 35 | } 36 | 37 | return; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/dff/map_chdr_out.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../inc/complex.h" 6 | #include "../../inc/proto.h" 7 | #include "../../inc/mach.h" 8 | #include "../../inc/hdr.h" 9 | void /*FUNCTION*/ map_chdr_out(memarray,buffer) 10 | float *memarray, *buffer; 11 | { 12 | 13 | /* Copy the character header variables into the output */ 14 | /* buffer, eliminating the null termination character */ 15 | /* (packing the strings one after another) */ 16 | 17 | char *ptr1, *ptr2; 18 | int i; 19 | 20 | ptr1 = (char *)memarray; 21 | ptr2 = (char *)buffer; 22 | 23 | 24 | memcpy(ptr2,ptr1,8); 25 | ptr1 += 9; ptr2 += 8; 26 | 27 | memcpy(ptr2,ptr1,16); 28 | ptr1 += 18; ptr2 += 16; 29 | 30 | for (i=0; i<21; i++){ 31 | memcpy(ptr2,ptr1,8); 32 | ptr1 += 9; 33 | ptr2 += 8; 34 | } 35 | 36 | 37 | return; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/dfm/xHeaderWindow.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "mach.h" 4 | #include "hdr.h" 5 | #include "dfm.h" 6 | 7 | 8 | 9 | void xHeaderWindow ( int *nerr ) 10 | { 11 | printf ( "HEADERWINDOW command is currently not functioning.\n" ) ; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/eam/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libeam.a 10 | 11 | LIBOBJS = inieam.o whpf1.o xapk.o xeamc.o xoapf.o xohpf.o xwhpf.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | 20 | inieam.o: inieam.c $(INC)/mach.h $(INC)/eam.h 21 | whpf1.o: whpf1.c $(INC)/mach.h $(INC)/eam.h 22 | xapk.o: xapk.c $(INC)/mach.h $(INC)/dfm.h $(INC)/hdr.h \ 23 | $(INC)/mem.h $(INC)/eam.h 24 | xeamc.o: xeamc.c $(INC)/mach.h $(INC)/eam.h 25 | xoapf.o: xoapf.c $(INC)/mach.h $(INC)/eam.h 26 | xohpf.o: xohpf.c $(INC)/mach.h $(INC)/eam.h 27 | xwhpf.o: xwhpf.c $(INC)/mach.h $(INC)/eam.h 28 | -------------------------------------------------------------------------------- /src/evalresp/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libevalresp.a 10 | 11 | LIBOBJS = regexp.o regerror.o regsub.o calc_fctns.o resp_fctns.o \ 12 | file_ops.o evresp.o alloc_fctns.o parse_fctns.o print_fctns.o \ 13 | string_fctns.o error_fctns.o evr_spline.o 14 | 15 | library: $(LIBOBJS) 16 | ar r ../../lib/libsac.a $(LIBOBJS) 17 | 18 | clean: 19 | /bin/rm -f *.o 20 | 21 | alloc_fctns.o: alloc_fctns.c 22 | calc_fctns.o: calc_fctns.c 23 | error_fctns.o: error_fctns.c 24 | evresp.o: evresp.c 25 | file_ops.o: file_ops.c 26 | parse_fctns.o: parse_fctns.c 27 | print_fctns.o: print_fctns.c 28 | regerror.o: regerror.c 29 | regexp.o: regexp.c 30 | regsub.o: regsub.c 31 | resp_fctns.o: resp_fctns.c 32 | string_fctns.o: string_fctns.c 33 | evr_spline.o: evr_spline.c 34 | -------------------------------------------------------------------------------- /src/evalresp/regerror.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include 3 | #endif 4 | 5 | /* 6 | * 1/18/2006 -- [ET] Renamed function to prevent name clashes with 7 | * other libraries. 8 | */ 9 | 10 | #include 11 | #include /* for 'exit()'; added 8/28/2001 -- [ET] */ 12 | 13 | void 14 | evr_regerror(s) 15 | char *s; 16 | { 17 | #ifdef ERRAVAIL 18 | error("regexp: %s", s); 19 | #else 20 | fprintf(stderr, "regexp(3): %s", s); 21 | exit(1); 22 | #endif 23 | /* NOTREACHED */ 24 | } 25 | -------------------------------------------------------------------------------- /src/evalresp/regexp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Definitions etc. for regexp(3) routines. 3 | * 4 | * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], 5 | * not the System V one. 6 | */ 7 | /* 8 | * 8/28/2001 -- [ET] Added parameter lists to function declarations. 9 | * 1/18/2006 -- [ET] Renamed functions to prevent name clashes with 10 | * other libraries. 11 | */ 12 | #define NSUBEXP 10 13 | typedef struct regexp { 14 | char *startp[NSUBEXP]; 15 | char *endp[NSUBEXP]; 16 | char regstart; /* Internal use only. */ 17 | char reganch; /* Internal use only. */ 18 | char *regmust; /* Internal use only. */ 19 | int regmlen; /* Internal use only. */ 20 | char program[1]; /* Unwarranted chumminess with compiler. */ 21 | } regexp; 22 | 23 | regexp *evr_regcomp(char *exp); 24 | int evr_regexec(regexp *prog, char *string); 25 | void evr_regsub(regexp *prog, char *source, char *dest); 26 | void evr_regerror(char *s); 27 | -------------------------------------------------------------------------------- /src/evalresp/regmagic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The first byte of the regexp internal "program" is actually this magic 3 | * number; the start node begins in the second byte. 4 | */ 5 | #define MAGIC 0234 6 | -------------------------------------------------------------------------------- /src/exm/xabout.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "mach.h" 5 | #include "msg.h" 6 | 7 | /* Report version information about SAC2000 */ 8 | 9 | void setmsg(char* ktype, int number); 10 | void apcmsg(char *kalpha, int kalpha_s); 11 | void outmsg(void); 12 | void clrmsg(void); 13 | void aplmsg(char *kalpha, int kalpha_s); 14 | 15 | 16 | 17 | void xabout ( void ) 18 | { 19 | char kvdate[200]; 20 | char fmt[] = "SEISMIC ANALYSIS CODE [%s (Version 07.10.8)]"; 21 | char kcopyr[] = "Copyright 2019 LLNL/LLNS under Contract DE-AC52-07NA27344\n" ; 22 | 23 | sprintf( kvdate, fmt, BUILD_DATE ); 24 | setmsg( "OUTPUT", 99 ); 25 | apcmsg( kvdate, strlen ( kvdate ) + 1 ); 26 | aplmsg( kcopyr, strlen ( kcopyr ) + 1 ); 27 | outmsg(); 28 | clrmsg(); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/extfuncs/fgetahdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | void getfield(char* fieldname, int lenfield, char* fieldout); 4 | 5 | void fgetahdr_(hdr_index, fieldname, value, error, lenfield, lenvalue) 6 | int *hdr_index; 7 | char *fieldname; 8 | char *value; 9 | int *error; 10 | int lenfield; 11 | int lenvalue; 12 | { 13 | 14 | char infield[8]; 15 | char *fieldout; 16 | sac_header *hdr_in; 17 | 18 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 19 | 20 | memset(infield,' ',8); 21 | infield[7]='\0'; 22 | 23 | getfield(fieldname, lenfield, infield); 24 | 25 | fieldout = getahdr( hdr_in, infield, error ); 26 | 27 | if( *error == 0 ){ 28 | strcpy(value, fieldout); 29 | value[strlen(value)] = ' '; 30 | } 31 | 32 | return; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/extfuncs/fgetehdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | void getfield(char* fieldname, int lenfield, char* fieldout); 4 | 5 | void fgetehdr_(hdr_index, fieldname, value, error, lenfield) 6 | int *hdr_index; 7 | char *fieldname; 8 | int *value; 9 | int *error; 10 | int lenfield; 11 | { 12 | char infield[8]; 13 | sac_header *hdr_in; 14 | 15 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 16 | 17 | memset(infield,' ',8); 18 | infield[7]='\0'; 19 | 20 | getfield(fieldname, lenfield, infield); 21 | 22 | *value = getehdr(hdr_in, infield, error); 23 | 24 | return; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/extfuncs/fgetfhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fgetfhdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | float *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | *value = getfhdr(hdr_in, infield, error); 24 | 25 | return; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/extfuncs/fgetlhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | 7 | void fgetlhdr_(hdr_index, fieldname, value, error, lenfield) 8 | int *hdr_index; 9 | char *fieldname; 10 | int *value; 11 | int *error; 12 | int lenfield; 13 | { 14 | char infield[8]; 15 | sac_header *hdr_in; 16 | 17 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 18 | 19 | memset(infield,' ',8); 20 | infield[7]='\0'; 21 | 22 | getfield(fieldname, lenfield, infield); 23 | 24 | *value = getlhdr(hdr_in, infield, error); 25 | 26 | return; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/extfuncs/fgetnhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fgetnhdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | int *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | *value = getnhdr(hdr_in, infield, error); 24 | 25 | return; 26 | } 27 | -------------------------------------------------------------------------------- /src/extfuncs/fsetahdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | 5 | void getfield(char* fieldname, int lenfield, char* fieldout); 6 | 7 | void fsetahdr_(hdr_index, fieldname, value, error, lenfield, lenvalue) 8 | int *hdr_index; 9 | char *fieldname; 10 | char *value; 11 | int *error; 12 | int lenfield; 13 | int lenvalue; 14 | { 15 | char infield[8]; 16 | char invalue[17]; 17 | sac_header *hdr_in; 18 | 19 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 20 | 21 | memset(infield,' ',8); 22 | infield[7]='\0'; 23 | memset(invalue,' ',17); 24 | invalue[16]='\0'; 25 | 26 | getfield(fieldname, lenfield, infield); 27 | getfield(value, lenvalue, invalue); 28 | 29 | setahdr(hdr_in, infield, invalue, error); 30 | 31 | return; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/extfuncs/fsetehdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fsetehdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | int *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | setehdr(hdr_in, infield, *value, error); 24 | 25 | return; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/extfuncs/fsetfhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fsetfhdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | float *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | setfhdr(hdr_in, infield, *value, error); 24 | 25 | return; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/extfuncs/fsetlhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fsetlhdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | int *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | setlhdr(hdr_in, infield, *value, error); 24 | 25 | return; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/extfuncs/fsetnhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../../inc/extfunc.h" 3 | 4 | void getfield(char* fieldname, int lenfield, char* fieldout); 5 | 6 | void fsetnhdr_(hdr_index, fieldname, value, error, lenfield) 7 | int *hdr_index; 8 | char *fieldname; 9 | int *value; 10 | int *error; 11 | int lenfield; 12 | { 13 | char infield[8]; 14 | sac_header *hdr_in; 15 | 16 | hdr_in = indata->ext_hdrs[*hdr_index-1]; 17 | 18 | memset(infield,' ',8); 19 | infield[7]='\0'; 20 | 21 | getfield(fieldname, lenfield, infield); 22 | 23 | setnhdr(hdr_in, infield, *value, error); 24 | 25 | return; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/extfuncs/getahdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/extfunc.h" 5 | 6 | void getfield(char* fieldname, int lenfield, char* fieldout); 7 | 8 | char *getahdr( header_in, fieldname, error ) 9 | sac_header *header_in; 10 | char *fieldname; 11 | int *error; 12 | 13 | { 14 | int i; 15 | 16 | *error = 0; 17 | 18 | for( i=0; iext_khdr[i][0])); 23 | else { 24 | *error = 1; 25 | return ((char *)NULL); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/extfuncs/getehdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "../../inc/extfunc.h" 7 | void getfield(char* fieldname, int lenfield, char* fieldout); 8 | 9 | int getehdr( header_in, fieldname, error ) 10 | sac_header *header_in; 11 | char *fieldname; 12 | int *error; 13 | 14 | { 15 | int i; 16 | 17 | *error = 0; 18 | 19 | for( i=0; iext_ihdr[i]); 24 | else { 25 | *error = 1; 26 | return (IUNDEF); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/extfuncs/getfhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../inc/extfunc.h" 6 | 7 | void getfield(char* fieldname, int lenfield, char* fieldout); 8 | 9 | float getfhdr( header_in, fieldname, error ) 10 | sac_header *header_in; 11 | char *fieldname; 12 | int *error; 13 | 14 | { 15 | int i; 16 | 17 | *error = 0; 18 | 19 | for( i=0; iext_fhdr[i]); 24 | else { 25 | *error = 1; 26 | return (FUNDEF); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/extfuncs/getfield.c: -------------------------------------------------------------------------------- 1 | void getfield(char* fieldname, int lenfield, char* fieldout) 2 | { 3 | /* Return a NULL terminated string with leading blanks removed. */ 4 | char *tempin, *tempout; 5 | int count = 0; 6 | 7 | tempin = fieldname; 8 | 9 | while ( *tempin == ' ' ) { 10 | tempin++; 11 | count++; 12 | } 13 | 14 | tempout = fieldout; 15 | 16 | while((*tempin != ' ') && (count < lenfield) && (*tempout != '\0')){ 17 | *tempout++ = *tempin++; 18 | count++; 19 | } 20 | 21 | *tempout = '\0'; 22 | 23 | return; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/extfuncs/getlhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../inc/extfunc.h" 6 | 7 | #ifndef FALSE 8 | #define FALSE (0) 9 | #endif 10 | 11 | 12 | void getfield(char* fieldname, int lenfield, char* fieldout); 13 | 14 | 15 | int getlhdr( header_in, fieldname, error ) 16 | sac_header *header_in; 17 | char *fieldname; 18 | int *error; 19 | 20 | { 21 | int i; 22 | 23 | *error = 0; 24 | 25 | for( i=0; iext_lhdr[i]); 30 | else { 31 | *error = 1; 32 | return ((int)FALSE); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/extfuncs/getnhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../inc/extfunc.h" 6 | 7 | void getfield(char* fieldname, int lenfield, char* fieldout); 8 | 9 | int getnhdr( header_in, fieldname, error ) 10 | sac_header *header_in; 11 | char *fieldname; 12 | int *error; 13 | 14 | { 15 | int i; 16 | 17 | *error = 0; 18 | 19 | for( i=0; iext_nhdr[i]); 24 | else { 25 | *error = 1; 26 | return (NUNDEF); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/extfuncs/setehdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "../../inc/extfunc.h" 7 | 8 | void getfield(char* fieldname, int lenfield, char* fieldout); 9 | 10 | void setehdr( header_in, fieldname, value, error ) 11 | sac_header *header_in; 12 | char *fieldname; 13 | int value; 14 | int *error; 15 | 16 | { 17 | int i; 18 | 19 | *error = 0; 20 | 21 | for( i=0; iext_ihdr[i] = value; 26 | else *error = 1; 27 | 28 | return; 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/extfuncs/setfhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "../../inc/extfunc.h" 7 | 8 | void getfield(char* fieldname, int lenfield, char* fieldout); 9 | 10 | void setfhdr( header_in, fieldname, value, error ) 11 | sac_header *header_in; 12 | char *fieldname; 13 | float value; 14 | int *error; 15 | 16 | { 17 | int i; 18 | 19 | *error = 0; 20 | 21 | for( i=0; iext_fhdr[i] = value; 26 | else *error = 1; 27 | 28 | return; 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/extfuncs/setlhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "../../inc/extfunc.h" 7 | 8 | void getfield(char* fieldname, int lenfield, char* fieldout); 9 | 10 | void setlhdr( header_in, fieldname, value, error ) 11 | sac_header *header_in; 12 | char *fieldname; 13 | int value; 14 | int *error; 15 | 16 | { 17 | int i; 18 | 19 | *error = 0; 20 | 21 | for( i=0; iext_lhdr[i] = value; 26 | else *error = 1; 27 | 28 | return; 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/extfuncs/setnhdr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "../../inc/extfunc.h" 4 | #include 5 | #include 6 | void getfield(char* fieldname, int lenfield, char* fieldout); 7 | 8 | 9 | void setnhdr( header_in, fieldname, value, error ) 10 | sac_header *header_in; 11 | char *fieldname; 12 | int value; 13 | int *error; 14 | 15 | { 16 | int i; 17 | 18 | *error = 0; 19 | 20 | for( i=0; iext_nhdr[i] = value; 25 | else *error = 1; 26 | 27 | return; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/gcm/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libgcm.a 10 | 11 | LIBOBJS = xbegindevice.o xenddevices.o xgcmc.o xsgf.o xvspac.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | 20 | 21 | xbegindevice.o: xbegindevice.c $(INC)/mach.h 22 | xenddevices.o: xenddevices.c $(INC)/mach.h 23 | xgcmc.o: xgcmc.c $(INC)/mach.h 24 | xsgf.o: xsgf.c $(INC)/mach.h 25 | xvspac.o: xvspac.c $(INC)/mach.h 26 | -------------------------------------------------------------------------------- /src/gd2/cursor2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | void /*FUNCTION*/ cursor2(xloc, yloc, kchar) 7 | double xloc, yloc; 8 | int kchar; 9 | { 10 | 11 | /*===================================================================== 12 | * PURPOSE: To perform "graphics input function on device 2 (SGF). 13 | *===================================================================== 14 | * OUTPUT ARGUMENTS: 15 | * XLOC: X location of cursor when character was struck. [f] 16 | * YLOC: Y location of cursor. [f] 17 | * KCHAR: Character struck in response to cursor. [c1] 18 | *===================================================================== 19 | * MODULE/LEVEL: GD2/4 20 | *===================================================================== */ 21 | /* PROCEDURE: */ 22 | /* - This is a no-op for this graphics device. */ 23 | L_8888: 24 | return; 25 | 26 | 27 | } /* end of function */ 28 | 29 | -------------------------------------------------------------------------------- /src/gd2/erase2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | void /*FUNCTION*/ erase2() 7 | { 8 | 9 | /*===================================================================== 10 | * PURPOSE: To erase the screen for graphics device 2 (SGF). 11 | *===================================================================== 12 | * MODULE/LEVEL: GD2/4 13 | *===================================================================== 14 | * MODIFICATION HISTORY: 15 | * 840106: Original version. 16 | *===================================================================== */ 17 | /* PROCEDURE: */ 18 | /* - This is a no-op for this graphics device. */ 19 | L_8888: 20 | return; 21 | 22 | } /* end of function */ 23 | 24 | -------------------------------------------------------------------------------- /src/gd3.x11/beginframe3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To begin a frame to the XWindow device. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * erase3_ 10 | *******************************************************************************/ 11 | void erase3(void); 12 | void dispatchevent3(int* nerr); 13 | 14 | void beginframe3(int* nerr) 15 | { 16 | *nerr = 0; 17 | 18 | /* Erase the window */ 19 | 20 | erase3(); 21 | 22 | /* Check for asynchronous events, in case of resize, etc. */ 23 | 24 | dispatchevent3(nerr); 25 | 26 | } 27 | 28 | /******************************************************************************* 29 | ** MODIFICATION HISTORY: 30 | * 920320: Portability to IBM. 31 | * 890607: Modified to run under X11 rather than X10. (kjm) 32 | * 870227: Original Version 33 | *******************************************************************************/ 34 | -------------------------------------------------------------------------------- /src/gd3.x11/calc_loc3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "../../inc/complex.h" 10 | #include "../../inc/proto.h" 11 | #include 12 | #include "../../inc/mach.h" 13 | #include "../../inc/gd3.x11.h" 14 | 15 | 16 | void calc_loc3(xloc,yloc,cbarxoffset,cbaryoffset,w_width,w_height,xpmn,xpmx,xmin,first,last,ypmn,ypdel,nerr) 17 | unsigned int *xloc, *yloc, *cbarxoffset, *cbaryoffset; 18 | unsigned int w_width, w_height; 19 | float xpmn,xpmx,xmin,first,last,ypmn,ypdel; 20 | int *nerr; 21 | { 22 | *nerr = 0; 23 | 24 | *xloc = (xpmn + (((xmin-first)/(last-first))*(xpmx-xpmn)))*(float)w_width; 25 | *yloc = (ypdel * (float)w_height)+ypmn*(float)w_height; 26 | *cbarxoffset = 45; 27 | *cbaryoffset = 0; 28 | 29 | L_8888: 30 | return ; 31 | 32 | } /* end of function */ 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/gd3.x11/endframe3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To end plotting to a frame. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * flushbuffer3 10 | *******************************************************************************/ 11 | void flushbuffer3(int* nerr); 12 | 13 | void endframe3(int* nerr) 14 | { 15 | int tmp = 0; 16 | flushbuffer3(&tmp); 17 | *nerr = tmp; 18 | } 19 | 20 | /******************************************************************************* 21 | ** MODIFICATION HISTORY: 22 | * 890608: Used as-is from X10 version. (kjm) 23 | * 870223: Original Version 24 | *******************************************************************************/ 25 | -------------------------------------------------------------------------------- /src/gd3.x11/erase3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To erase the window. 4 | * 5 | ** GLOBAL INPUT: 6 | * gd3.x11.h: plotw3->win 7 | * 8 | ** SUBROUTINES CALLED: 9 | * XClearWindow, XFlush 10 | *******************************************************************************/ 11 | 12 | #include 13 | #include "../../inc/gd3.x11.h" 14 | 15 | 16 | void erase3(void) 17 | { 18 | 19 | /* Erase window */ 20 | 21 | XClearWindow(display3,plotw3[c_win3].win); 22 | XFlush(display3); 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 890608: Modified to run under X11 rather than X10. (kjm) 28 | * 870318: Changes due to gd3.x10.h structure change. 29 | * 870223: Original Version 30 | *******************************************************************************/ 31 | -------------------------------------------------------------------------------- /src/gd3.x11/flushbuffer3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To flush the graphics buffer. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * XFlush 10 | *******************************************************************************/ 11 | #include 12 | #include "../../inc/gd3.x11.h" 13 | void flushbuffer3(int* nerr) 14 | { 15 | XFlush(display3); 16 | } 17 | 18 | /******************************************************************************* 19 | ** MODIFICATION HISTORY: 20 | * 890608: Modified to run under X11 rather than X10. (kjm) 21 | * 870223: Original Version 22 | *******************************************************************************/ 23 | -------------------------------------------------------------------------------- /src/gd3.x11/getratio3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the aspect ratio of the window. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * ratio: Aspect ratio of the window. (Pointer) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd3.x11.h: c_win3, plotw3->(width_p, height_p) 10 | *******************************************************************************/ 11 | 12 | #include 13 | #include "../../inc/gd3.x11.h" 14 | 15 | 16 | void getratio3(float* ratio) 17 | { 18 | 19 | /* Set the aspect ratio */ 20 | 21 | *ratio = (float) plotw3[c_win3].height_p/ (float) plotw3[c_win3].width_p; 22 | 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 890608: Used as-is from X10 version. (kjm) 28 | * 870318: Changes due to gd3.x10.h structure change. 29 | * 870223: Allowed for multiple windows. 30 | *******************************************************************************/ 31 | -------------------------------------------------------------------------------- /src/gd3.x11/settextsize3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the textsize. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * width: Width of text in fraction of viewport. (Pointer) 7 | * height: Height of text in fraction of viewport. (Pointer) 8 | * 9 | ******************************************************************************/ 10 | 11 | 12 | void settextsize3(float width, float height) 13 | { 14 | 15 | /* NO-OP */ 16 | /* Using a basic font for hardware text, so there is only one */ 17 | /* size of font for this device. */ 18 | 19 | } 20 | 21 | /******************************************************************************* 22 | ** MODIFICATION HISTORY: 23 | * 870227: Original Version 24 | *******************************************************************************/ 25 | -------------------------------------------------------------------------------- /src/gd3.x11/setwidth3.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the graphics line-width. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * index: Index of width entry in width list, starting at 0. (Pointer) 7 | * 8 | * SUBROUTINES CALLED: 9 | * DisplayCells,DefaultScreen,BlackPixel 10 | * 11 | ** GLOBAL INPUT: 12 | * pixdef3->pixel 13 | * 14 | ** GLOBAL OUTPUT: 15 | * pixdef3->pixel 16 | ******************************************************************************* 17 | ** MODIFICATION HISTORY: 18 | * 920526: Original version. 19 | *******************************************************************************/ 20 | 21 | #include 22 | #include "../../inc/gd3.x11.h" 23 | 24 | 25 | void setwidth3(int index) 26 | 27 | { 28 | 29 | XGCValues gcv; 30 | 31 | /* Set line-width */ 32 | gcv.line_width=index; 33 | XChangeGC(display3,plotw3[c_win3].gc,GCLineWidth,&gcv); 34 | } 35 | -------------------------------------------------------------------------------- /src/gd4.null/batchoff4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * terminate batching for Sun/View commands -- eg. pw_line, pw_polyline 4 | * 5 | ** INPUT ARGUMENTS: 6 | * (none) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd4com: c_win4, win_attr4[c_win4].pw 10 | * 11 | ** GLOBAL OUTPUT: 12 | * gd4com: c_win4, win_attr4[c_win4].pw 13 | * 14 | ** LOCAL VARIABLES: 15 | * (none) 16 | * 17 | *******************************************************************************/ 18 | 19 | 20 | void batchoff4(void) 21 | { 22 | 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 910206: Original Version (Courtesy of Betsy Foote) 28 | *******************************************************************************/ 29 | -------------------------------------------------------------------------------- /src/gd4.null/batchon4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * initiate batching for Sun/View commmands -- e.g., pw_line, pw_polyline 4 | * 5 | ** INPUT ARGUMENTS: 6 | * (none) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd4com: c_win4, win_attr4[c_win4].pw 10 | * 11 | ** GLOBAL OUTPUT: 12 | * gd4com: c_win4, win_attr4[c_win4].pw 13 | * 14 | ** LOCAL VARIABLES: 15 | * (none) 16 | * 17 | *******************************************************************************/ 18 | 19 | 20 | void batchon4(void ) 21 | { 22 | 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 910206: Original Version (Courtesy of Betsy Foote) 28 | *******************************************************************************/ 29 | -------------------------------------------------------------------------------- /src/gd4.null/batchshow4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * show current display being batched, as with pw_line or pw_polyline 4 | * 5 | ** INPUT ARGUMENTS: 6 | * (none) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd4com: c_win4, win_attr4[c_win4].pw 10 | * 11 | ** GLOBAL OUTPUT: 12 | * gd4com: c_win4, win_attr4[c_win4].pw 13 | * 14 | ** LOCAL VARIABLES: 15 | * (none) 16 | * 17 | *******************************************************************************/ 18 | 19 | 20 | void batchshow4(void) 21 | { 22 | 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 910206: Original Version 28 | *******************************************************************************/ 29 | -------------------------------------------------------------------------------- /src/gd4.null/beginframe4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To begin a frame to the SunWindow device. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * erase4_ 10 | *******************************************************************************/ 11 | 12 | void beginframe4(int* nerr) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 861205: Original Version 20 | *******************************************************************************/ 21 | -------------------------------------------------------------------------------- /src/gd4.null/beginwindow4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To begin ploting to a specified window. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * win_num: Window number to begin plotting to. (Pointer) 7 | * 8 | ** OUTPUT ARGUMENTS: 9 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 10 | * 11 | ** RETURN: 12 | * 0: No error. 13 | * 1: Error. 14 | * 15 | ** GLOBAL INPUT: 16 | * gd4com: win_attr4.status 17 | * 18 | ** GLOBAL OUTPUT: 19 | * gd4com: c_win4; 20 | *******************************************************************************/ 21 | 22 | 23 | void beginwindow4(int* win_num, int* nerr) 24 | { 25 | 26 | } 27 | 28 | /******************************************************************************* 29 | ** MODIFICATION HISTORY: 30 | * 870120: Original Version 31 | *******************************************************************************/ 32 | -------------------------------------------------------------------------------- /src/gd4.null/enddevice4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To end graphics to the SunWindow device. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd4com: win_attr4.(frame, status), num_wins4 10 | * 11 | ** GLOBAL OUTPUT: 12 | * gd4com: c_win4 13 | * 14 | ** SUBROUTINES CALLED: 15 | * window_set, window_destroy 16 | * 17 | ** LOCAL VARIABLES: 18 | * i: Loop counter. 19 | * 20 | *******************************************************************************/ 21 | 22 | void enddevice4(int* nerr) 23 | { 24 | 25 | } 26 | 27 | /******************************************************************************* 28 | ** MODIFICATION HISTORY: 29 | * 870120: Allowed for multiple windows. 30 | * 861205: Original Version 31 | *******************************************************************************/ 32 | -------------------------------------------------------------------------------- /src/gd4.null/endframe4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To end plotting to a frame. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * flushbuffer4_ 10 | *******************************************************************************/ 11 | 12 | void endframe4(int* nerr) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 861205: Original Version 20 | *******************************************************************************/ 21 | -------------------------------------------------------------------------------- /src/gd4.null/erase4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | i* PURPOSE: 3 | * To erase the window. 4 | * 5 | ** GLOBAL INPUT: 6 | * gd4com: c_win4, win_attr.(win_width_p, win_height_p, pw) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * pw_writebackground 10 | *******************************************************************************/ 11 | 12 | void erase4(void) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 870120: Allowed for multiple windows. 20 | * 861205: Original Version 21 | *******************************************************************************/ 22 | -------------------------------------------------------------------------------- /src/gd4.null/flushbuffer4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To flush the graphics buffer. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | *******************************************************************************/ 8 | 9 | void flushbuffer4(int* nerr) 10 | { 11 | 12 | } 13 | 14 | /******************************************************************************* 15 | ** MODIFICATION HISTORY: 16 | * 861205: Original Version 17 | *******************************************************************************/ 18 | -------------------------------------------------------------------------------- /src/gd4.null/getdevicein4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the device attributes. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * dev_name: Name of the device. 7 | * dev_type: Type of device. (Pointer) 8 | * dev_name_length: Length of dev_name. (Pointer) 9 | * 10 | ** GLOBAL INPUT: 11 | * gd4com: device_name4, device_type4 12 | * 13 | ** SUBROUTINES CALLED: 14 | * strcpy 15 | * 16 | *******************************************************************************/ 17 | 18 | void getdeviceinfo4(dev_name, dev_name_length, dev_type) 19 | char dev_name[]; 20 | int dev_name_length; 21 | int *dev_type; 22 | { 23 | 24 | } 25 | 26 | /******************************************************************************* 27 | ** MODIFICATION HISTORY: 28 | * 861205: Original Version 29 | *******************************************************************************/ 30 | -------------------------------------------------------------------------------- /src/gd4.null/getdevicera4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the aspect ratio of the device. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * ratio: Aspect ratio of device. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * we_getparentwindow, open, win_getrect, close 10 | * 11 | ** LOCAL VARIABLES: 12 | * fd: File descriptor. 13 | * name: Name of parent window. 14 | * rect: Rect containing information about the parent window. (Root) 15 | *******************************************************************************/ 16 | 17 | void getdevicerat4(float* ratio) 18 | { 19 | 20 | } 21 | 22 | /******************************************************************************* 23 | ** MODIFICATION HISTORY: 24 | * 880322: Changed from getting dimesions of "/dev/fb" to the parent window. 25 | * 861205: Original Version 26 | *******************************************************************************/ 27 | -------------------------------------------------------------------------------- /src/gd4.null/getratio4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the aspect ratio of the window. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * ratio: Aspect ratio of the window. (Pointer) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd4com: c_win4, win_attr4.(win_width_p, win_height_p) 10 | *******************************************************************************/ 11 | 12 | void getratio4(float* ratio) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 870120: Allowed for multiple windows. 20 | * 861205: Original Version 21 | *******************************************************************************/ 22 | -------------------------------------------------------------------------------- /src/gd4.null/getwindowst4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the status of a window. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * win_num: Window number to get status of. (Pointer) 7 | * 8 | ** OUTPUT ARGUMENTS: 9 | * exists: Status of window. Set to 1 if window is available for plotting. 10 | * 11 | ** GLOBAL INPUT: 12 | * gd4com: win_attr4.status 13 | *******************************************************************************/ 14 | 15 | void getwindowstat4(int *win_num, int *exists) 16 | { 17 | 18 | } 19 | 20 | /******************************************************************************* 21 | ** MODIFICATION HISTORY: 22 | * 870127: Original Version 23 | *******************************************************************************/ 24 | -------------------------------------------------------------------------------- /src/gd4.null/move4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To move to a given viewport location. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * xloc_vp: x location in viewport coordinates to move to. (Pointer) 7 | * yloc_vp: y location in viewport coordinates to move to. (Pointer) 8 | * 9 | ** GLOBAL INPUT: 10 | * gd4com: win_attr4.win_width_p, c_win4 11 | * 12 | ** GLOBAL OUTPUT: 13 | * gd4com: current_pt_p4, newline4, lineseg_p4 14 | *******************************************************************************/ 15 | 16 | void move4(float* xloc_vp, float* yloc_vp) 17 | { 18 | 19 | } 20 | 21 | /******************************************************************************* 22 | ** MODIFICATION HISTORY: 23 | * 870410: Added linestyle. 24 | * 870120: Allowed for multiple windows. 25 | * 861205: Original Version 26 | *******************************************************************************/ 27 | -------------------------------------------------------------------------------- /src/gd4.null/setcolor4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the graphics color. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * index: Index of color entry in color table, starting at 0. (Pointer) 7 | * 8 | ** GLOBAL OUTPUT: 9 | * gd4com: color4 10 | ******************************************************************************/ 11 | 12 | void setcolor4(int* index) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 861205: Original Version 20 | *******************************************************************************/ 21 | -------------------------------------------------------------------------------- /src/gd4.null/setlinestyl4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the linestyle type. 4 | * 5 | ******************************************************************************/ 6 | 7 | void setlinestyle4(int* linestyle) 8 | { 9 | 10 | } 11 | 12 | /******************************************************************************* 13 | ** MODIFICATION HISTORY: 14 | * 870408: Added linestyle. 15 | * 861205: Original Version. NO-OP 16 | *******************************************************************************/ 17 | -------------------------------------------------------------------------------- /src/gd4.null/settextsize4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the textsize. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * width: Width of text in fraction of viewport. (Pointer) 7 | * height: Height of text in fraction of viewport. (Pointer) 8 | * 9 | ******************************************************************************/ 10 | 11 | void settextsize4(float width, float height) 12 | { 13 | 14 | /* NO-OP */ 15 | /* There is only one size of system font for this device. */ 16 | 17 | } 18 | 19 | /******************************************************************************* 20 | ** MODIFICATION HISTORY: 21 | * 861205: Original Version 22 | *******************************************************************************/ 23 | -------------------------------------------------------------------------------- /src/gd4.null/setwidth4.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the graphics line-width. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * index: Index of width entry in width list, starting at 0. (Pointer) 7 | * 8 | ** GLOBAL OUTPUT: 9 | * gd4com: width4 10 | ******************************************************************************/ 11 | 12 | void setwidth4(int index) 13 | { 14 | 15 | } 16 | 17 | /******************************************************************************* 18 | ** MODIFICATION HISTORY: 19 | * 920526: Original Version 20 | *******************************************************************************/ 21 | -------------------------------------------------------------------------------- /src/gd5.gui/beginframe5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To begin a frame to the GUI device. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * erase3_ 10 | *******************************************************************************/ 11 | void erase5(void); 12 | 13 | void beginframe5(int* nerr) 14 | { 15 | *nerr = 0; 16 | 17 | /* Erase the window */ 18 | 19 | erase5(); 20 | 21 | /* Check for asynchronous events, in case of resize, etc. */ 22 | 23 | /* dispatchevent3(nerr); */ 24 | 25 | } 26 | 27 | /******************************************************************************* 28 | ** MODIFICATION HISTORY: 29 | * 102695: Original Version 30 | *******************************************************************************/ 31 | -------------------------------------------------------------------------------- /src/gd5.gui/calc_loc5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "../../inc/complex.h" 10 | #include "../../inc/proto.h" 11 | #include 12 | #include "../../inc/mach.h" 13 | #include "../../inc/gd5.gui.h" 14 | 15 | 16 | void calc_loc5(unsigned int *xloc,unsigned int *yloc,unsigned int *cbarxoffset,unsigned int *cbaryoffset,unsigned int w_width,unsigned int w_height,float xpmn,float xpmx,float xmin,float first,float last,float ypmn,float ypdel,int *nerr) 17 | { 18 | *nerr = 0; 19 | 20 | *xloc = (xpmn + (((xmin-first)/(last-first))*(xpmx-xpmn)))*(float)w_width; 21 | *yloc = (ypdel * (float)w_height)+ypmn*(float)w_height; 22 | *cbarxoffset = 45; 23 | *cbaryoffset = 0; 24 | 25 | L_8888: 26 | return ; 27 | 28 | } /* end of function */ 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/gd5.gui/endframe5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To end plotting to a frame. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * flushbuffer5 10 | *******************************************************************************/ 11 | void flushbuffer5(int* nerr); 12 | 13 | void endframe5(int* nerr) 14 | { 15 | int tmp = 0; 16 | flushbuffer5(&tmp); 17 | *nerr = tmp; 18 | } 19 | 20 | /******************************************************************************* 21 | ** MODIFICATION HISTORY: 22 | * 102695: Original Version 23 | *******************************************************************************/ 24 | -------------------------------------------------------------------------------- /src/gd5.gui/erase5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To erase the window. 4 | * 5 | ** GLOBAL INPUT: 6 | * gd5.gui.h: plotw5->win 7 | * 8 | ** SUBROUTINES CALLED: 9 | * XClearWindow, XFlush 10 | *******************************************************************************/ 11 | 12 | #include 13 | #include "../../inc/gd5.gui.h" 14 | 15 | 16 | void erase5(void) 17 | { 18 | 19 | /* Erase window */ 20 | 21 | XClearWindow(display5,plotw5[c_win5].win); 22 | XFlush(display5); 23 | } 24 | 25 | /******************************************************************************* 26 | ** MODIFICATION HISTORY: 27 | * 102795: Original Version 28 | *******************************************************************************/ 29 | -------------------------------------------------------------------------------- /src/gd5.gui/flushbuffer5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To flush the graphics buffer. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * nerr: Error flag. Set to 0 if no error occurs. (Pointer) 7 | * 8 | ** SUBROUTINES CALLED: 9 | * XFlush 10 | *******************************************************************************/ 11 | #include 12 | #include "../../inc/gd5.gui.h" 13 | void flushbuffer5(nerr) 14 | int *nerr; 15 | { 16 | XFlush(display5); 17 | } 18 | 19 | /******************************************************************************* 20 | ** MODIFICATION HISTORY: 21 | * 102795: Original Version 22 | *******************************************************************************/ 23 | -------------------------------------------------------------------------------- /src/gd5.gui/getratio5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To get the aspect ratio of the window. 4 | * 5 | ** OUTPUT ARGUMENTS: 6 | * ratio: Aspect ratio of the window. (Pointer) 7 | * 8 | ** GLOBAL INPUT: 9 | * gd5.gui.h: c_win5, plotw5->(width_p, height_p) 10 | *******************************************************************************/ 11 | 12 | #include 13 | #include "../../inc/gd5.gui.h" 14 | 15 | 16 | void getratio5(ratio) 17 | float *ratio; 18 | { 19 | 20 | /* Set the aspect ratio */ 21 | 22 | *ratio = (float) plotw5[c_win5].height_p/ (float) plotw5[c_win5].width_p; 23 | 24 | } 25 | 26 | /******************************************************************************* 27 | ** MODIFICATION HISTORY: 28 | * 102795: Original version 29 | *******************************************************************************/ 30 | -------------------------------------------------------------------------------- /src/gd5.gui/settextsize5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the textsize. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * width: Width of text in fraction of viewport. (Pointer) 7 | * height: Height of text in fraction of viewport. (Pointer) 8 | * 9 | ******************************************************************************/ 10 | 11 | 12 | void settextsize5(width, height) 13 | float width, height; 14 | { 15 | 16 | /* NO-OP */ 17 | /* Using a basic font for hardware text, so there is only one */ 18 | /* size of font for this device. */ 19 | 20 | } 21 | 22 | /******************************************************************************* 23 | ** MODIFICATION HISTORY: 24 | * 110195: Original Version 25 | *******************************************************************************/ 26 | -------------------------------------------------------------------------------- /src/gd5.gui/setwidth5.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** PURPOSE: 3 | * To set the graphics line-width. 4 | * 5 | ** INPUT ARGUMENTS: 6 | * index: Index of width entry in width list, starting at 0. (Pointer) 7 | * 8 | * SUBROUTINES CALLED: 9 | * DisplayCells,DefaultScreen,BlackPixel 10 | * 11 | ** GLOBAL INPUT: 12 | * pixdef5->pixel 13 | * 14 | ** GLOBAL OUTPUT: 15 | * pixdef5->pixel 16 | ******************************************************************************* 17 | ** MODIFICATION HISTORY: 18 | * 920526: Original version. 19 | *******************************************************************************/ 20 | 21 | #include 22 | #include "../../inc/gd5.gui.h" 23 | 24 | 25 | void setwidth5(index) 26 | int index; 27 | 28 | { 29 | 30 | XGCValues gcv; 31 | 32 | /* Set line-width */ 33 | gcv.line_width=index; 34 | XChangeGC(display5,plotw5[c_win5].gc,GCLineWidth,&gcv); 35 | } 36 | -------------------------------------------------------------------------------- /src/gdm/adj_geometry.c: -------------------------------------------------------------------------------- 1 | #define HT_ADJUST 32 2 | #define WD_ADJUST 32 3 | 4 | #include 5 | #include 6 | #include 7 | #include "../../inc/complex.h" 8 | #include "../../inc/proto.h" 9 | #include 10 | #include "../../inc/mach.h" 11 | #include "../../inc/gdm.h" 12 | 13 | 14 | void adj_geometry(width, height, nerr) 15 | unsigned int *width, *height; 16 | int *nerr; 17 | { 18 | 19 | 20 | if( Lgdon[1] ) 21 | *nerr = 1; 22 | if( Lgdon[2] ){ 23 | *width /= WD_ADJUST; 24 | *height /= HT_ADJUST; 25 | *nerr = 0; 26 | } 27 | if( Lgdon[3] ) 28 | *nerr = 0; 29 | if( Lgdon[4] ) 30 | *nerr = 1; 31 | if( Lgdon[5] ) 32 | *nerr = 0; 33 | 34 | L_8888: 35 | return; 36 | } /* end of function */ 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/gpm/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) -I/usr/X11R5/include $< 8 | 9 | LIB = ../../lib/libgpm.a 10 | 11 | LIBOBJS = begingraphic.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | 17 | clean: 18 | /bin/rm -f *.o 19 | 20 | begingraphic.o: begingraphic.c 21 | -------------------------------------------------------------------------------- /src/history/History.doc: -------------------------------------------------------------------------------- 1 | *********************** Changes to SAC to use a history list ******************* 2 | 3 | 4 | changes to sac.c: 5 | #include "../../inc/history.h" 6 | strcpy(kmsg,AddToHistory(kmsg); 7 | 8 | Created the file history.h and added it to $SACDIR/inc 9 | 10 | 11 | Created the directory history under $SACDIR/src. This contains the source 12 | file history.c which implements the history command. The remaining 13 | documentation for history is in history.c 14 | 15 | Created a makefile for history. 16 | 17 | -------------------------------------------------------------------------------- /src/history/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libhistory.a 10 | 11 | LIBOBJS = history.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | 20 | history.o: history.c $(INC)/history.h 21 | -------------------------------------------------------------------------------- /src/icm/NDC/complexNDC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Header file for complex operations. November 24, 1987 TWM 3 | * Required by library, libresponse 4 | */ 5 | 6 | /* 7 | * SccsId: @(#)include_src/complex.h 106.1 05/15/96 8 | */ 9 | 10 | #ifndef _CSS_COMPLEX_INCLUDE 11 | #define _CSS_COMPLEX_INCLUDE 12 | 13 | #include 14 | 15 | #ifndef M_PI 16 | #define M_PI 3.1415926536 17 | #endif 18 | #define TWOPI (2*M_PI) 19 | #define RAD_TO_DEG (180./M_PI) 20 | #define RAD 1 21 | #define DEG 0 22 | 23 | typedef struct { 24 | double r, i; 25 | } DCOMPLEX; 26 | 27 | DCOMPLEX zload(); 28 | DCOMPLEX zadd(); 29 | DCOMPLEX zfadd(); 30 | DCOMPLEX zsubt(); 31 | DCOMPLEX zmult(); 32 | DCOMPLEX zfmult(); 33 | DCOMPLEX zdiv(); 34 | DCOMPLEX zconjg(); 35 | DCOMPLEX zexp(); 36 | 37 | double zabs(); 38 | double zphas(); 39 | 40 | #endif /* !_CSS_COMPLEX_INCLUDE */ 41 | -------------------------------------------------------------------------------- /src/icm/NDC/lagrange.c: -------------------------------------------------------------------------------- 1 | 2 | #include "libresponse.h" 3 | 4 | void 5 | lagrange (f, xi, n, x, fx) /* evenly spaced , in order */ 6 | double *f, *xi; 7 | int n; 8 | double x, *fx; 9 | { 10 | int i, k; 11 | double prod; 12 | 13 | *fx = 0.0; 14 | for (k = 0; k < n; k++) 15 | { 16 | prod = 1.0; 17 | for (i = 0; i < n; i++) 18 | { 19 | if (i != k) 20 | prod = prod * (x - xi[i]) / (xi[k] - xi[i]); 21 | } 22 | *fx = *fx + prod * f[k]; 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/icm/NDC/libresponse_version.c: -------------------------------------------------------------------------------- 1 | char ___921196265_libresponse_date_compiled[] = "@(#)libresponse 03/11/1999 23:51:05"; 2 | char libresponse_VersionID[] = "Name(libresponse) Version(None) Date(03/11/1999 23:51:05)"; 3 | -------------------------------------------------------------------------------- /src/icm/NDC/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.o : 5 | $(CC) -c -DNDEBUG $(CFLAGS) $< 6 | 7 | LIB = ../../../lib/sac.a 8 | 9 | 10 | LIBOBJS = ndcTransfer.o fap.o fir.o paz.o unscaled_response.o odfftr.o csserror.o polar.o lagrange.o 11 | 12 | library: $(LIBOBJS) 13 | ar r ../../../lib/libsac.a $(LIBOBJS) 14 | 15 | clean: 16 | rm -rf *.o 17 | -------------------------------------------------------------------------------- /src/icm/NDC/polar.c: -------------------------------------------------------------------------------- 1 | 2 | #ifndef lint 3 | static char SccsId[] = "@(#)libresponse/polar.c 105.1 05/29/96 Copyright 1994 Science Applications International Corporation."; 4 | #endif 5 | 6 | /* Functions to convert from and to polar coordinates */ 7 | 8 | #include 9 | #include "libresponse.h" 10 | 11 | void 12 | topolar (real, imag, amp, phase) 13 | double real, imag, *amp, *phase; 14 | { 15 | *amp = sqrt(real*real + imag*imag); 16 | if (imag == 0.0 && real == 0.0) 17 | *phase = 0.0; 18 | else 19 | *phase = atan2(imag, real); 20 | } 21 | 22 | void 23 | tocmplx (real, imag, amp, phase) 24 | double *real, *imag, amp, phase; 25 | { 26 | *real = amp * cos(phase); 27 | *imag = amp * sin(phase); 28 | } 29 | -------------------------------------------------------------------------------- /src/icm/dbFuncs.h: -------------------------------------------------------------------------------- 1 | #ifndef DB_FUNCS_H 2 | #define DB_FUNCS_H 3 | 4 | char *GetRESPfileNameFromDB(char *station, char *component, char *locid, 5 | double EpochTime , char * rtypeOut ); 6 | 7 | void DisconnectFromOracleTransfer(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /src/icm/eyeomg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | #include "../../inc/mach.h" 7 | void /*FUNCTION*/ eyeomg(nfreq, delfrq, xre, xim, nzer) 8 | int nfreq; 9 | double delfrq, xre[], xim[]; 10 | int nzer; 11 | { 12 | int i, i_, npole; 13 | float const_; 14 | complexf pole[30], zero[1]; 15 | 16 | complexf *const Pole = &pole[0] - 1; 17 | double *const Xim = &xim[0] - 1; 18 | double *const Xre = &xre[0] - 1; 19 | complexf *const Zero = &zero[0] - 1; 20 | 21 | 22 | 23 | 24 | 25 | /* .....I - Omega..... 26 | * 27 | * 28 | * .....Set poles and zeros..... 29 | * */ 30 | const_ = 1.0; 31 | npole = 0; 32 | 33 | for( i = 1; i <= nzer; i++ ){ 34 | i_ = i - 1; 35 | Zero[i] = flttocmplx( 0.0, 0.0 ); 36 | } 37 | 38 | /* .....Compute transfer function..... 39 | * */ 40 | getran( nfreq, delfrq, const_, nzer, zero, npole, pole, xre, xim ); 41 | 42 | return; 43 | } /* end of function */ 44 | 45 | -------------------------------------------------------------------------------- /src/icm/nonOracle/dbaseCommand.c: -------------------------------------------------------------------------------- 1 | void dbaseResponse(int a, double b , double* c, double* d, float* e, int* nerr) 2 | { 3 | *nerr = 8101; 4 | } 5 | /* ---------------------------------------------------------------------- */ 6 | 7 | void DisconnectFromOracleTransfer(void) 8 | { 9 | 10 | } 11 | /* ---------------------------------------------------------------------- */ 12 | 13 | void getSensorInstrumentCalibInfo(double* ncalper, double* ncalib, double* calper, double* calratio ) 14 | { 15 | *ncalper = -999.0; 16 | *ncalib = -999.0; 17 | *calper = -999.0; 18 | *calratio = -999.0; 19 | } 20 | /* ---------------------------------------------------------------------- */ 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/icm/nonOracle/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | 4 | .c.a : 5 | $(CC) -c $(CFLAGS) $< 6 | @ ar r $@ $*.o 7 | @ rm -f $*.o 8 | 9 | LIB = ../../../lib/libSacOracleStubFuncs.a 10 | 11 | LIBOBJS = $(LIB)(dbaseCommand.o) 12 | 13 | library: $(LIBOBJS) 14 | 15 | clean: 16 | /bin/rm -f *.o 17 | 18 | dbaseCommand.o: dbaseCommand.c 19 | -------------------------------------------------------------------------------- /src/icm/vel.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | #include "../../inc/mach.h" 7 | void /*FUNCTION*/ vel(nfreq, delfrq, xre, xim) 8 | int nfreq; 9 | double delfrq, xre[], xim[]; 10 | { 11 | int npole, nzero; 12 | float const_; 13 | complexf pole[1], zero[1]; 14 | 15 | complexf *const Pole = &pole[0] - 1; 16 | double *const Xim = &xim[0] - 1; 17 | double *const Xre = &xre[0] - 1; 18 | complexf *const Zero = &zero[0] - 1; 19 | 20 | 21 | 22 | 23 | /* .....VEL - velocity spectral operator..... 24 | * */ 25 | 26 | 27 | /* .....Set poles and zeros..... 28 | * */ 29 | const_ = 1.0; 30 | nzero = 1; 31 | 32 | Zero[1] = flttocmplx( 0.0, 0.0 ); 33 | 34 | npole = 0; 35 | 36 | /* .....Compute transfer function..... 37 | * */ 38 | getran( nfreq, delfrq, const_, nzero, zero, npole, pole, xre, 39 | xim ); 40 | 41 | return; 42 | } /* end of function */ 43 | 44 | -------------------------------------------------------------------------------- /src/main/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o: 7 | $(CC) $(CFLAGS) -c $(SAC_INCLUDES) $< 8 | 9 | sac.o: sac.c ../../inc/mach.h ../../inc/exm.h 10 | 11 | clean: 12 | /bin/rm -f *.o 13 | -------------------------------------------------------------------------------- /src/msg/apcmsg2.c: -------------------------------------------------------------------------------- 1 | /* 2 | Routine to copy substrings into null terminated strings to 3 | pass to apcmsg. 4 | 5 | L. Minner 6 | 9/8/93 7 | */ 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "../../inc/complex.h" 13 | #include "../../inc/proto.h" 14 | #include "../../inc/mach.h" 15 | #include "../../inc/msg.h" 16 | 17 | void apcmsg2(char* kalpha, int kalpha_s) 18 | { 19 | char message[MCMSG]; 20 | 21 | int msglen = (kalpha_s < (MCMSG - 1)) ? kalpha_s : (MCMSG - 1); 22 | 23 | strncpy(message,kalpha,msglen); 24 | message[msglen] = '\0'; 25 | 26 | apcmsg(message,msglen + 1); 27 | 28 | return; 29 | 30 | } /* end of function */ 31 | 32 | -------------------------------------------------------------------------------- /src/nnm/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libnnm.a 10 | 11 | LIBOBJS = xnnmc.o xwritenn.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | xnnmc.o: xnnmc.c $(INC)/mach.h 20 | xwritenn.o: xwritenn.c $(INC)/mach.h $(INC)/dfm.h $(INC)/hdr.h \ 21 | $(INC)/mem.h $(INC)/nnm.h 22 | -------------------------------------------------------------------------------- /src/site/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libsite.a 10 | 11 | LIBOBJS = initsite.o xsitecom.o xtestsite.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | initsite.o: initsite.c $(INC)/mach.h $(INC)/site.h 20 | xsitecom.o: xsitecom.c $(INC)/mach.h $(INC)/site.h 21 | xtestsite.o: xtestsite.c $(INC)/mach.h $(INC)/site.h 22 | -------------------------------------------------------------------------------- /src/smm/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libsmm.a 10 | 11 | INC1 = $(INC)/mach.h $(INC)/smm.h 12 | INC2 = $(INC1) $(INC)/dfm.h $(INC)/hdr.h 13 | 14 | LIBOBJS = inismm.o ptp.o xmarkptp.o xmarktimes.o \ 15 | xmarkvalue.o xrms.o xsmmc.o 16 | 17 | library: $(LIBOBJS) 18 | ar r ../../lib/libsac.a $(LIBOBJS) 19 | 20 | clean: 21 | /bin/rm -f *.o 22 | 23 | inismm.o: inismm.c $(INC1) 24 | ptp.o: ptp.c 25 | xmarkptp.o: xmarkptp.c $(INC2) $(INC)/mem.h $(INC)/eam.h 26 | xmarktimes.o: xmarktimes.c $(INC2) $(INC)/mem.h 27 | xmarkvalue.o: xmarkvalue.c $(INC2) $(INC)/mem.h 28 | xrms.o: xrms.c $(INC2) $(INC)/lhf.h $(INC)/mem.h 29 | xsmmc.o: xsmmc.c $(INC1) 30 | -------------------------------------------------------------------------------- /src/spe/xrcor.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | #include "../../inc/mach.h" 7 | void /*FUNCTION*/ xrcor(nerr) 8 | int *nerr; 9 | { 10 | 11 | *nerr = 1115; 12 | setmsg( "ERROR", *nerr ); 13 | apcmsg( "READCOR",8 ); 14 | 15 | L_8888: 16 | return; 17 | 18 | } /* end of function */ 19 | 20 | -------------------------------------------------------------------------------- /src/ssi/alignFiles.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "dfm.h" 4 | #include "ssi.h" 5 | 6 | 7 | void sacToSeisMgr ( int lnew , int lupdate , int ldata , int *nerr ); 8 | void rollback (int whichHeaders , int * nerr); 9 | 10 | void alignFiles ( int *nerr ) 11 | { 12 | /* Commit, recall, or rollback existing data as per user specs. */ 13 | switch ( cmdfm.icomORroll ) { 14 | case COMMIT : 15 | sacToSeisMgr ( 0 , 0 , 1 , nerr ) ; 16 | break ; 17 | case RECALL : 18 | sacToSeisMgr ( 0 , 1 , 0 , nerr ) ; 19 | if ( *nerr ) 20 | break ; 21 | rollback ( wfHeader , nerr ) ; 22 | break ; 23 | case ROLLBACK : 24 | rollback ( allHeader , nerr ) ; 25 | break ; 26 | } /* end switch */ 27 | } 28 | -------------------------------------------------------------------------------- /src/sss/ttlim.h: -------------------------------------------------------------------------------- 1 | /* ttlim.h */ 2 | /* PARAMETER translations */ 3 | #define JBRN 100 4 | #define JBRNA JBRN 5 | #define JBRNU JBRN 6 | #define JOUT 2250 7 | #define JREC (JTSM + JXSM) 8 | #define JSEG 30 9 | #define JSRC 150 10 | #define JTSM 350 11 | #define JTSM0 (JTSM + 1) 12 | #define JXSM JBRN 13 | /* end of PARAMETER translations */ 14 | 15 | -------------------------------------------------------------------------------- /src/top/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libtop.a 10 | 11 | LIBOBJS = executecomman.o findcommand.o initcommon.o initsac.o saccommands.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | executecomman.o: executecomman.c $(INC)/mach.h $(INC)/comlists.h $(INC)/site.h 20 | findcommand.o: findcommand.c $(INC)/mach.h $(INC)/comlists.h $(INC)/site.h 21 | initcommon.o: initcommon.c $(INC)/mach.h $(INC)/mem.h $(INC)/csf.h $(INC)/gdm.h $(INC)/dfm.h $(INC)/cnv.h $(INC)/vars.h $(INC)/dload.h 22 | initsac.o: initsac.c $(INC)/mach.h $(INC)/exm.h $(INC)/gam.h $(INC)/sam.h 23 | saccommands.o: saccommands.c $(INC)/mach.h $(INC)/exm.h $(INC)/cnd.h 24 | -------------------------------------------------------------------------------- /src/ucf/next2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../../inc/complex.h" 5 | #include "../../inc/proto.h" 6 | int /*FUNCTION*/ next2(int num) 7 | { 8 | int result = 2; 9 | while(result < num ){ 10 | result *= 2; 11 | } 12 | return result; 13 | } /* end of function */ 14 | 15 | -------------------------------------------------------------------------------- /src/wild/makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS=$(SACCFLAGS) 3 | INC = ../../inc 4 | SAC_INCLUDES = -I$(INC) 5 | 6 | .c.o : 7 | $(CC) -c $(CFLAGS) $(SAC_INCLUDES) $< 8 | 9 | LIB = ../../lib/libwild.a 10 | 11 | LIBOBJS = getdir.o lfilec.o lwildc.o wildch.o wildfl.o 12 | 13 | library: $(LIBOBJS) 14 | ar r ../../lib/libsac.a $(LIBOBJS) 15 | 16 | clean: 17 | /bin/rm -f *.o 18 | 19 | getdir.o: getdir.c $(INC)/mach.h 20 | lfilec.o: lfilec.c $(INC)/mach.h $(INC)/wild.h 21 | lwildc.o: lwildc.c $(INC)/mach.h $(INC)/wild.h 22 | wildch.o: wildch.c $(INC)/wild.h 23 | wildfl.o: wildfl.c $(INC)/mach.h $(INC)/dfm.h 24 | -------------------------------------------------------------------------------- /src/xyz/adjust_width.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "../../inc/complex.h" 4 | #include "../../inc/proto.h" 5 | 6 | /* output_image is assumed to be width_out*height int */ 7 | 8 | void adjust_width(input_image, width, height, output_image, width_out, 9 | xmin, xmax, nerr) 10 | float *input_image; 11 | unsigned int width, height; 12 | float *output_image; 13 | unsigned int width_out; 14 | float xmin, xmax; 15 | int *nerr; 16 | { 17 | int i; 18 | 19 | /* use the linear interpolation routine to adjust data width */ 20 | 21 | for( i=0; i 2 | #include 3 | #include "../../inc/complex.h" 4 | #include "../../inc/proto.h" 5 | 6 | void subtract(input1,input2,output,npoints,nerr) 7 | float *input1, *input2, *output; 8 | int npoints; 9 | int *nerr; 10 | 11 | { 12 | int i; 13 | 14 | *nerr = 0; 15 | 16 | for(i=0; i 2 | #include 3 | #include 4 | #include "complex.h" 5 | #include "proto.h" 6 | void /*FUNCTION*/ writezdata(filename, filename_s, zdata, nzsize, nerr) 7 | char *filename; int filename_s; 8 | float zdata[]; 9 | int *nzsize, *nerr; 10 | { 11 | int _l0, notused, nun; 12 | void zwabs(); 13 | 14 | 15 | /* - Create file */ 16 | 17 | znfile( &nun, filename,filename_s, "DATA",5, nerr ); 18 | if( *nerr != 0 ) 19 | goto L_8888; 20 | 21 | /* - Write data to file */ 22 | 23 | _l0 = 0; 24 | zwabs( &nun, zdata, *nzsize, &_l0, nerr ); 25 | if( *nerr != 0 ) 26 | goto L_8888; 27 | 28 | /* - Close file. */ 29 | 30 | zclose( &nun, ¬used ); 31 | 32 | L_8888: 33 | return; 34 | 35 | } /* end of function */ 36 | 37 | 38 | -------------------------------------------------------------------------------- /utils/SAC2LINUX/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | #CFLAGS = -O2 3 | CFLAGS = -g 4 | INCLUDE = . 5 | all : saclinux2sun sacsun2linux 6 | 7 | .c.o: 8 | $(CC) -I$(INCLUDE) $(CFLAGS) -c $*.c 9 | 10 | saclinux2sun : saclinux2sun.o sac.h 11 | $(CC) $(CFLAGS) -o saclinux2sun saclinux2sun.o 12 | 13 | sacsun2linux : sacsun2linux.o sac.h 14 | $(CC) $(CFLAGS) -o sacsun2linux sacsun2linux.o 15 | 16 | clean : 17 | rm -f *.o saclinux2sun sacsun2linux 18 | -------------------------------------------------------------------------------- /utils/makefile: -------------------------------------------------------------------------------- 1 | FFLAGS=$(SACFFLAGS) $(TEMPFFLAGS) 2 | CFLAGS=$(SACCFLAGS) $(TEMPCFLAGS) 3 | GRAPHICSLIBS = -lsacf -Bdynamic -lX11 -lsocket 4 | all: sgflist sgfmerge sgfplot sgftops sgftoai 5 | sgftops: sgftops.c 6 | cc $(CFLAGS) -o sgftops sgftops.c 7 | sgftoai: sgftoai.c 8 | cc $(CFLAGS) -o sgftoai sgftoai.c -lm 9 | sgflist: sgflist.f mach 10 | f77 $(FFLAGS) -o sgflist sgflist.f -lsacf 11 | sgfmerge: sgfmerge.f mach 12 | f77 $(FFLAGS) -o sgfmerge sgfmerge.f -lsacf 13 | sgfplot: sgfplot.f mach 14 | f77 $(FFLAGS) -o sgfplot sgfplot.f $(GRAPHICSLIBS) 15 | clean: 16 | rm -f sgftops sgftoai sgflist sgfmerge sgfplot 17 | -------------------------------------------------------------------------------- /utils/makefile.linux: -------------------------------------------------------------------------------- 1 | FFLAGS=$(SACFFLAGS) $(TEMPFFLAGS) 2 | CFLAGS=$(SACCFLAGS) $(TEMPCFLAGS) 3 | GRAPHICSLIBS = -lsacf -Bdynamic -lX11 -lsocket 4 | #all: sgflist sgfmerge sgfplot sgftops sgftoai 5 | all: sgftops sgftoai 6 | sgftops: sgftops.c 7 | cc $(CFLAGS) -o sgftops sgftops.c 8 | sgftoai: sgftoai.c 9 | cc $(CFLAGS) -o sgftoai sgftoai.c -lm 10 | #sgflist: sgflist.f mach 11 | # f77 $(FFLAGS) -o sgflist sgflist.f -lsacf 12 | #sgfmerge: sgfmerge.f mach 13 | # f77 $(FFLAGS) -o sgfmerge sgfmerge.f -lsacf 14 | #sgfplot: sgfplot.f mach 15 | # f77 $(FFLAGS) -o sgfplot sgfplot.f $(GRAPHICSLIBS) 16 | -------------------------------------------------------------------------------- /utils/makefile.solaris: -------------------------------------------------------------------------------- 1 | FFLAGS=$(SACFFLAGS) $(TEMPFFLAGS) 2 | CFLAGS=$(SACCFLAGS) $(TEMPCFLAGS) 3 | GRAPHICSLIBS = -lsacf -Bdynamic -lX11 -lsocket 4 | all: sgflist sgfmerge sgfplot sgftops sgftoai 5 | sgftops: sgftops.c 6 | cc $(CFLAGS) -o sgftops sgftops.c 7 | sgftoai: sgftoai.c 8 | cc $(CFLAGS) -o sgftoai sgftoai.c -lm 9 | sgflist: sgflist.f mach 10 | f77 $(FFLAGS) -o sgflist sgflist.f -lsacf 11 | sgfmerge: sgfmerge.f mach 12 | f77 $(FFLAGS) -o sgfmerge sgfmerge.f -lsacf 13 | sgfplot: sgfplot.f mach 14 | f77 $(FFLAGS) -o sgfplot sgfplot.f $(GRAPHICSLIBS) 15 | clean: 16 | rm -f sgftops sgftoai sgflist sgfmerge sgfplot 17 | --------------------------------------------------------------------------------