Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
otf.c File Reference
#include "ds_extern.h"
#include "ds_proto.h"

Go to the source code of this file.

Classes

struct  STURCT_KEYSYMS
 

Macros

#define DEFINE_OTF_STRUCT
 
#define MAX_KEYSYMS   (sizeof(keysyms) / sizeof(struct STURCT_KEYSYMS))
 
#define FIRST_FFB   1
 
#define SECOND_FFB   2
 
#define THIRD_FFB   3
 
#define FOURTH_FFB   4
 
#define FIFTH_FFB   5
 
#define SIXTH_FFB   6
 
#define SEVENTH_FFB   7
 
#define EIGHTH_FFB   8
 
#define MAX_GAP   5
 
#define SQR(a)   (sqrarg=(a),sqrarg*sqrarg)
 

Functions

int otfInit ()
 
int freeOtfMemory ()
 
int otfGridInit (int cols, int rows, int noint)
 
struct HEADER * do_addHeader (int ver, float scan, struct HEADER *head)
 
struct HEADER * checkScanHeader (int v, float s)
 
struct HEADER * addScanHeader (int v, float s, struct HEADER *head)
 
int remScanHeaders ()
 
int do_ignoreScan (char *buf)
 
int checkIgnoreScans (int v, float s)
 
int addIgnoreScans (int v, float s)
 
int remIgnoreScans ()
 
int do_saveIgnoreScans (FILE *fp)
 
int do_printIgnoreScans ()
 
int do_clearIgnore ()
 
int checkMapScans (int v, float s)
 
int addMapScans (int v, float s)
 
int remMapScans ()
 
int do_printMapScans ()
 
int getNumSpectra (float datalen, float noint)
 
int resendSpecData (struct SPECDATA *sd)
 
int do_otf (float *data, struct HEADER *head, float *offdata, float *gainsdata)
 
int do_otfRegular ()
 
int doOtfGridRePaint ()
 
int doOtfGridReSize ()
 
int do_otfRmBadChan ()
 
int spikeCheck (char *buf)
 
int computeInten (int bc, int ec)
 
int computeMinMax ()
 
int computeShade ()
 
int scaleData (float *data)
 
int subtractPredictedRA (float *data)
 
int placeBeamSize ()
 
int initGrid ()
 
int paintOtfGrid ()
 
int putOtfGrid ()
 
int drawColorBar ()
 
int fillOtfGrid ()
 
int accumDataIntoWork ()
 
int zeroWorkArray ()
 
int normalizeAndCal ()
 
int insertVersion (struct OTF_GRID *g, int ver)
 
int shiftOtfChans (double *in, int n, int shift)
 
int accumWorkIntoGrid ()
 
int markDataDirty ()
 
int markBaseDirty ()
 
int recomputeBaseLines ()
 
int computeBaseLine (struct OTF_GRID *g, float *data, float *a, float *b, float *Rms, int noint, int mode)
 
int computeRms (float *y, int n, float *rms)
 
int printKeySymHelp ()
 
int dispatchOtfGridEvents (XEvent *e)
 
int checkKeyPress (XEvent *event)
 
int do_otfSendPlot (char *buf)
 
int getRequestedCell (int row, int col)
 
int otfGridDisplaySpec (XEvent *event, unsigned int mask)
 
int displayRequestedOtf ()
 
int displayOtfGridSpectra (struct OTF_GRID *s)
 
int getBaselines (int *b)
 
int do_otfVelRun (char *buf)
 
int do_otfGridDump ()
 
int do_otfGridLoad (char *buf)
 
int do_otfGridInit ()
 
int otfInterp ()
 
int interpAndPlot (struct XGR_ *s)
 
XImage * createXimage (Display *display, int w, int h, int depth)
 
int do_otfChannelMap (char *buf)
 
int getChanOTF ()
 
int createInterpTable (int max)
 
double findInterp (double v1, double v2, int indx, int max)
 
