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

Go to the source code of this file.

Classes

struct  MAIL_PARSE
 
struct  STURCT_KEYSYMS
 

Macros

#define TRUE   1
 
#define FALSE   0
 
#define DATASPREAD   0.000001
 
#define MAX_KEYSYMS   (sizeof(keysyms) / sizeof(struct STURCT_KEYSYMS))
 
#define WINDOW_PLOT   1
 
#define WINDOW_OTF   2
 
#define SQR(a)   (sqrarg=(a),sqrarg*sqrarg)
 

Functions

int insque ()
 
int remque ()
 
int to_helper (char *buf)
 
int to_xgraphic (char *buf)
 
int printKeySymHelp ()
 
int do_help (char *buf)
 
int do_quit ()
 
char * vxstrtok (char *string, char *last_token, char *delim)
 
int readMail (char *buf, int len)
 
int parseMail (char *buf)
 
int otfInit ()
 
int main (int argc, argv)
 
int myIOErrorHandler (Display *display, XErrorEvent *myerr)
 
int myErrorHandler (Display *display, XErrorEvent *myerr)
 
void signalHandler ()
 
int exitProc (int status)
 
int dummieEventProc (XEvent *event)
 
struct WINDOW * createWindow (struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap, int which)
 
int createWindows (struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap)
 
int argmatch (char *s1, char *s2, int atleast)
 
int usage (char *progname)
 
int mainFrameRepaint ()
 
int verifyScanDone (int scn)
 
int insertScan (int scn)
 
int to_monitor (char *buf)
 
int to_rambo (char *buf)
 
int to_exec (char *buf)
 
int do_toggleFixData (char *buf)
 
int show_display ()
 
int checkIgnoreScans (int v, float s)
 
int loadFile (int *be, int *modeid)
 
int showDisplay ()
 
int main_loop ()
 
int processEvent (struct XGR_ *s)
 
int set_sock_callback (int(*call)())
 
int synchronize (int v)
 
XImage * createXimage (Display *display, int w, int h, int depth)
 
int determine_min_max (float *ydata, int dl, float scan)
 
int freeDataPointers ()
 
int displaySingleOtfSpectra ()
 
int getNumSpectra (float datalen, float noint)
 
int displayArrayGraph (float xb, float xe, float yb, float ye)
 
int displaySingleChan (float xb, float xe, float yb, float ye)
 
int stuffOtf (int plot, int *indxX, float *xArray, float *yArray)
 
int do_otf (struct HEADER *head)
 
int do_linetotalmapoff ()
 
int do_lineotf ()
 
int do_linedefault ()
 
int subtractPredictedRA (float *data)
 
int scaleData (float *data)
 
int lsqfit (x, y, int bdata, int ndata, sig, int mwt,*a,*b,*siga,*sigb,*chi2,*q)
 

Variables

float globalStart
 
int(* sock_callback )() = NULL
 
char inMsg [16384]
 
struct SOCK * master
 
struct SOCK * helper
 
struct SOCK * xgraphic
 
struct SOCK * specplot
 
int datalen = 0
 
int manualInitials = 0
 
int manualVersion = 0
 
int thisIsaRefresh = 0
 
int initialsChanged = 0
 
int printDataLines = 0
 
int useFixData = 0
 
int version = 1
 
int debug = 0
 
int zerodata = 0
 
float datamax
 
float datamin
 
float scanNum = -1.0
 
char initials [256]
 
char source [SRCLEN+1]
 
char oldBuf [16384]
 
char tempBuf [16384]
 
char prgName [80]
 
char errBuf [512]
 
char manInitials [80]
 
char localHost [80]
 
char deadServer [80]
 
char saveBuf [16384]
 
char manVersion [80]
 
char mainFrameTitle [80]
 
char tailFileName [80]
 
char datadir [128]
 
char fixeddir [128]
 
char _3ddir [128]
 
int scansDone [100]
 
int scansDoneInx = 0
 
int scanDone = 0
 
struct HEADER onhead
 
struct HEADER offhead
 
struct HEADER gainshead
 
float * ondata
 
float * offdata
 
float * gainsdata
 
int _Xdebug
 
int fitFail = 0
 
int doNotSaveConfig = 0
 
int noPlot
 
int noYTick
 
int noXTick
 
struct XGR_HEAD xgr_head
 
struct XGR_ * server
 
struct OTF_STRUCT otf
 
struct SPECDATA sd
 
int PID
 
long frame_mask = KeyPressMask | ExposureMask | StructureNotifyMask
 
int istty
 
int globalUsPixmap = 1
 
struct MAIL_PARSE parse_table []
 
struct STURCT_KEYSYMS keysyms []
 

Macro Definition Documentation

#define DATASPREAD   0.000001

Definition at line 32 of file specdata.c.

#define FALSE   0

Definition at line 31 of file specdata.c.

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

