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

Go to the source code of this file.

Macros

#define MAX_DATA_CHANNELS   8192
 

Functions

int setVerbose ()
 
int validate (int which)
 
int replot (int how)
 
int doPaperSize ()
 
int makeFileName (char *fname, int pid)
 
int suggestFileName ()
 
int printPlot ()
 
int xx ()
 
int tellOndata ()
 
int doSysCmd ()
 
int quitProg ()
 
int plotAccum ()
 
int printScan (struct HEADER *p, int nsave)
 
int tellAll ()
 
int tellAllSfocus ()
 
int tellAllSpec5 ()
 
int backendMatch (struct HEADER *h)
 
int listScans ()
 
int usage (char *name)
 
int printTimeStamp ()
 
int about ()
 
int setPrompt ()
 
int main (int argc, argv)
 
int pruneFile ()
 
int setSockets ()
 
int parseMouseValues (double x1, double x2, double y1, double y2)
 
int getResponse (int which)
 
int sendCancel ()
 
int doCCur ()
 
int _doCCur (char *msg)
 
int doGetMapAngle ()
 
int doFCur ()
 
int _doFCur (char *msg)
 
int doVCur ()
 
int _doVCur (char *msg)
 
int doTCur ()
 
int _doTCur (char *msg)
 
int doPageCmd ()
 
int doDumpScans ()
 
int doDumpGains ()
 
int doCheckFile ()
 
int doCheckSdd ()
 
int lp_fcmp (double first, double second, double delta)
 
int doAutoScale ()
 
int setLogPlot ()
 
int setLinPlot ()
 
double restFreq (struct HEADER *h)
 
int refreshPlot ()
 
int getPlotExtents ()
 
int sendXgraphic ()
 
int helperWait ()
 
int helperBinaryWait ()
 
int doSleep ()
 
int doPause ()
 
int showID ()
 
int doAttach ()
 
int doGReview ()
 
int doPGUI ()
 
int writeIRC_Record ()
 
int recordTests ()
 
int doSay ()
 
int doSelPrint ()
 
int doCodeView ()
 
int doTCSH ()
 
int doXwatch ()
 
int doLogWatch ()
 
int doDone ()
 
int doStop ()
 
int doVi ()
 
int doMv ()
 
int doCP ()
 
int doCopyRaw ()
 
int xdelay (int d)
 

Variables

struct DS_IMAGE_INFO ds_image_info
 
tcflag_t old_lflag
 
cc_t old_vtime
 
struct termios term
 
FILE * fp
 
FILE * errPrint_fp = NULL
 
struct ENVIRONMENT * env
 
struct HEADER * sa = NULL
 
struct XGRAPHIC_SEND xsend
 
struct SOCK * helper
 
struct SOCK * monitorSock
 
struct SOCK * xgraphic
 
struct SOCK * dataserv
 
int logging = 0
 
int last_valid = 0
 
int onlineversion = 0
 
int verboseLevel = 0
 
int doNotRemoveLockFile = 0
 
int max_calibrators = 0
 
int xfd = 0
 
int hfd = 0
 
int dfd = 0
 
int printNsave = 0
 
int site = 0
 
int lp_logging = 0
 
int lp_ppid = 0
 
int history_already_written = 0
 
int no_terminal = 0
 
char savedCaptureName [256]
 

Macro Definition Documentation

#define MAX_DATA_CHANNELS   8192

Definition at line 61 of file linuxpops.c.

Function Documentation

int _doCCur ( char *  msg)

Tell the xgraphics program to send the next mouse click
(internal version)

Returns
0

Definition at line 2411 of file linuxpops.c.

int _doFCur ( char *  msg)

Tell the xgraphics program to send the next mouse click
(internal version)

Returns
0

Definition at line 2493 of file linuxpops.c.

int _doTCur ( char *  msg)

Tell the xgraphics program to send the next mouse click
(internal version)

Returns
0

Definition at line 2580 of file linuxpops.c.