int do_otfSpectralSum (char *buf)
 
int do_otf3dcube (char *buf)
 
int do_otf3dplot (char *buf)
 
int do_otfRmRMS (char *buf)
 
int do_zapCell (char *buf)
 
struct OTF_GRID * fetchMapCell (int row, int col)
 
int setMapCell (int row, int col, struct OTF_GRID *f)
 
int findNextCell (int row, int col, struct OTF_GRID **p2)
 
int do_fullInterpFill (char *buf)
 
int weightedAvergeCells (struct OTF_GRID *f, struct OTF_GRID *p1, double p1_avg, struct OTF_GRID *p2, double p2_avg, int try, int row, int col, int *count)
 
int do_otfFixBadCells (char *buf)
 
int do_otfListCells (char *buf)
 
int forceDrawGrid ()
 
int do_otfSlice (char *buf)
 
int do_otfStatus ()
 
int interpAndWrite (struct XGR_ *s)
 
int lsqfit (x, y, int bdata, int ndata, sig, int mwt,*a,*b,*siga,*sigb,*chi2,*q)
 

Variables

struct HEADER lastHead
 
struct DS_IMAGE_INFO ds_image_info
 
struct DS_IMAGE_INFO * last_image
 
float scanNum
 
float datamax
 
float datamin
 
float globalStart
 
int scan
 
int noXTick
 
int noYTick
 
int noPlot
 
int doColor
 
int thisIsaRefresh
 
int max_gray_scale
 
int xgr_hardFont
 
int opticalFileNeedDisplay
 
int fbScanDone
 
int aosScanDone
 
char source []
 
char filename []
 
char gfilename []
 
char mainFrameTitle []
 
char oldBuf []
 
struct XGR_HEAD xgr_head
 
struct RGB colormap []
 
float globalXmin
 
float globalXmax
 
float globalYmin
 
float globalYmax
 
float otfIFNumber
 
int chanSelOTF = 0
 
int ephemObj = 0
 
int lastGraph = 0
 
int ok2grid = 0
 
int dontsend = 0
 
int zeroCellCount = 0
 
int artificialCells = 0
 
struct GRID_ACCUM workArray [WORK_ARRAY_X][WORK_ARRAY_Y]
 
double * workArrayChans = NULL
 
struct MAP_SCANS * ignore_scans_head =NULL
 
struct SCAN_HEADERS * otf_scan_headers =NULL
 
int badChanArray [MAX_BAD_CHAN]
 
struct OTF_GRID * gridHead = NULL
 
struct OTF_GRID * gridLast = NULL
 
struct SPECDATA sd
 
int writeSingleChan = TRUE
 
struct STURCT_KEYSYMS keysyms []
 
double v1a [8]
 
double v2a [8]
 

Macro Definition Documentation

#define DEFINE_OTF_STRUCT

Definition at line 1 of file otf.c.

#define EIGHTH_FFB   8

Definition at line 5580 of file otf.c.

#define FIFTH_FFB   5

Definition at line 5577 of file otf.c.

#define FIRST_FFB   1

Definition at line 5573 of file otf.c.

#define FOURTH_FFB   4

Definition at line 5576 of file otf.c.

#define MAX_GAP   5

Definition at line 5612 of file otf.c.

#define MAX_KEYSYMS   (sizeof(keysyms) / sizeof(struct STURCT_KEYSYMS))

Definition at line 2888 of file otf.c.

#define SECOND_FFB   2

Definition at line 5574 of file otf.c.

#define SEVENTH_FFB   7

Definition at line 5579 of file otf.c.

#define SIXTH_FFB   6

Definition at line 5578 of file otf.c.

#define SQR (   a)    (sqrarg=(a),sqrarg*sqrarg)

Definition at line 6398 of file otf.c.

#define THIRD_FFB   3

Definition at line 5575 of file otf.c.

Function Documentation

int accumDataIntoWork ( void  )

Definition at line 2218 of file otf.c.

