1 /***************************************************************************
2 * This File is a part of the CADS/UV Stellar Spectrum model software *
3 * Copyright (C) 2012 by CADS/UV Software Team, *
4 * Indian Institute of Astrophysics *
5 * Bangalore 560034 *
6 * cads_AT_iiap.res.in *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22 ***************************************************************************/
23 /********************************************************************
24 *Modelling of the UV Sky
25 *Sujatha N V & Jayant Murthy
26 ********************************************************************
27 *file : sptmagflux.h
28 *
29 *Description: Header file for the program(s)
30 * "SpTMAGFlux.c"
31 *
32 *Last modified date: Aug. 04, 2004
34 Reks, 07th July, 2007
35 Renamed file to mag2flux.h, as a part of re-organizing project
36 to mag2counts.
38 Reks, 01 July 2012
39 Another rename to stellar_spectrum.h as a part of rebranding the
40 whole thing to cads.
41 *********************************************************************/
42 #ifdef HAVE_CONFIG_H
43 #include <config.h>
44 #endif
46 #include <stdio.h>
47 #include <stdlib.h>
48 #include <string.h>
49 #include <math.h>
51 #ifndef CADSDATA
52 #define CADSDATA ' '
53 #endif
55 #define PROGRAM "UVS_stellar_spectrum"
57 #define N_Tmax 4000
58 #define N_FLUX 4000
59 #define TAB_LEN 150
60 #define TAB_DELIM "|"
61 /*Maximum number of elements in a data file*/
62 #define MAX_ELEMENTS 10000
63 /*Maximum number of elements in a text line*/
64 #define MAX_TEXT 150
66 /* The input parameter file */
67 #define paramfile "stellarspec_initparams.txt"
69 /* directory containing spectral data files
70 (inside SPDATA_DIR, read from parameter file) */
71 #define MKSPDATA_DIR "MKSpDATA"
73 /* Root name for the spectral data files */
74 #define MKSPDATA_FROOT "MKSpType"
76 /* File containing wavelengths for which flux will be calculated */
77 #define WAVELENGTH_FILE "wave.dat"
79 /* File with cross sections at wavelengths specified in WAVELENGTH_FILE */
80 #define SIGMA_FILE "crossec0.dat"
82 /*Definition of the data structure of the Table Spec-Type, Temp & g */
83 struct S_TABLE
84 {
85 char star_name[N_Tmax][13]; /* Spectral Type. */
86 char TG_name[N_Tmax][MAX_TEXT]; /* Kurucz flux File name */
87 float Bflux[N_Tmax]; /* Kurucz Flux in B filter */
88 float Vflux[N_Tmax]; /* Kurucz Flux for V filter (5500Å). */
89 float Oflux[N_Tmax]; /* Kurucz Flux under investigation. */
90 float OWlength; /* Wavelength of investigation. */
91 int N_tab; /* Number of TABLE items. */
92 char KFluxdir0[MAX_TEXT]; /* Directory of the Kurucz flux Files */
93 char w_filename[MAX_TEXT]; /* String to hold MKSpTypewwww.in */
94 };
96 /*Definition of the data structure for Hipparcos stars*/
97 struct STARS
98 {
99 char sp_type[22]; /* Spectral Type. */
100 char tg_type[16]; /* Kurucz flux FILE NAME */
101 float Wlength[N_FLUX]; /* Wavelength of investigation. */
102 double C_Section[N_FLUX]; /* Extinction Cross-Section */
103 float mv; /* Visual Magnitude of the Star. */
104 double Bflux; /* B - V expected */
105 double Vflux; /* V flux form Kurucz flux */
106 double Oflux; /* O flux form Kurucz flux */
107 float alpha; /* Scale value for Kurucz flux */
108 float Ebv; /* Jhonson V mag */
109 char SigmaFile[MAX_TEXT]; /* Crosssection file */
110 char WaveFile[MAX_TEXT]; /* Wavelength File */
111 char dir_root[MAX_TEXT]; /*Location of the spectral data */
112 };