summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9fd9d1d)
raw | patch | inline | side by side (parent: 9fd9d1d)
author | Rekhesh Mohan <reks@iiap.res.in> | |
Sun, 12 Aug 2012 11:01:40 +0000 (16:31 +0530) | ||
committer | Rekhesh Mohan <reks@iiap.res.in> | |
Sun, 12 Aug 2012 11:01:40 +0000 (16:31 +0530) |
ChangeLog.txt | patch | blob | history | |
README.txt | patch | blob | history | |
configure.ac | patch | blob | history | |
src/read_write.c | patch | blob | history | |
src/stellar_spectrum.c | patch | blob | history |
diff --git a/ChangeLog.txt b/ChangeLog.txt
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
NOTE: This file records the changes made after the release of the stable
version UVS_stellar_spectrum-1.0
------------------------------------------------------------------------
+
+v1.01
+ * New option to specify the name of input parameter file (using -p)
+ this was needed to run multiple instances of stellar_spectrum in a folder
+ (for cads uvsky simulation)
+
diff --git a/README.txt b/README.txt
--- a/README.txt
+++ b/README.txt
Options are:
-h help
- -g Generates a well documented default parameter file
-
-Once you have the default parameter file, you can edit it as per your needs
-and run the program without any arguments to generate the stellar spectrum.
-NOTE: This program requires the kurucz model datafiles to simulate stellar
-spectrum. If you have installed it right, these files would be installed in
+ -g Generates a well documented default parameter file
+ Once you have the default parameter file, you can edit it as per your
+ needs and run the program without any arguments to generate the stellar
+ spectrum.
+
+ -p <parameter_file>
+ Default parameter file is "stellarspec_initparams.txt". You can
+ override this using -p flag. For eg., if several instances of this
+ program are running in parallel from same directory, this flag can
+ be used to avoid conflicts around same parameter file name.
+
+NOTE: This program requires the kurucz model datafiles to simulate stellar
+spectrum. If you have installed it right, these files would be installed in
<prefix>/share/cads/data/ and the default parameter file is aware of the
location. These datafiles are also available in the subdirectory named
-"spectral_data" inside the source distribution as well.
+"spectral_data" inside the source distribution as well.
3. DOCUMENTATION
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-AC_INIT([CADS_stellar_spectrum], [1.0], [cads@iiap.res.in])
+AC_INIT([CADS_stellar_spectrum], [1.01], [cads@iiap.res.in])
AC_LANG_C
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([config.h.in])
diff --git a/src/read_write.c b/src/read_write.c
--- a/src/read_write.c
+++ b/src/read_write.c
printf (" Usage: uvs_stellar_spectrum [options]\n\n");
printf (" options are:\n");
printf (" [-g] Generates the default parameter file \n");
+ printf (" [-p] <parameter_file> : Use inputs from <parameter_file>\n");
printf (" [-h] help \n\n" );
printf (" In the absence of command line options, the program would\n");
printf (" read inputs on stellar magnitude, reddening and spectral \n");
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)
{