int accumWorkIntoGrid ( void  )

Definition at line 2497 of file otf.c.

int addIgnoreScans ( int  v,
float  s 
)

Definition at line 565 of file otf.c.

int addMapScans ( int  v,
float  s 
)

Definition at line 808 of file otf.c.

struct HEADER* addScanHeader ( int  v,
float  s,
struct HEADER *  head 
)

Definition at line 347 of file otf.c.

int checkIgnoreScans ( int  v,
float  s 
)

Definition at line 509 of file otf.c.

int checkKeyPress ( XEvent *  event)

Definition at line 3293 of file otf.c.

int checkMapScans ( int  v,
float  s 
)

Definition at line 757 of file otf.c.

struct HEADER* checkScanHeader ( int  v,
float  s 
)

Definition at line 290 of file otf.c.

int computeBaseLine ( struct OTF_GRID *  g,
float *  data,
float *  a,
float *  b,
float *  Rms,
int  noint,
int  mode 
)

Definition at line 2690 of file otf.c.

int computeInten ( int  bc,
int  ec 
)

Definition at line 1377 of file otf.c.

int computeMinMax ( void  )

Definition at line 1511 of file otf.c.

int computeRms ( float *  y,
int  n,
float *  rms 
)

Compute the rms of the data passed NOTE: This is not a full spectra, but a contructed array of data

Definition at line 2793 of file otf.c.

int computeShade ( void  )

Definition at line 1602 of file otf.c.

int createInterpTable ( int  max)

Definition at line 4738 of file otf.c.

XImage* createXimage ( Display *  display,
int  w,
int  h,
int  depth 
)

Definition at line 4520 of file otf.c.

int dispatchOtfGridEvents ( XEvent *  e)

Definition at line 2953 of file otf.c.

int displayOtfGridSpectra ( struct OTF_GRID *  s)

Definition at line 3766 of file otf.c.

int displayRequestedOtf ( void  )

Definition at line 3737 of file otf.c.

struct HEADER* do_addHeader ( int  ver,
float  scan,
struct HEADER *  head 
)

Definition at line 229 of file otf.c.

int do_clearIgnore ( void  )

Definition at line 741 of file otf.c.

int do_fullInterpFill ( char *  buf)

Definition at line 5640 of file otf.c.

int do_ignoreScan ( char *  buf)

Definition at line 448 of file otf.c.

int do_otf ( float *  data,
struct HEADER *  head,
float *  offdata,
float *  gainsdata 
)

Definition at line 1006 of file otf.c.

int do_otf3dcube ( char *  buf)

Definition at line 4931 of file otf.c.

int do_otf3dplot ( char *  buf)

Definition at line 5220 of file otf.c.

int do_otfChannelMap ( char *  buf)

Definition at line 4558 of file otf.c.

int do_otfFixBadCells ( char *  buf)

Definition at line 5836 of file otf.c.

int do_otfGridDump ( void  )

Definition at line 4059 of file otf.c.

int do_otfGridInit ( void  )

Definition at line 4257 of file otf.c.

int do_otfGridLoad ( char *  buf)

Definition at line 4100 of file otf.c.

int do_otfListCells ( char *  buf)

Definition at line 5904 of file otf.c.

int do_otfRegular ( void  )

Definition at line 1073 of file otf.c.

int do_otfRmBadChan ( void  )

Definition at line 1208 of file otf.c.

int do_otfRmRMS ( char *  buf)

Definition at line 5394 of file otf.c.

int do_otfSendPlot ( char *  buf)

Definition at line 3453 of file otf.c.

int do_otfSlice ( char *  buf)

Definition at line 5964 of file otf.c.

int do_otfSpectralSum ( char *  buf)

Definition at line 4791 of file otf.c.

int do_otfStatus ( void  )

Definition at line 6152 of file otf.c.

int do_otfVelRun ( char *  buf)

Definition at line 3904 of file otf.c.