int _doVCur ( char *  msg)

Tell the xgraphics program to send the next mouse click
(internal version)

Returns
0

Definition at line 2537 of file linuxpops.c.

int about ( void  )

Print the kernal version and version numbers

Returns
0

Definition at line 1510 of file linuxpops.c.

int backendMatch ( struct HEADER *  h)

Check to see if passed header backend matches the criteria

Parameters
hstruct HEADER::
Returns
1 if it's a match
0 otherwise

Definition at line 1033 of file linuxpops.c.

int doAttach ( void  )

Definition at line 3117 of file linuxpops.c.

int doAutoScale ( void  )

Frees both plotting axis

Returns
0

Definition at line 2788 of file linuxpops.c.

int doCCur ( void  )

Command line version

Returns
0

Definition at line 2398 of file linuxpops.c.

int doCheckFile ( void  )

Execute the external program 'checkfile'

Returns
0

Definition at line 2722 of file linuxpops.c.

int doCheckSdd ( void  )

Execute the external program 'check_sdd'

Returns
0

Definition at line 2750 of file linuxpops.c.

int doCodeView ( void  )

Definition at line 3332 of file linuxpops.c.

int doCopyRaw ( void  )

Definition at line 3523 of file linuxpops.c.

int doCP ( void  )

Definition at line 3497 of file linuxpops.c.

int doDone ( void  )

Definition at line 3430 of file linuxpops.c.

int doDumpGains ( void  )

Execute the external program 'dumpscans' on Gains file

Returns
0

Definition at line 2655 of file linuxpops.c.

int doDumpScans ( void  )

Execute the external program 'dumpscans' on data file

Returns
0

Definition at line 2628 of file linuxpops.c.

int doFCur ( void  )

Command line version

Returns
0

Definition at line 2480 of file linuxpops.c.

int doGetMapAngle ( void  )

Tell the xgraphics program to send the map_angle

Returns
0

Not all versions of gnuplot have these variables Need to resolve how to tell this via gnuplot versions.

Definition at line 2448 of file linuxpops.c.

int doGReview ( void  )

Definition at line 3138 of file linuxpops.c.

int doLogWatch ( void  )

Definition at line 3405 of file linuxpops.c.

int doMv ( void  )

Definition at line 3471 of file linuxpops.c.

int doPageCmd ( void  )

Tell the xgraphics program to clear the display

Returns
0

Definition at line 2611 of file linuxpops.c.

int doPaperSize ( void  )

Definition at line 218 of file linuxpops.c.

int doPause ( void  )

Pause the program until the user hits a key

Returns
key pressed

Definition at line 3093 of file linuxpops.c.

int doPGUI ( void  )

Definition at line 3148 of file linuxpops.c.

int doSay ( void  )

Definition at line 3250 of file linuxpops.c.

int doSelPrint ( void  )

Definition at line 3283 of file linuxpops.c.

int doSleep ( void  )

Sleep for the designated number of seconds

Returns
0

Definition at line 3069 of file linuxpops.c.

int doStop ( void  )

Definition at line 3439 of file linuxpops.c.

int doSysCmd ( void  )

Perform an arbitrary system command

Returns
results from 'system' command

Definition at line 642 of file linuxpops.c.

int doTCSH ( void  )

Definition at line 3374 of file linuxpops.c.

int doTCur ( void  )

Command line version

Returns
0

Definition at line 2567 of file linuxpops.c.

int doVCur ( void  )

Command line version

Returns
0

Definition at line 2524 of file linuxpops.c.

int doVi ( void  )

Definition at line 3451 of file linuxpops.c.

int doXwatch ( void  )

Definition at line 3382 of file linuxpops.c.

int getPlotExtents ( void  )

Tell the xgraphics program to return plot extents of the display \returns 0

Definition at line 2896 of file linuxpops.c.

int getResponse ( int  which)

Get a response from XGRAPHIC
Will wait a bit on response from xgraphic