Definition at line 152 of file specdata.c.

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

Definition at line 2007 of file specdata.c.

#define TRUE   1

Definition at line 30 of file specdata.c.

#define WINDOW_OTF   2

Definition at line 721 of file specdata.c.

#define WINDOW_PLOT   1

Definition at line 720 of file specdata.c.

Function Documentation

int argmatch ( char *  s1,
char *  s2,
int  atleast 
)

Definition at line 873 of file specdata.c.

int checkIgnoreScans ( int  v,
float  s 
)

Definition at line 1004 of file specdata.c.

struct WINDOW* createWindow ( struct XGR_ *  s,
char *  title,
int  cw,
int  ch,
int  xpos,
int  ypos,
int  bg,
int  usPixmap,
int  which 
)

Definition at line 725 of file specdata.c.

int createWindows ( struct XGR_ *  s,
char *  title,
int  cw,
int  ch,
int  xpos,
int  ypos,
int  bg,
int  usPixmap 
)

Definition at line 835 of file specdata.c.

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

Definition at line 1319 of file specdata.c.

int determine_min_max ( float *  ydata,
int  dl,
float  scan 
)

Definition at line 1356 of file specdata.c.

int displayArrayGraph ( float  xb,
float  xe,
float  yb,
float  ye 
)

Definition at line 1517 of file specdata.c.

int displaySingleChan ( float  xb,
float  xe,
float  yb,
float  ye 
)

Definition at line 1626 of file specdata.c.

int displaySingleOtfSpectra ( void  )

Definition at line 1419 of file specdata.c.

int do_help ( char *  buf)

Definition at line 233 of file specdata.c.

int do_linedefault ( void  )

Definition at line 1948 of file specdata.c.

int do_lineotf ( void  )

Definition at line 1933 of file specdata.c.

int do_linetotalmapoff ( void  )

Definition at line 1922 of file specdata.c.

int do_otf ( struct HEADER *  head)

Definition at line 1785 of file specdata.c.

int do_quit ( void  )

Definition at line 277 of file specdata.c.

int do_toggleFixData ( char *  buf)

Definition at line 979 of file specdata.c.

int dummieEventProc ( XEvent *  event)

Definition at line 697 of file specdata.c.

int exitProc ( int  status)

Definition at line 684 of file specdata.c.

int freeDataPointers ( void  )

Definition at line 1390 of file specdata.c.

int getNumSpectra ( float  datalen,
float  noint 
)

Definition at line 1505 of file specdata.c.

int insertScan ( int  scn)

Definition at line 940 of file specdata.c.

int insque ( )
int loadFile ( int *  be,
int *  modeid 
)

Definition at line 1012 of file specdata.c.

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

Definition at line 2009 of file specdata.c.

int main ( int  argc,
argv   
)

Definition at line 508 of file specdata.c.

int main_loop ( void  )

Definition at line 1129 of file specdata.c.

int mainFrameRepaint ( void  )

Definition at line 907 of file specdata.c.

int myErrorHandler ( Display *  display,
XErrorEvent *  myerr 
)

Definition at line 646 of file specdata.c.

int myIOErrorHandler ( Display *  display,
XErrorEvent *  myerr 
)

Definition at line 627 of file specdata.c.

int otfInit ( void  )

Definition at line 424 of file specdata.c.

int parseMail ( char *  buf)

Definition at line 389 of file specdata.c.

int printKeySymHelp ( void  )

Definition at line 185 of file specdata.c.

int processEvent ( struct XGR_ *  s)

Definition at line 1190 of file specdata.c.

int readMail ( char *  buf,
int  len 
)

Definition at line 342 of file specdata.c.

int remque ( )
int scaleData ( float *  data)

Definition at line 1991 of file specdata.c.

int set_sock_callback ( int (*)()  call)

Definition at line 1291 of file specdata.c.

int show_display ( void  )

Definition at line 993 of file specdata.c.

int showDisplay ( void  )

Definition at line 1088 of file specdata.c.

void signalHandler ( void  )

Definition at line 664 of file specdata.c.

int stuffOtf ( int  plot,
int *  indxX,
float *  xArray,
float *  yArray 
)

Definition at line 1714 of file specdata.c.

int subtractPredictedRA ( float *  data)

Definition at line 1959 of file specdata.c.

int synchronize ( int  v)

Definition at line 1301 of file specdata.c.

int to_exec ( char *  buf)

Definition at line 971 of file specdata.c.

int to_helper ( char *  buf)

Definition at line 157 of file specdata.c.

int to_monitor ( char *  buf)

Definition at line 954 of file specdata.c.

int to_rambo ( char *  buf)

Definition at line 963 of file specdata.c.

int to_xgraphic ( char *  buf)

Definition at line 171 of file specdata.c.

int usage ( char *  progname)

Print usages and exit();