int do_printIgnoreScans ( void  )

Definition at line 699 of file otf.c.

int do_printMapScans ( void  )

Definition at line 900 of file otf.c.

int do_saveIgnoreScans ( FILE *  fp)

Definition at line 659 of file otf.c.

int do_zapCell ( char *  buf)

Definition at line 5497 of file otf.c.

int doOtfGridRePaint ( void  )

Definition at line 1104 of file otf.c.

int doOtfGridReSize ( void  )

Definition at line 1186 of file otf.c.

int drawColorBar ( void  )

Definition at line 2108 of file otf.c.

struct OTF_GRID* fetchMapCell ( int  row,
int  col 
)

Definition at line 5584 of file otf.c.

int fillOtfGrid ( void  )

Definition at line 2149 of file otf.c.

double findInterp ( double  v1,
double  v2,
int  indx,
int  max 
)

Definition at line 4771 of file otf.c.

int findNextCell ( int  row,
int  col,
struct OTF_GRID **  p2 
)

Definition at line 5614 of file otf.c.

int forceDrawGrid ( void  )

Definition at line 5935 of file otf.c.

int freeOtfMemory ( void  )

Definition at line 126 of file otf.c.

int getBaselines ( int *  b)

Definition at line 3891 of file otf.c.

int getChanOTF ( void  )

Definition at line 4729 of file otf.c.

int getNumSpectra ( float  datalen,
float  noint 
)

Definition at line 942 of file otf.c.

int getRequestedCell ( int  row,
int  col 
)

Definition at line 3482 of file otf.c.

int initGrid ( void  )

Definition at line 1812 of file otf.c.

int insertVersion ( struct OTF_GRID *  g,
int  ver 
)

Definition at line 2387 of file otf.c.

int interpAndPlot ( struct XGR_ *  s)

Definition at line 4345 of file otf.c.

int interpAndWrite ( struct XGR_ *  s)

Definition at line 6299 of file otf.c.

int lsqfit ( x  ,
y  ,
int  bdata,
int  ndata,
sig  ,
int  mwt,
*  a,
*  b,
*  siga,
*  sigb,
*  chi2,
*  q 
)

Definition at line 6400 of file otf.c.

int markBaseDirty ( void  )

Definition at line 2641 of file otf.c.

int markDataDirty ( void  )

Definition at line 2621 of file otf.c.

int normalizeAndCal ( void  )

Definition at line 2352 of file otf.c.

int otfGridDisplaySpec ( XEvent *  event,
unsigned int  mask 
)

Definition at line 3553 of file otf.c.

int otfGridInit ( int  cols,
int  rows,
int  noint 
)

Definition at line 167 of file otf.c.

int otfInit ( void  )

Definition at line 47 of file otf.c.

int otfInterp ( void  )

Definition at line 4282 of file otf.c.

int paintOtfGrid ( void  )

Definition at line 1844 of file otf.c.

int placeBeamSize ( void  )

Definition at line 1755 of file otf.c.

int printKeySymHelp ( void  )

Definition at line 2891 of file otf.c.

int putOtfGrid ( void  )

Definition at line 2095 of file otf.c.

int recomputeBaseLines ( void  )

Definition at line 2662 of file otf.c.

int remIgnoreScans ( void  )

Definition at line 630 of file otf.c.

int remMapScans ( void  )

Definition at line 871 of file otf.c.

int remScanHeaders ( void  )

Definition at line 419 of file otf.c.

int resendSpecData ( struct SPECDATA *  sd)

Definition at line 962 of file otf.c.

int scaleData ( float *  data)

Definition at line 1691 of file otf.c.

int setMapCell ( int  row,
int  col,
struct OTF_GRID *  f 
)

Definition at line 5597 of file otf.c.

int shiftOtfChans ( double *  in,
int  n,
int  shift 
)

Definition at line 2416 of file otf.c.

int spikeCheck ( char *  buf)

