#include "cddefines.h"
#include "physconst.h"
#include "optimize.h"
#include "continuum.h"
#include "path.h"
#include "called.h"
#include "rfield.h"
#include "stars.h"
Go to the source code of this file.
Data Structures | |
struct | mpp |
struct | stellar_grid |
Defines | |
#define | DEBUGPRT 0 |
#define | FREE_CHECK(PTR) { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; } |
#define | FREE_SAFE(PTR) { if( PTR != NULL ) free( PTR ); PTR = NULL; } |
Enumerations | |
enum | IntStage { IS_UNDEFINED, IS_FIRST, IS_SECOND } |
Functions | |
static int | CompileAtmosphereCoStar (const char[], const char[], const float[], long) |
static void | InterpolateGridCoStar (const stellar_grid *, const double[], double *, double *) |
static void | FindHCoStar (const stellar_grid *, long, double, long, float *, long *, long *) |
static void | FindVCoStar (const stellar_grid *, double, float *, long[]) |
static void | CoStarListModels (const stellar_grid *) |
static int | RauchInitializeSub (const char[], const char[], const mpp[], long, long, long, const double[], int) |
static bool | lgCompileAtmosphere (const char[], const char[], const float[], long) |
static void | InitGrid (stellar_grid *, bool) |
static bool | lgValidBinFile (const char *) |
static bool | lgValidAsciiFile (const char *) |
static void | InitGridCoStar (stellar_grid *) |
static void | CheckVal (const stellar_grid *, double[], long *, long *) |
static void | InterpolateRectGrid (const stellar_grid *, const double[], double *, double *) |
static void | FreeGrid (stellar_grid *) |
static void | InterpolateModel (const stellar_grid *, const double[], double[], const long[], const long[], long[], long, float[], IntStage) |
static void | InterpolateModelCoStar (const stellar_grid *, const double[], double[], const long[], const long[], long[], long, long, float[]) |
static void | GetModel (const stellar_grid *, long, float[], bool, bool) |
static void | SetLimits (const stellar_grid *, double, const long[], const long[], const long[], const float[], double *, double *) |
static void | SetLimitsSub (const stellar_grid *, double, const long[], const long[], long[], long, double *, double *) |
static void | InitIndexArrays (stellar_grid *, bool) |
static void | FillJ (const stellar_grid *, long[], double[], long, bool) |
static long | JIndex (const stellar_grid *, const long[]) |
static void | SearchModel (const mpp[], long, const double[], long, long *, long *) |
static void | FindIndex (const double[], long, double, long *, long *, bool *) |
static bool | lgFileReadable (const char *) |
static void | ValidateGrid (const stellar_grid *, double) |
static bool | lgValidModel (const float[], const float[], double, double) |
static void | RebinAtmosphere (long, const float[], const float[], float[], long, const float[]) |
static float | RebinSingleCell (float, float, const float[], const float[], const float[], long) |
static long | RebinFind (const float[], long, float) |
void | AtmospheresAvail (void) |
int | AtlasCompile (void) |
long | AtlasInterpolate (double val[], long *nval, long *ndim, const char *chMetalicity, const char *chODFNew, bool lgList, double *Tlow, double *Thigh) |
int | CoStarCompile (void) |
long | CoStarInterpolate (double val[], long *nval, long *ndim, IntMode imode, bool lgHalo, bool lgList, double *val0_lo, double *val0_hi) |
bool | GridCompile (const char *InName) |
long | GridInterpolate (double val[], long *nval, long *ndim, const char *FileName, bool lgList, double *Tlow, double *Thigh) |
int | Kurucz79Compile (void) |
long | Kurucz79Interpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | MihalasCompile (void) |
long | MihalasInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | RauchCompile (void) |
long | RauchInterpolateHCa (double val[], long *nval, long *ndim, bool lgHalo, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHNi (double val[], long *nval, long *ndim, bool lgHalo, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolatePG1159 (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHydr (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHelium (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
long | RauchInterpolateHpHe (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
bool | StarburstInitialize (const char chInName[], const char chOutName[]) |
bool | StarburstCompile (void) |
int | TlustyCompile (void) |
long | TlustyInterpolate (double val[], long *nval, long *ndim, tl_grid tlg, const char *chMetalicity, bool lgList, double *Tlow, double *Thigh) |
int | WernerCompile (void) |
long | WernerInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
int | WMBASICCompile (void) |
long | WMBASICInterpolate (double val[], long *nval, long *ndim, bool lgList, double *Tlow, double *Thigh) |
Variables | |
static const int | NSB99 = 1250 |
static const int | MNTS = 200 |
static const int | NRAUCH = 19951 |
static const int | NMODS_HCA = 66 |
static const int | NMODS_HNI = 51 |
static const int | NMODS_PG1159 = 71 |
static const int | NMODS_HYDR = 100 |
static const int | NMODS_HELIUM = 81 |
static const int | NMODS_HpHE = 117 |
static const bool | lgSILENT = false |
static const bool | lgVERBOSE = true |
static const bool | lgLINEAR = false |
static const bool | lgTAKELOG = true |
static const long int | VERSION_ASCII = 20060612L |
static const long int | VERSION_BIN = 20060612L |
#define FREE_CHECK | ( | PTR | ) | { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; } |
#define FREE_SAFE | ( | PTR | ) | { if( PTR != NULL ) free( PTR ); PTR = NULL; } |
int AtlasCompile | ( | void | ) |
AtlasCompile rebin Kurucz stellar models to match energy grid of code
Definition at line 357 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidBinFile(), and RYDLAM.
Referenced by ParseCompile().
long AtlasInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
const char * | chMetalicity, | |||
const char * | chODFNew, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
AtlasInterpolate interpolate on atlas model atmospheres, by K Volk
Definition at line 460 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
void AtmospheresAvail | ( | void | ) |
List all the available TABLE STAR <grid> commands by checking installed *.mod files
Definition at line 182 of file stars.cpp.
References chDataPath, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH, FILENAME_PATH_LENGTH_2, ioQQQ, lgDataPathSet, and lgValidBinFile().
Referenced by ParseTable().
static void CheckVal | ( | const stellar_grid * | grid, | |
double | val[], | |||
long * | nval, | |||
long * | ndim | |||
) | [static] |
Definition at line 3279 of file stars.cpp.
References cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, stellar_grid::ndim, stellar_grid::nval, and stellar_grid::val.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
static int CompileAtmosphereCoStar | ( | const char | chFNameIn[], | |
const char | chFNameOut[], | |||
const float | Edges[], | |||
long | nedges | |||
) | [static] |
Definition at line 1874 of file stars.cpp.
References t_rfield::AnuOrg, ASSERT, CALLOC, mpp::chGrid, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, FREE_CHECK, FREE_SAFE, ioQQQ, MALLOC, MDIM, MNAM, t_rfield::nupper, mpp::par, par, PI, RebinAtmosphere(), rfield, RYDLAM, and VERSION_BIN.
Referenced by CoStarCompile().
int CoStarCompile | ( | void | ) |
CoStarCompile rebin costar stellar models to match energy grid of code
Definition at line 533 of file stars.cpp.
References CompileAtmosphereCoStar(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgFileReadable(), lgValidBinFile(), and RYDLAM.
Referenced by ParseCompile().
long CoStarInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
IntMode | imode, | |||
bool | lgHalo, | |||
bool | lgList, | |||
double * | val0_lo, | |||
double * | val0_hi | |||
) |
CoStarInterpolate read in and interpolate on Werner grid of PN atmospheres, by K Volk
Definition at line 568 of file stars.cpp.
References cdEXIT(), chDataPath, CheckVal(), stellar_grid::command, CoStarListModels(), DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, stellar_grid::imode, InitGrid(), InitGridCoStar(), InterpolateGridCoStar(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
static void CoStarListModels | ( | const stellar_grid * | grid | ) | [static] |
Definition at line 2403 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, JIndex(), stellar_grid::jval, MAX2, stellar_grid::nTracks, mpp::par, stellar_grid::telg, and stellar_grid::trackLen.
Referenced by CoStarInterpolate().
static void FillJ | ( | const stellar_grid * | grid, | |
long | index[], | |||
double | val[], | |||
long | nd, | |||
bool | lgList | |||
) | [static] |
Definition at line 4007 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, stellar_grid::jhi, JIndex(), stellar_grid::jlo, MIN2, stellar_grid::names, stellar_grid::ndim, stellar_grid::nmods, stellar_grid::nval, SearchModel(), stellar_grid::telg, and stellar_grid::val.
Referenced by InitIndexArrays().
static void FindHCoStar | ( | const stellar_grid * | grid, | |
long | track, | |||
double | par2, | |||
long | off, | |||
float * | ValTr, | |||
long * | indloTr, | |||
long * | indhiTr | |||
) | [static] |
Definition at line 2273 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, JIndex(), stellar_grid::jval, mpp::par, stellar_grid::telg, and stellar_grid::trackLen.
Referenced by InterpolateGridCoStar().
static void FindIndex | ( | const double | xval[], | |
long | NVAL, | |||
double | x, | |||
long * | ind1, | |||
long * | ind2, | |||
bool * | lgInvalid | |||
) | [static] |
Definition at line 4179 of file stars.cpp.
References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, and ShowMe().
Referenced by InitIndexArrays(), and InterpolateRectGrid().
static void FindVCoStar | ( | const stellar_grid * | grid, | |
double | par1, | |||
float * | ValTr, | |||
long | useTr[] | |||
) | [static] |
Definition at line 2335 of file stars.cpp.
References continuum, DEBUG_ENTRY, DEBUG_EXIT, t_continuum::lgCoStarInterpolationCaution, and stellar_grid::nTracks.
Referenced by InterpolateGridCoStar().
static void FreeGrid | ( | stellar_grid * | grid | ) | [static] |
Definition at line 3425 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, FREE_SAFE, stellar_grid::ioIN, stellar_grid::jhi, stellar_grid::jlo, stellar_grid::jval, stellar_grid::ndim, stellar_grid::nval, stellar_grid::telg, stellar_grid::trackLen, and stellar_grid::val.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridCompile(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
static void GetModel | ( | const stellar_grid * | grid, | |
long | ind, | |||
float | flux[], | |||
bool | lgTalk, | |||
bool | lgTakeLog | |||
) | [static] |
Definition at line 3674 of file stars.cpp.
References ASSERT, called, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, stellar_grid::ident, stellar_grid::ioIN, ioQQQ, t_called::lgTalk, MAX2, stellar_grid::names, stellar_grid::nBlocksize, stellar_grid::nOffset, stellar_grid::npar, t_rfield::nupper, mpp::par, PrintEfmt(), rfield, and stellar_grid::telg.
Referenced by InterpolateGridCoStar(), InterpolateModel(), InterpolateModelCoStar(), InterpolateRectGrid(), and ValidateGrid().
bool GridCompile | ( | const char * | InName | ) |
GridCompile rebin user supplied stellar models to match energy grid of code
Definition at line 640 of file stars.cpp.
References stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, FreeGrid(), grid, stellar_grid::ident, InitGrid(), ioQQQ, lgCompileAtmosphere(), MIN2, stellar_grid::path, and ValidateGrid().
Referenced by ParseCompile().
long GridInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
const char * | FileName, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
GridInterpolate read in and interpolate on user supplied grid of atmospheres
Definition at line 682 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
static void InitGrid | ( | stellar_grid * | grid, | |
bool | lgList | |||
) | [static] |
Definition at line 2993 of file stars.cpp.
References ASSERT, cdEXIT(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, IM_RECT_GRID, stellar_grid::imode, InitIndexArrays(), stellar_grid::ioIN, ioQQQ, stellar_grid::jval, MALLOC, MDIM, MNAM, stellar_grid::names, stellar_grid::nBlocksize, stellar_grid::ndim, stellar_grid::ngrid, stellar_grid::nmods, stellar_grid::nOffset, stellar_grid::npar, stellar_grid::nTracks, t_rfield::nupper, stellar_grid::nval, stellar_grid::path, path_not_set(), rfield, stellar_grid::telg, stellar_grid::trackLen, stellar_grid::val, version, and VERSION_BIN.
Referenced by AtlasInterpolate(), CoStarInterpolate(), GridCompile(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
static void InitGridCoStar | ( | stellar_grid * | grid | ) | [static] |
Definition at line 3225 of file stars.cpp.
References ASSERT, CALLOC, mpp::chGrid, DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, stellar_grid::jhi, JIndex(), stellar_grid::jlo, stellar_grid::jval, mpp::modid, stellar_grid::ndim, stellar_grid::nmods, stellar_grid::nTracks, stellar_grid::nval, stellar_grid::telg, and stellar_grid::trackLen.
Referenced by CoStarInterpolate().
static void InitIndexArrays | ( | stellar_grid * | grid, | |
bool | lgList | |||
) | [static] |
Definition at line 3934 of file stars.cpp.
References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, FillJ(), FindIndex(), FREE_CHECK, stellar_grid::jhi, stellar_grid::jlo, MALLOC, stellar_grid::names, stellar_grid::ndim, stellar_grid::nmods, stellar_grid::nval, mpp::par, stellar_grid::telg, and stellar_grid::val.
Referenced by InitGrid().
static void InterpolateGridCoStar | ( | const stellar_grid * | grid, | |
const double | val[], | |||
double * | val0_lo, | |||
double * | val0_hi | |||
) | [static] |
Definition at line 2107 of file stars.cpp.
References ASSERT, called, cdEXIT(), mpp::chGrid, DEBUG_ENTRY, DEBUG_EXIT, FindHCoStar(), FindVCoStar(), FREE_CHECK, GetModel(), IM_COSTAR_AGE_MZAMS, IM_COSTAR_MZAMS_AGE, IM_COSTAR_TEFF_LOGG, IM_COSTAR_TEFF_MODID, stellar_grid::imode, InterpolateModelCoStar(), ioQQQ, JIndex(), stellar_grid::jval, t_rfield::lgContMalloc, lgLINEAR, lgSILENT, t_called::lgTalk, lgValidModel(), MALLOC, mpp::modid, stellar_grid::nmods, t_rfield::nspec, stellar_grid::nTracks, t_rfield::nupper, mpp::par, PrintEfmt(), rfield, SetLimits(), stellar_grid::telg, t_rfield::tNuRyd, TotalInsanity(), stellar_grid::trackLen, t_rfield::tslop, and ValidateGrid().
Referenced by CoStarInterpolate().
static void InterpolateModel | ( | const stellar_grid * | grid, | |
const double | val[], | |||
double | aval[], | |||
const long | indlo[], | |||
const long | indhi[], | |||
long | index[], | |||
long | nd, | |||
float | flux1[], | |||
IntStage | stage | |||
) | [static] |
Definition at line 3448 of file stars.cpp.
References ASSERT, called, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, GetModel(), ioQQQ, IS_FIRST, IS_SECOND, stellar_grid::jhi, JIndex(), stellar_grid::jlo, lgTAKELOG, t_called::lgTalk, lgVERBOSE, MALLOC, MAX2, MIN2, stellar_grid::names, stellar_grid::ndim, stellar_grid::npar, t_rfield::nupper, mpp::par, rfield, stellar_grid::telg, TotalInsanity(), and stellar_grid::val.
Referenced by InterpolateRectGrid().
static void InterpolateModelCoStar | ( | const stellar_grid * | grid, | |
const double | val[], | |||
double | aval[], | |||
const long | indlo[], | |||
const long | indhi[], | |||
long | index[], | |||
long | nd, | |||
long | off, | |||
float | flux1[] | |||
) | [static] |
Definition at line 3598 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, GetModel(), ioQQQ, lgTAKELOG, lgVERBOSE, MALLOC, stellar_grid::npar, t_rfield::nupper, mpp::par, rfield, and stellar_grid::telg.
Referenced by InterpolateGridCoStar().
static void InterpolateRectGrid | ( | const stellar_grid * | grid, | |
const double | val[], | |||
double * | Tlow, | |||
double * | Thigh | |||
) | [static] |
Definition at line 3312 of file stars.cpp.
References ASSERT, called, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, FindIndex(), FREE_CHECK, GetModel(), InterpolateModel(), ioQQQ, IS_UNDEFINED, t_rfield::lgContMalloc, lgLINEAR, lgSILENT, t_called::lgTalk, lgValidModel(), MALLOC, stellar_grid::names, stellar_grid::nBlocksize, stellar_grid::ndim, stellar_grid::npar, t_rfield::nspec, t_rfield::nupper, stellar_grid::nval, PrintEfmt(), rfield, SetLimits(), t_rfield::tNuRyd, TotalInsanity(), t_rfield::tslop, stellar_grid::val, and ValidateGrid().
Referenced by AtlasInterpolate(), GridInterpolate(), Kurucz79Interpolate(), MihalasInterpolate(), RauchInterpolateHCa(), RauchInterpolateHelium(), RauchInterpolateHNi(), RauchInterpolateHpHe(), RauchInterpolateHydr(), RauchInterpolatePG1159(), TlustyInterpolate(), WernerInterpolate(), and WMBASICInterpolate().
static long JIndex | ( | const stellar_grid * | grid, | |
const long | index[] | |||
) | [static] |
Definition at line 4090 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, stellar_grid::ndim, and stellar_grid::nval.
Referenced by CoStarListModels(), FillJ(), FindHCoStar(), InitGridCoStar(), InterpolateGridCoStar(), InterpolateModel(), SetLimits(), and SetLimitsSub().
int Kurucz79Compile | ( | void | ) |
Kurucz79Compile rebin Kurucz79 stellar models to match energy grid of code
Definition at line 730 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long Kurucz79Interpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
Kurucz79Interpolate read in and interpolate on Kurucz 1979 grid of atmospheres
Definition at line 751 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
static bool lgCompileAtmosphere | ( | const char | chFNameIn[], | |
const char | chFNameOut[], | |||
const float | Edges[], | |||
long | nedges | |||
) | [static] |
Definition at line 2674 of file stars.cpp.
References t_rfield::AnuOrg, ASSERT, CALLOC, DEBUG_ENTRY, DEBUG_EXIT, FR1RYD, FREE_CHECK, FREE_SAFE, ioQQQ, MALLOC, MDIM, MNAM, t_rfield::nupper, par, POW2, RebinAtmosphere(), rfield, RYDLAM, SPEEDLIGHT, version, VERSION_ASCII, and VERSION_BIN.
Referenced by AtlasCompile(), GridCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
static bool lgFileReadable | ( | const char * | chFnam | ) | [static] |
Definition at line 4263 of file stars.cpp.
References DEBUG_ENTRY, and DEBUG_EXIT.
Referenced by AtlasCompile(), CoStarCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
static bool lgValidAsciiFile | ( | const char * | ascName | ) | [static] |
Definition at line 3195 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, version, and VERSION_ASCII.
Referenced by RauchCompile(), and StarburstCompile().
static bool lgValidBinFile | ( | const char * | binName | ) | [static] |
Definition at line 3129 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, grid, stellar_grid::ioIN, MDIM, MNAM, stellar_grid::nBlocksize, stellar_grid::ndim, stellar_grid::ngrid, stellar_grid::nmods, stellar_grid::nOffset, stellar_grid::npar, stellar_grid::path, version, and VERSION_BIN.
Referenced by AtlasCompile(), AtmospheresAvail(), CoStarCompile(), Kurucz79Compile(), MihalasCompile(), RauchCompile(), StarburstCompile(), TlustyCompile(), WernerCompile(), and WMBASICCompile().
static bool lgValidModel | ( | const float | anu[], | |
const float | flux[], | |||
double | Teff, | |||
double | toler | |||
) | [static] |
Definition at line 4336 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, FR1RYD, ioQQQ, t_rfield::nupper, rfield, and STEFAN_BOLTZ.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and ValidateGrid().
int MihalasCompile | ( | void | ) |
MihalasCompile rebin Mihalas stellar models to match energy grid of code
Definition at line 783 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long MihalasInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
MihalasInterpolate read in and interpolate on Mihalas grid of atmospheres
Definition at line 803 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
int RauchCompile | ( | void | ) |
RauchCompile create ascii and mod files for Rauch atmospheres return 0 if success, 1 if failure
Definition at line 835 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidAsciiFile(), lgValidBinFile(), NMODS_HCA, NMODS_HELIUM, NMODS_HNI, NMODS_HpHE, NMODS_HYDR, NMODS_PG1159, and RauchInitializeSub().
Referenced by ParseCompile().
static int RauchInitializeSub | ( | const char | chFName[], | |
const char | chSuff[], | |||
const mpp | telg[], | |||
long | nmods, | |||
long | n, | |||
long | ngrids, | |||
const double | par2[], | |||
int | format | |||
) | [static] |
Definition at line 2449 of file stars.cpp.
References cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, FREE_CHECK, INPUT_LINE_LENGTH, ioQQQ, MALLOC, NRAUCH, par, PI, ShowMe(), VERSION_ASCII, and wl.
Referenced by RauchCompile().
long RauchInterpolateHCa | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgHalo, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolateHCa get one of the Rauch H-Ca model atmospheres, originally by K. Volk
Definition at line 1149 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
long RauchInterpolateHelium | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolateHelium get one of the Rauch pure helium model atmospheres
Definition at line 1285 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
long RauchInterpolateHNi | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgHalo, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolateHNi get one of the Rauch H-Ni model atmospheres
Definition at line 1185 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
long RauchInterpolateHpHe | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolateHpHe get one of the Rauch hydrogen plus helium model atmospheres
Definition at line 1317 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
long RauchInterpolateHydr | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolateHydr get one of the Rauch pure hydrogen model atmospheres
Definition at line 1253 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
long RauchInterpolatePG1159 | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
RauchInterpolatePG1159 get one of the Rauch PG1159 model atmospheres
Definition at line 1221 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
static void RebinAtmosphere | ( | long | nCont, | |
const float | StarEner[], | |||
const float | StarFlux[], | |||
float | CloudyFlux[], | |||
long | nEdge, | |||
const float | AbsorbEdge[] | |||
) | [static] |
Definition at line 4368 of file stars.cpp.
References t_rfield::anu, ASSERT, DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, FREE_SAFE, MALLOC, t_rfield::nupper, POW3, RebinFind(), RebinSingleCell(), and rfield.
Referenced by CompileAtmosphereCoStar(), and lgCompileAtmosphere().
static long RebinFind | ( | const float | array[], | |
long | nArr, | |||
float | val | |||
) | [static] |
Definition at line 4604 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, and sign3().
Referenced by RebinAtmosphere(), and RebinSingleCell().
static float RebinSingleCell | ( | float | BinLow, | |
float | BinHigh, | |||
const float | StarEner[], | |||
const float | StarFlux[], | |||
const float | StarPower[], | |||
long | nCont | |||
) | [static] |
Definition at line 4491 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, MIN2, RebinFind(), x1, and x2.
Referenced by RebinAtmosphere().
static void SearchModel | ( | const mpp | telg[], | |
long | nmods, | |||
const double | val[], | |||
long | ndim, | |||
long * | index_low, | |||
long * | index_high | |||
) | [static] |
Definition at line 4109 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, mpp::par, and par.
Referenced by FillJ().
static void SetLimits | ( | const stellar_grid * | grid, | |
double | val, | |||
const long | indlo[], | |||
const long | indhi[], | |||
const long | useTr[], | |||
const float | ValTr[], | |||
double * | loLim, | |||
double * | hiLim | |||
) | [static] |
Definition at line 3754 of file stars.cpp.
References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, IM_COSTAR_AGE_MZAMS, IM_COSTAR_MZAMS_AGE, IM_COSTAR_TEFF_LOGG, IM_COSTAR_TEFF_MODID, IM_RECT_GRID, stellar_grid::imode, ioQQQ, JIndex(), stellar_grid::jval, t_optimize::lgVarOn, MAX2, MDIM, MIN2, stellar_grid::ndim, stellar_grid::nTracks, optimize, mpp::par, SetLimitsSub(), stellar_grid::telg, and stellar_grid::trackLen.
Referenced by InterpolateGridCoStar(), and InterpolateRectGrid().
static void SetLimitsSub | ( | const stellar_grid * | grid, | |
double | val, | |||
const long | indlo[], | |||
const long | indhi[], | |||
long | index[], | |||
long | nd, | |||
double * | loLim, | |||
double * | hiLim | |||
) | [static] |
Definition at line 3854 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, stellar_grid::jhi, JIndex(), MAX2, MIN2, stellar_grid::nval, and stellar_grid::val.
Referenced by SetLimits().
bool StarburstCompile | ( | void | ) |
StarburstCompile, rebin Starburst99 model output to match energy grid of code
Definition at line 1567 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), lgValidAsciiFile(), lgValidBinFile(), and StarburstInitialize().
Referenced by ParseCompile().
bool StarburstInitialize | ( | const char | chInName[], | |
const char | chOutName[] | |||
) |
Create .ascii file out of Starburst99 output
Definition at line 1349 of file stars.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, FILENAME_PATH_LENGTH_2, FREE_CHECK, FREE_SAFE, INPUT_LINE_LENGTH, ioQQQ, MALLOC, MNTS, NSB99, REALLOC, and VERSION_ASCII.
Referenced by ParseCompile(), and StarburstCompile().
int TlustyCompile | ( | void | ) |
TlustyCompile rebin Tlusty OSTAR2002 stellar models to match energy grid of code
Definition at line 1587 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long TlustyInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
tl_grid | tlg, | |||
const char * | chMetalicity, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
TlustyInterpolate get one of the Tlusty OSTAR2002 model atmospheres
Definition at line 1643 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, rfield, TL_BSTAR, TL_OSTAR, and TotalInsanity().
Referenced by ParseTable().
static void ValidateGrid | ( | const stellar_grid * | grid, | |
double | toler | |||
) | [static] |
Definition at line 4283 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, FREE_CHECK, GetModel(), ioQQQ, lgLINEAR, lgSILENT, lgValidModel(), MALLOC, stellar_grid::names, stellar_grid::nmods, stellar_grid::npar, t_rfield::nupper, mpp::par, rfield, and stellar_grid::telg.
Referenced by GridCompile(), InterpolateGridCoStar(), and InterpolateRectGrid().
int WernerCompile | ( | void | ) |
WernerCompile rebin Werner stellar atmospheres to match cloudy energy grid
Definition at line 1704 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long WernerInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
WernerInterpolate read in and interpolate on Werner grid of PN atmospheres, by K Volk
Definition at line 1759 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
int WMBASICCompile | ( | void | ) |
WMBASICCompile rebin WMBASIC stellar models to match energy grid of code
Definition at line 1817 of file stars.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, lgCompileAtmosphere(), lgFileReadable(), and lgValidBinFile().
Referenced by ParseCompile().
long WMBASICInterpolate | ( | double | val[], | |
long * | nval, | |||
long * | ndim, | |||
bool | lgList, | |||
double * | Tlow, | |||
double * | Thigh | |||
) |
WMBASICInterpolate read in and interpolate on WMBASIC grid of hot star atmospheres
Definition at line 1841 of file stars.cpp.
References chDataPath, CheckVal(), stellar_grid::command, DEBUG_ENTRY, DEBUG_EXIT, FreeGrid(), grid, stellar_grid::ident, InitGrid(), InterpolateRectGrid(), lgDataPathSet, t_rfield::nupper, stellar_grid::path, and rfield.
Referenced by ParseTable().
const bool lgLINEAR = false [static] |
Definition at line 41 of file stars.cpp.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and ValidateGrid().
const bool lgSILENT = false [static] |
Definition at line 38 of file stars.cpp.
Referenced by InterpolateGridCoStar(), InterpolateRectGrid(), and ValidateGrid().
const bool lgTAKELOG = true [static] |
Definition at line 42 of file stars.cpp.
Referenced by InterpolateModel(), and InterpolateModelCoStar().
const bool lgVERBOSE = true [static] |
Definition at line 39 of file stars.cpp.
Referenced by InterpolateModel(), and InterpolateModelCoStar().
const int MNTS = 200 [static] |
maximum number of separate time steps in a Starburst99 model
Definition at line 15 of file stars.cpp.
Referenced by StarburstInitialize().
const int NMODS_HCA = 66 [static] |
The number of models in the original Rauch H-Ca set (first version May 1998, current May 2001)
Definition at line 20 of file stars.cpp.
Referenced by RauchCompile().
const int NMODS_HELIUM = 81 [static] |
The number of models in the Rauch Helium only set, Jun 2004
Definition at line 28 of file stars.cpp.
Referenced by RauchCompile().
const int NMODS_HNI = 51 [static] |
The number of models in the new Rauch H-Ni set, Nov 2002
Definition at line 22 of file stars.cpp.
Referenced by RauchCompile().
const int NMODS_HpHE = 117 [static] |
The number of models in the Rauch H+He set, Aug 2004
Definition at line 30 of file stars.cpp.
Referenced by RauchCompile().
const int NMODS_HYDR = 100 [static] |
The number of models in the Rauch Hydrogen only set, Feb 2003
Definition at line 26 of file stars.cpp.
Referenced by RauchCompile().
const int NMODS_PG1159 = 71 [static] |
The number of models in the new Rauch PG1159 set, Jan 2006
Definition at line 24 of file stars.cpp.
Referenced by RauchCompile().
const int NRAUCH = 19951 [static] |
this is the number of points in each of the stellar continua
Definition at line 18 of file stars.cpp.
Referenced by RauchInitializeSub().
const int NSB99 = 1250 [static] |
this is the initial assumed size of the Starburst grid, may be increased during execution if needed
Definition at line 13 of file stars.cpp.
Referenced by StarburstInitialize().
const long int VERSION_ASCII = 20060612L [static] |
Definition at line 178 of file stars.cpp.
Referenced by lgCompileAtmosphere(), lgValidAsciiFile(), RauchInitializeSub(), and StarburstInitialize().
const long int VERSION_BIN = 20060612L [static] |
Definition at line 179 of file stars.cpp.
Referenced by CompileAtmosphereCoStar(), InitGrid(), lgCompileAtmosphere(), and lgValidBinFile().