Returns
1

Definition at line 891 of file specdata.c.

int verifyScanDone ( int  scn)

Definition at line 918 of file specdata.c.

char* vxstrtok ( char *  string,
char *  last_token,
char *  delim 
)

Definition at line 285 of file specdata.c.

Variable Documentation

char _3ddir[128]

Definition at line 68 of file specdata.c.

int _Xdebug
char datadir[128]

Definition at line 68 of file specdata.c.

int datalen = 0

Definition at line 44 of file specdata.c.

float datamax

Definition at line 57 of file specdata.c.

float datamin

Definition at line 57 of file specdata.c.

char deadServer[80]

Definition at line 68 of file specdata.c.

int debug = 0

Definition at line 53 of file specdata.c.

int doNotSaveConfig = 0

Definition at line 94 of file specdata.c.

char errBuf[512]

Definition at line 68 of file specdata.c.

int fitFail = 0

Definition at line 93 of file specdata.c.

char fixeddir[128]

Definition at line 68 of file specdata.c.

long frame_mask = KeyPressMask | ExposureMask | StructureNotifyMask

Definition at line 107 of file specdata.c.

float* gainsdata

Definition at line 89 of file specdata.c.

struct HEADER gainshead

Definition at line 84 of file specdata.c.

float globalStart

Definition at line 37 of file specdata.c.

int globalUsPixmap = 1

Definition at line 110 of file specdata.c.

struct SOCK * helper

Definition at line 42 of file specdata.c.

char initials[256]

Definition at line 68 of file specdata.c.

int initialsChanged = 0

Definition at line 48 of file specdata.c.

char inMsg[16384]

Definition at line 40 of file specdata.c.

int istty

Definition at line 109 of file specdata.c.

struct STURCT_KEYSYMS keysyms[]
Initial value:
= {
{ XK_q, 1, "q", "Quit Program" },
{ XK_p, 1, "<control> + p", "Screen Capture Window" }
}

Definition at line 147 of file specdata.c.

char localHost[80]

Definition at line 68 of file specdata.c.

char mainFrameTitle[80]

Definition at line 68 of file specdata.c.

char manInitials[80]

Definition at line 68 of file specdata.c.

int manualInitials = 0

Definition at line 45 of file specdata.c.

int manualVersion = 0

Definition at line 46 of file specdata.c.

char manVersion[80]

Definition at line 68 of file specdata.c.

struct SOCK* master

Definition at line 42 of file specdata.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.

float* offdata

Definition at line 87 of file specdata.c.

struct HEADER offhead

Definition at line 83 of file specdata.c.

char oldBuf[16384]

Definition at line 68 of file specdata.c.

float* ondata

Definition at line 86 of file specdata.c.

struct HEADER onhead

Definition at line 82 of file specdata.c.

struct OTF_STRUCT otf

Definition at line 100 of file specdata.c.

struct MAIL_PARSE parse_table[]
Initial value:
= {
{ "help", 0, 0, 0, 0, NULL, NULL, 4, do_help, "Displays this list"},
{ "quit", 0, 0, 0, 0, NULL, NULL, 4, do_quit, "Exit program"},
{ NULL, 0, 0, 0, 0, NULL, NULL, 0, (void *)0, NULL }
}
int do_help(char *buf)
Definition: mailparse.c:419
int do_quit(void)
Definition: mailparse.c:384

Definition at line 130 of file specdata.c.

int PID

Definition at line 104 of file specdata.c.

char prgName[80]

Definition at line 68 of file specdata.c.

int printDataLines = 0

Definition at line 49 of file specdata.c.

char saveBuf[16384]

Definition at line 68 of file specdata.c.

int scanDone = 0

Definition at line 78 of file specdata.c.

float scanNum = -1.0

Definition at line 59 of file specdata.c.

int scansDone[100]

Definition at line 76 of file specdata.c.

int scansDoneInx = 0

Definition at line 77 of file specdata.c.

struct SPECDATA sd

Definition at line 102 of file specdata.c.

struct XGR_* server

Definition at line 98 of file specdata.c.

int(* sock_callback)() = NULL

Definition at line 39 of file specdata.c.

char source[SRCLEN+1]

Definition at line 68 of file specdata.c.

struct SOCK * specplot

Definition at line 42 of file specdata.c.

char tailFileName[80]

Definition at line 68 of file specdata.c.

char tempBuf[16384]

Definition at line 68 of file specdata.c.

int thisIsaRefresh = 0

Definition at line 47 of file specdata.c.

int useFixData = 0

Definition at line 50 of file specdata.c.

int version = 1

Definition at line 51 of file specdata.c.

struct XGR_HEAD xgr_head

Definition at line 36 of file xgr.c.

struct SOCK * xgraphic

Definition at line 42 of file specdata.c.

int zerodata = 0

Definition at line 54 of file specdata.c.