Returns
0 on success
1 on timeout

Definition at line 2287 of file linuxpops.c.

int helperBinaryWait ( void  )

Definition at line 3020 of file linuxpops.c.

int helperWait ( void  )

Definition at line 2959 of file linuxpops.c.

int listScans ( void  )

List all scans that match the search criteria

Returns
0 if all OK
1 if there is a problem

Definition at line 1124 of file linuxpops.c.

int lp_fcmp ( double  first,
double  second,
double  delta 
)

Compare two doubles

Returns
0 if < than delta
1 if > than delta

Definition at line 2768 of file linuxpops.c.

int main ( int  argc,
argv   
)

Main function

Returns
0 if a good exit
1 if there is a problem

Definition at line 1565 of file linuxpops.c.

int makeFileName ( char *  fname,
int  pid 
)

Definition at line 273 of file linuxpops.c.

int parseMouseValues ( double  x1,
double  x2,
double  y1,
double  y2 
)

Take the 4 mouse positions and convert to Freq, Vel, Channel and Temp
Set the ENVIRONMENT:: variables tcur, vcur, fcur & ccur

Returns
0

Definition at line 2154 of file linuxpops.c.

int plotAccum ( void  )

No longer used function

Returns
0

Definition at line 711 of file linuxpops.c.

int printPlot ( void  )

Make a hardcopy of the current plot
possible params: 'capture' for a PDF file

Returns
0

Definition at line 385 of file linuxpops.c.

int printScan ( struct HEADER *  p,
int  nsave 
)

Print a one line recap of the selected scan

Parameters
pstruct HEADER::
nsaveflag to use nsave vs scanno;
Returns
0

Definition at line 725 of file linuxpops.c.

int printTimeStamp ( void  )

Prints the current system time

Returns
0

Definition at line 1498 of file linuxpops.c.

int pruneFile ( void  )

Make an artificial data file based on the search criteria

Returns
0 success
1 on missing filname of error

Definition at line 2045 of file linuxpops.c.

int quitProg ( void  )

Exit the program under user control

Returns
0

Definition at line 668 of file linuxpops.c.

int recordTests ( void  )

Definition at line 3212 of file linuxpops.c.

int refreshPlot ( void  )

Tell the xgraphics program to replot the display \returns 0

Definition at line 2882 of file linuxpops.c.

int replot ( int  how)

replot the last plot

Parameters
howi.e gui or postscript
Returns
0

Definition at line 179 of file linuxpops.c.

double restFreq ( struct HEADER *  h)

This function returns the proper freq based on date of recording;
Kitt Peak still has not been corrected Feb 11, 2016: twf:
I corrected the headers at the SMT to properly fill in the
rest and sky frequencies. Prior to that the rest freq was
located in the obsfreq slot for continuum.

Returns
restfreq

Definition at line 2837 of file linuxpops.c.

int sendCancel ( void  )

Definition at line 2386 of file linuxpops.c.

int sendXgraphic ( void  )

Definition at line 2917 of file linuxpops.c.

int setLinPlot ( void  )

Set Y-Axis to Linear Scale

Returns
0

Definition at line 2821 of file linuxpops.c.

int setLogPlot ( void  )

Set Y-Axis to 10 * log10(y/peak)

Returns
0

Definition at line 2802 of file linuxpops.c.

int setPrompt ( void  )

Set the prompt to reflect if we are in line, condar or OTF.
If in line, also show the 'holder' number

Returns
0

Definition at line 1532 of file linuxpops.c.

int setSockets ( void  )

Turn sockets on: default condition

Returns
0

Definition at line 2125 of file linuxpops.c.

int setVerbose ( void  )

Set the Verbose level of an interactive session.

