#include "cddefines.h"
#include "cddrive.h"
#include "optimize.h"
#include "grid.h"
#include "punch.h"
#include "rfield.h"
#include "prt.h"
#include "input.h"
#include "version.h"
#include "physconst.h"
Include dependency graph for punch_fits.cpp:
Go to the source code of this file.
Defines | |
#define | RECORDSIZE 2880 |
#define | LINESIZE 80 |
#define | HtoNL(A) |
#define | ByteSwap5(x) ByteSwap((unsigned char *) &x,sizeof(x)) |
#define | LOG2LINEAR 0 |
Functions | |
STATIC void | ByteSwap (unsigned char *b, int n) |
STATIC void | punchFITS_PrimaryHeader (bool lgAddModel) |
STATIC void | punchFITS_ParamHeader (long nintparm, long naddparm) |
STATIC void | punchFITS_ParamData (char **paramNames, long *paramMethods, realnum **paramRange, realnum **paramData, long nintparm, long naddparm, long *numParamValues) |
STATIC void | punchFITS_EnergyHeader (long numEnergies) |
STATIC void | punchFITS_EnergyData (realnum *Energies, long numEnergies) |
STATIC void | punchFITS_SpectraHeader (bool lgAdditiveModel, long nintparm, long naddparm, long totNumModels, long numEnergies) |
STATIC void | punchFITS_SpectraData (realnum **interpParameters, realnum **theSpectrum, long totNumModels, long numEnergies, long nintparm, long naddparm) |
STATIC void | punchFITS_GenericHeader (long numEnergies) |
STATIC void | punchFITS_GenericData (long numEnergies) |
STATIC void | writeCloudyDetails (void) |
STATIC long | addComment (const char *CommentToAdd) |
STATIC long | addKeyword_txt (const char *theKeyword, const void *theValue, const char *theComment, long Str_Or_Log) |
STATIC long | addKeyword_num (const char *theKeyword, long theValue, const char *theComment) |
void | punchFITSfile (FILE *ioPUN, int option) |
Variables | |
static FILE * | ioFITS_OUTPUT |
static long | bytesAdded = 0 |
static long | bitpix = 8 |
static long | pcount = 0 |
static long | gcount = 1 |
static long | maxParamValues = 0 |
const char | ModelUnits [2][17] = {"'dimensionless '", "'photons/cm^2/s'" } |
#define ByteSwap5 | ( | x | ) | ByteSwap((unsigned char *) &x,sizeof(x)) |
Definition at line 41 of file punch_fits.cpp.
Referenced by punchFITS_EnergyData(), punchFITS_GenericData(), punchFITS_ParamData(), and punchFITS_SpectraData().
#define HtoNL | ( | A | ) |
Value:
((((A) & 0xff000000) >> 24) | \ (((A) & 0x00ff0000) >> 8) | \ (((A) & 0x0000ff00) << 8) | \ (((A) & 0x000000ff) << 24))
Definition at line 28 of file punch_fits.cpp.
Referenced by punchFITS_ParamData().
#define LINESIZE 80 |
Definition at line 15 of file punch_fits.cpp.
Referenced by addComment(), addKeyword_num(), addKeyword_txt(), punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), and punchFITS_SpectraHeader().
#define LOG2LINEAR 0 |
Referenced by punchFITS_ParamData().
#define RECORDSIZE 2880 |
Definition at line 14 of file punch_fits.cpp.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericData(), punchFITS_GenericHeader(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), punchFITS_SpectraData(), and punchFITS_SpectraHeader().
long addComment | ( | const char * | CommentToAdd | ) |
Definition at line 841 of file punch_fits.cpp.
References ASSERT, DEBUG_ENTRY, ioFITS_OUTPUT, and LINESIZE.
Referenced by writeCloudyDetails().
STATIC long addKeyword_num | ( | const char * | theKeyword, | |
long | theValue, | |||
const char * | theComment | |||
) |
Definition at line 824 of file punch_fits.cpp.
References ASSERT, DEBUG_ENTRY, ioFITS_OUTPUT, and LINESIZE.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), and punchFITS_SpectraHeader().
STATIC long addKeyword_txt | ( | const char * | theKeyword, | |
const void * | theValue, | |||
const char * | theComment, | |||
long | Str_Or_Log | |||
) |
Definition at line 793 of file punch_fits.cpp.
References ASSERT, DEBUG_ENTRY, ioFITS_OUTPUT, and LINESIZE.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), and punchFITS_SpectraHeader().
STATIC void ByteSwap | ( | unsigned char * | b, | |
int | n | |||
) |
Definition at line 44 of file punch_fits.cpp.
STATIC void punchFITS_EnergyData | ( | realnum * | Energies, | |
long | numEnergies | |||
) |
Definition at line 438 of file punch_fits.cpp.
References bytesAdded, ByteSwap5, DEBUG_ENTRY, EVRYD, ioFITS_OUTPUT, rfield, and t_rfield::widflx.
STATIC void punchFITS_EnergyHeader | ( | long | numEnergies | ) |
Definition at line 395 of file punch_fits.cpp.
References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, gcount, ioFITS_OUTPUT, LINESIZE, pcount, and RECORDSIZE.
Here is the call graph for this function:
STATIC void punchFITS_GenericData | ( | long | numEnergies | ) |
Definition at line 675 of file punch_fits.cpp.
References t_rfield::AnuOrg, bytesAdded, ByteSwap5, cdSPEC2(), DEBUG_ENTRY, ioFITS_OUTPUT, MALLOC, RECORDSIZE, and rfield.
Here is the call graph for this function:
STATIC void punchFITS_GenericHeader | ( | long | numEnergies | ) |
Definition at line 632 of file punch_fits.cpp.
References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, gcount, ioFITS_OUTPUT, LINESIZE, pcount, and RECORDSIZE.
Here is the call graph for this function:
STATIC void punchFITS_ParamData | ( | char ** | paramNames, | |
long * | paramMethods, | |||
realnum ** | paramRange, | |||
realnum ** | paramData, | |||
long | nintparm, | |||
long | naddparm, | |||
long * | numParamValues | |||
) |
Definition at line 293 of file punch_fits.cpp.
References ASSERT, bytesAdded, ByteSwap5, DEBUG_ENTRY, HtoNL, ioFITS_OUTPUT, LIMPAR, LOG2LINEAR, maxParamValues, and RECORDSIZE.
STATIC void punchFITS_ParamHeader | ( | long | nintparm, | |
long | naddparm | |||
) |
Definition at line 220 of file punch_fits.cpp.
References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, gcount, ioFITS_OUTPUT, LIMPAR, LINESIZE, maxParamValues, pcount, and RECORDSIZE.
Here is the call graph for this function:
STATIC void punchFITS_PrimaryHeader | ( | bool | lgAddModel | ) |
Definition at line 174 of file punch_fits.cpp.
References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, fixit(), ioFITS_OUTPUT, LINESIZE, ModelUnits, RECORDSIZE, and writeCloudyDetails().
Here is the call graph for this function:
STATIC void punchFITS_SpectraData | ( | realnum ** | interpParameters, | |
realnum ** | theSpectrum, | |||
long | totNumModels, | |||
long | numEnergies, | |||
long | nintparm, | |||
long | naddparm | |||
) |
Definition at line 568 of file punch_fits.cpp.
References ASSERT, bytesAdded, ByteSwap5, cdEXIT, DEBUG_ENTRY, ioFITS_OUTPUT, ioQQQ, LIMPAR, and RECORDSIZE.
STATIC void punchFITS_SpectraHeader | ( | bool | lgAdditiveModel, | |
long | nintparm, | |||
long | naddparm, | |||
long | totNumModels, | |||
long | numEnergies | |||
) |
Definition at line 477 of file punch_fits.cpp.
References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, gcount, ioFITS_OUTPUT, LIMPAR, LINESIZE, ModelUnits, pcount, and RECORDSIZE.
Here is the call graph for this function:
void punchFITSfile | ( | FILE * | io, | |
int | option | |||
) |
Punch spectra to a FITS compatible file.
io | ||
option |
Definition at line 85 of file punch_fits.cpp.
References cdEXIT, DEBUG_ENTRY, t_grid::Energies, grid, ioFITS_OUTPUT, ioQQQ, t_grid::lgGridDone, NUM_OUTPUT_TYPES, t_grid::numEnergies, t_grid::Spectra, and t_grid::totNumModels.
STATIC void writeCloudyDetails | ( | void | ) |
Definition at line 712 of file punch_fits.cpp.
References addComment(), ASSERT, bytesAdded, t_input::chCardSav, input, INPUT_LINE_LENGTH, Singleton< T >::Inst(), t_prt::lgPrintTime, MIN2, t_input::nSave, and prt.
Referenced by punchFITS_PrimaryHeader().
Here is the call graph for this function:
long bitpix = 8 [static] |
Definition at line 62 of file punch_fits.cpp.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), and punchFITS_SpectraHeader().
long bytesAdded = 0 [static] |
Definition at line 61 of file punch_fits.cpp.
Referenced by punchFITS_EnergyData(), punchFITS_EnergyHeader(), punchFITS_GenericData(), punchFITS_GenericHeader(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), punchFITS_SpectraData(), punchFITS_SpectraHeader(), and writeCloudyDetails().
long gcount = 1 [static] |
Definition at line 64 of file punch_fits.cpp.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), and punchFITS_SpectraHeader().
FILE* ioFITS_OUTPUT [static] |
Definition at line 60 of file punch_fits.cpp.
Referenced by addComment(), addKeyword_num(), addKeyword_txt(), punchFITS_EnergyData(), punchFITS_EnergyHeader(), punchFITS_GenericData(), punchFITS_GenericHeader(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_PrimaryHeader(), punchFITS_SpectraData(), punchFITS_SpectraHeader(), and punchFITSfile().
long maxParamValues = 0 [static] |
Definition at line 65 of file punch_fits.cpp.
Referenced by punchFITS_ParamData(), and punchFITS_ParamHeader().
const char ModelUnits[2][17] = {"'dimensionless '", "'photons/cm^2/s'" } |
Definition at line 66 of file punch_fits.cpp.
Referenced by punchFITS_PrimaryHeader(), and punchFITS_SpectraHeader().
long pcount = 0 [static] |
Definition at line 63 of file punch_fits.cpp.
Referenced by punchFITS_EnergyHeader(), punchFITS_GenericHeader(), punchFITS_ParamHeader(), and punchFITS_SpectraHeader().