diff --git a/src/stellar_spectrum.c b/src/stellar_spectrum.c
--- a/src/stellar_spectrum.c
+++ b/src/stellar_spectrum.c
1. Rebranded to CADS/UVS, reset version to 1.0 in new cads git repository
2. Renamed to stellar_spectrum
3. read/write ops shifted to read_write.c
+
+Reks: 12 Aug 2012: v1.01
+1. New option to specify the parameter filename - this was needed to run
+ multiple instances of stellar_spectrum in a folder (cads uvsky simulation)
----------------------------------------------------------------------------*/
#include "stellar_spectrum.h"
#include <sys/types.h>
+char *optarg;
+int optindex;
+
/* Main program starts here*/
/****************************************************************************/
int main (int argc, char *argv[])
strcpy(ParamFile, paramfile);/*paramfile is defined in header file*/
/* Command line options*/
- while ( (c = my_getopt (argc, argv, "gh") ) != EOF)
+ while ( (c = my_getopt (argc, argv, "p:gh") ) != EOF)
switch (c)
{
case 'g':
gen_stspec_params(ParamFile);
return(EXIT_SUCCESS);
break;
+ case 'p':
+ strcpy(ParamFile, optarg);
+ break;
case 'h':
usage();
break;
}
/* Open and read the parameter file */
- READ_PARAMS(paramfile, &stars, OutFile);
+ READ_PARAMS(ParamFile, &stars, OutFile);
/* try opening the wave file */
if ((wave_ptr = fopen(stars.WaveFile,"r")) == NULL)
{