Definition at line 1291 of file otf.c.

int subtractPredictedRA ( float *  data)

Definition at line 1715 of file otf.c.

int weightedAvergeCells ( struct OTF_GRID *  f,
struct OTF_GRID *  p1,
double  p1_avg,
struct OTF_GRID *  p2,
double  p2_avg,
int  try,
int  row,
int  col,
int *  count 
)

Definition at line 5732 of file otf.c.

int zeroWorkArray ( void  )

Definition at line 2328 of file otf.c.

Variable Documentation

int aosScanDone

Definition at line 33 of file mailparse.c.

int artificialCells = 0

Definition at line 30 of file otf.c.

int badChanArray[MAX_BAD_CHAN]

Definition at line 38 of file otf.c.

int chanSelOTF = 0

Definition at line 24 of file otf.c.

struct RGB colormap[]

Definition at line 69 of file xgr.c.

float datamax

Definition at line 44 of file dataserv.c.

float datamin

Definition at line 44 of file dataserv.c.

int doColor

Definition at line 13 of file xgr.c.

int dontsend = 0

Definition at line 28 of file otf.c.

struct DS_IMAGE_INFO ds_image_info

Definition at line 9 of file otf.c.

int ephemObj = 0

Definition at line 25 of file otf.c.

int fbScanDone

Definition at line 32 of file mailparse.c.

char filename[]

Definition at line 49 of file dataserv.c.

char gfilename[]

Definition at line 50 of file dataserv.c.

float globalStart

Definition at line 37 of file specdata.c.

float globalXmax

Definition at line 22 of file otf.c.

float globalXmin

Definition at line 22 of file otf.c.

float globalYmax

Definition at line 22 of file otf.c.

float globalYmin

Definition at line 22 of file otf.c.

struct OTF_GRID* gridHead = NULL

Definition at line 40 of file otf.c.

struct OTF_GRID* gridLast = NULL

Definition at line 41 of file otf.c.

struct MAP_SCANS* ignore_scans_head =NULL

Definition at line 35 of file otf.c.

struct STURCT_KEYSYMS keysyms[]

Definition at line 2844 of file otf.c.

struct DS_IMAGE_INFO* last_image

Definition at line 95 of file xgraphic.c.

int lastGraph = 0

Definition at line 26 of file otf.c.

struct HEADER lastHead

Definition at line 8 of file otf.c.

char mainFrameTitle[]

Definition at line 52 of file dataserv.c.

int max_gray_scale

Definition at line 66 of file xgr.c.

int noPlot

Definition at line 20 of file xgr.c.

int noXTick

Definition at line 18 of file xgr.c.

int noYTick

Definition at line 19 of file xgr.c.

int ok2grid = 0

Definition at line 27 of file otf.c.

char oldBuf[]

Definition at line 52 of file dataserv.c.

int opticalFileNeedDisplay
struct SCAN_HEADERS* otf_scan_headers =NULL

Definition at line 36 of file otf.c.

float otfIFNumber

Definition at line 23 of file otf.c.

int scan
float scanNum

Definition at line 46 of file dataserv.c.

struct SPECDATA sd

Definition at line 43 of file otf.c.

char source[]

Definition at line 52 of file dataserv.c.

int thisIsaRefresh

Definition at line 36 of file dataserv.c.

double v1a[8]

Definition at line 4736 of file otf.c.

double v2a[8]

Definition at line 4736 of file otf.c.

struct GRID_ACCUM workArray[WORK_ARRAY_X][WORK_ARRAY_Y]

Definition at line 32 of file otf.c.

double* workArrayChans = NULL

Definition at line 33 of file otf.c.

int writeSingleChan = TRUE

Definition at line 45 of file otf.c.

int xgr_hardFont

Definition at line 21 of file xgr.c.

struct XGR_HEAD xgr_head

Definition at line 36 of file xgr.c.

int zeroCellCount = 0

Definition at line 29 of file otf.c.