punch_fits.cpp File Reference

#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, float **paramRange, float **paramData, long nintparm, long naddparm, long *numParamValues)
static void punchFITS_EnergyHeader (long numEnergies)
static void punchFITS_EnergyData (float *Energies, long numEnergies)
static void punchFITS_SpectraHeader (long nintparm, long naddparm, long totNumModels, long numEnergies)
static void punchFITS_SpectraData (float **interpParameters, float **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


Define Documentation

#define ByteSwap5 (  )     ByteSwap((unsigned char *) &x,sizeof(x))

#define HtoNL (  ) 

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

#define LOG2LINEAR   0

#define RECORDSIZE   2880


Function Documentation

long addComment ( const char *  CommentToAdd  )  [static]

Definition at line 859 of file punch_fits.cpp.

References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, ioFITS_OUTPUT, and LINESIZE.

Referenced by writeCloudyDetails().

static long addKeyword_num ( const char *  theKeyword,
long  theValue,
const char *  theComment 
) [static]

static long addKeyword_txt ( const char *  theKeyword,
const void *  theValue,
const char *  theComment,
long  Str_Or_Log 
) [static]

static void ByteSwap ( unsigned char *  b,
int  n 
) [static]

Definition at line 43 of file punch_fits.cpp.

static void punchFITS_EnergyData ( float *  Energies,
long  numEnergies 
) [static]

static void punchFITS_EnergyHeader ( long  numEnergies  )  [static]

Definition at line 396 of file punch_fits.cpp.

References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, DEBUG_EXIT, gcount, ioFITS_OUTPUT, LINESIZE, pcount, and RECORDSIZE.

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_GenericData ( long  numEnergies  )  [static]

Definition at line 687 of file punch_fits.cpp.

References t_rfield::AnuOrg, bytesAdded, ByteSwap5, cdSPEC2(), DEBUG_ENTRY, DEBUG_EXIT, ioFITS_OUTPUT, MALLOC, RECORDSIZE, and rfield.

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_GenericHeader ( long  numEnergies  )  [static]

Definition at line 642 of file punch_fits.cpp.

References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, DEBUG_EXIT, gcount, ioFITS_OUTPUT, LINESIZE, pcount, and RECORDSIZE.

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_ParamData ( char **  paramNames,
long *  paramMethods,
float **  paramRange,
float **  paramData,
long  nintparm,
long  naddparm,
long *  numParamValues 
) [static]

static void punchFITS_ParamHeader ( long  nintparm,
long  naddparm 
) [static]

Definition at line 202 of file punch_fits.cpp.

References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, DEBUG_EXIT, gcount, ioFITS_OUTPUT, LIMPAR, LINESIZE, maxParamValues, pcount, and RECORDSIZE.

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_PrimaryHeader ( bool  lgAddModel  )  [static]

Definition at line 156 of file punch_fits.cpp.

References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, DEBUG_EXIT, ioFITS_OUTPUT, LINESIZE, RECORDSIZE, and writeCloudyDetails().

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_SpectraData ( float **  interpParameters,
float **  theSpectrum,
long  totNumModels,
long  numEnergies,
long  nintparm,
long  naddparm 
) [static]

Definition at line 575 of file punch_fits.cpp.

References ASSERT, bytesAdded, ByteSwap5, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioFITS_OUTPUT, ioQQQ, LIMPAR, and RECORDSIZE.

Referenced by punchFITSfile().

Here is the call graph for this function:

static void punchFITS_SpectraHeader ( long  nintparm,
long  naddparm,
long  totNumModels,
long  numEnergies 
) [static]

Definition at line 482 of file punch_fits.cpp.

References addKeyword_num(), addKeyword_txt(), ASSERT, bitpix, bytesAdded, DEBUG_ENTRY, DEBUG_EXIT, gcount, ioFITS_OUTPUT, LIMPAR, LINESIZE, pcount, and RECORDSIZE.

Referenced by punchFITSfile().

Here is the call graph for this function:

void punchFITSfile ( FILE *  io,
int  option 
)

static void writeCloudyDetails ( void   )  [static]

Definition at line 724 of file punch_fits.cpp.

References addComment(), ASSERT, bytesAdded, cdVersion(), t_input::chCardSav, t_version::chInfo, input, INPUT_LINE_LENGTH, t_prt::lgPrintTime, MIN2, t_input::nSave, prt, and version.

Referenced by punchFITS_PrimaryHeader().

Here is the call graph for this function:


Variable Documentation

long bitpix = 8 [static]

long bytesAdded = 0 [static]

long gcount = 1 [static]

FILE* ioFITS_OUTPUT [static]

long maxParamValues = 0 [static]

Definition at line 67 of file punch_fits.cpp.

Referenced by punchFITS_ParamData(), punchFITS_ParamHeader(), and punchFITSfile().

long pcount = 0 [static]


Generated for cloudy by doxygen 1.5.9