Possible levels:
Levels: 1 Verbose for Parsing Info
2 Verbose for Auto Tau Calculations
4 Verbose for Critiria Slection
8 Verbose for Xgraphic Activity
16 Verbose for FBOFFSET Routines
32 Verbose for BASELINE Routines
64 Verbose for STATS Routines
128 Verbose for RECURSIVE Info
256 Verbose for Batchfile Info
512 Verbose for Alias Info
1024 Verbose for FileOps Info
2048 Verbose for Grigmap Routines
4096 Verbose for Flag Checking
8192 Verbose for Atm Routines
Returns
0

Definition at line 117 of file linuxpops.c.

int showID ( void  )

Print out some internal configuration info

Returns
0

Definition at line 3107 of file linuxpops.c.

int suggestFileName ( void  )

Definition at line 362 of file linuxpops.c.

int tellAll ( void  )

Print listing of all scans in the datafile

Returns
0

Definition at line 907 of file linuxpops.c.

int tellAllSfocus ( void  )

Print listing of all Spec Focus scans in the datafile

Returns
0

Definition at line 960 of file linuxpops.c.

int tellAllSpec5 ( void  )

Print listing of all Spec Five scans in the datafile

Returns
0

Definition at line 995 of file linuxpops.c.

int tellOndata ( void  )

Display all the scans in the data file

Returns

Definition at line 617 of file linuxpops.c.

int usage ( char *  name)

Print usages and exit();

Returns
1

Definition at line 1473 of file linuxpops.c.

int validate ( int  which)

Need to make this better

Parameters
whichlast plotting mode
Returns
0

Definition at line 164 of file linuxpops.c.

int writeIRC_Record ( void  )

Definition at line 3158 of file linuxpops.c.

int xdelay ( int  d)

Definition at line 3559 of file linuxpops.c.

int xx ( void  )

Shortcut to replot

Returns
0

Definition at line 605 of file linuxpops.c.

Variable Documentation

struct SOCK * dataserv

Definition at line 75 of file linuxpops.c.

int dfd = 0

Definition at line 85 of file linuxpops.c.

int doNotRemoveLockFile = 0

Definition at line 81 of file linuxpops.c.

struct DS_IMAGE_INFO ds_image_info

Definition at line 64 of file linuxpops.c.

struct ENVIRONMENT* env

Definition at line 71 of file linuxpops.c.

FILE * errPrint_fp = NULL

Definition at line 70 of file linuxpops.c.

FILE* fp

Definition at line 70 of file linuxpops.c.

struct SOCK* helper

Definition at line 75 of file linuxpops.c.

int hfd = 0

Definition at line 84 of file linuxpops.c.

int history_already_written = 0

Definition at line 90 of file linuxpops.c.

int last_valid = 0

Definition at line 78 of file linuxpops.c.

int logging = 0

Definition at line 77 of file linuxpops.c.

int lp_logging = 0

Definition at line 88 of file linuxpops.c.

int lp_ppid = 0

Definition at line 89 of file linuxpops.c.

int max_calibrators = 0

Definition at line 82 of file linuxpops.c.

struct SOCK * monitorSock

Definition at line 75 of file linuxpops.c.

int no_terminal = 0

Definition at line 91 of file linuxpops.c.

tcflag_t old_lflag

Definition at line 66 of file linuxpops.c.

cc_t old_vtime

Definition at line 67 of file linuxpops.c.

int onlineversion = 0

Definition at line 79 of file linuxpops.c.

int printNsave = 0

Definition at line 86 of file linuxpops.c.

struct HEADER* sa = NULL

Definition at line 72 of file linuxpops.c.

char savedCaptureName[256]

Definition at line 93 of file linuxpops.c.

int site = 0

Definition at line 87 of file linuxpops.c.

struct termios term

Definition at line 68 of file linuxpops.c.

int verboseLevel = 0

Definition at line 80 of file linuxpops.c.

int xfd = 0

Definition at line 83 of file linuxpops.c.

struct SOCK * xgraphic

Definition at line 75 of file linuxpops.c.

struct XGRAPHIC_SEND xsend

Definition at line 73 of file linuxpops.c.