/* Steven Andrews, 9/98	*/
/* See documentation called Spectra doc */
/* Copyright 2003 by Steven Andrews.  Permission is granted
   for non-commercial use of and modifications to the code. */

#ifndef __Spectra_h
#define __Spectra_h

#include "string2.h"
#define MAXARG 20

typedef struct spect	{
	char name[STRCHAR];
	char file[STRCHAR];
	char desc[STRCHAR];
	char xunit[STRCHAR];
	char yunit[STRCHAR];
	char color[STRCHAR];
	int n;
	int cmplx;
	float *x;
	float *y; } *sptr;
	
sptr SpectAlloc(char *name,char *file,char *desc,char *xunit,char *yunit);
void SpectFree(sptr s);
int LoadSpect(sptr *spt,char *fname,int xcol,int ycol,int skip);
int SaveSpect(sptr s);
void SpectRange(sptr s,float *xa,float *xb,float *ya,float *yb,int fn);
void TypeSpect(sptr s);
void PlotSpect(sptr s);
int SpectMath(sptr s1,sptr s2,sptr *s3ptr,char *fn,float k);
int SpectMath2(sptr s,sptr *ansptr,float *num,int nn,char *fn,char *fn2);

#endif