Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
spectest.c
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <strings.h>
4 #include <string.h>
5 #include <math.h>
6 
7 #include <X11/Xlib.h>
8 #include <X11/Xutil.h>
9 #include <X11/Xos.h>
10 #include <X11/Xatom.h>
11 #include <X11/keysym.h>
12 
13 #include "header.h"
14 #include "otf.h"
15 #include "caclib_proto.h"
16 
17 
18 struct SPECDATA sd;
19 
20 struct SOCK *specdata;
21 
22 int main(argc, argv)
23 int argc;
24 char *argv[];
25 {
26  double s;
27 
28  if(argc < 2)
29  {
30  fprintf(stderr, "Usage: %s xxxx.xx\n", argv[0]);
31  return(1);
32  }
33 
34  smart_log_open("spectest", 2);
35 
36  sock_bind("ANONYMOUS");
37 
38  specdata = sock_connect("LINUXPOPS_SPECDATA");
39 
40  bzero((char *)&sd, sizeof(sd));
41 
42  strcpy(sd.datafile, "/home/data/ssk/sdd_ffb.ssk_117");
43  strcpy(sd.gainsfile, "/home/data/ssk/gsdd_ffb.ssk_117");
44 
45  s = atof(argv[1]);
46 
47  sd.scanno = (int)s;
48  sd.feed = (int)((s*100.0) - (floor(s)*100.0));
49  sd.singleChan = 256;
50  sd.singleOtfBin = 4;
51  sd.debugSpectra = 0;
52  sd.doTPprocess = 1;
53  sd.arrayNum = 2;
54 
55  log_msg("scan = %d, feed = %d", sd.scanno, sd.feed);
56 
57  sock_write(specdata, (char *)&sd, sizeof(sd));
58 
59  return(0);
60 }
int scanno
Definition: otf.h:64
int main(void)
Definition: gsl_try_2.c:176
int sock_write(struct SOCK *s, char *message, int l)
int debugSpectra
Definition: otf.h:71
char gainsfile[256]
Definition: otf.h:62
int doTPprocess
Definition: otf.h:76
int log_msg(const char *fmt,...)
char datafile[256]
Definition: otf.h:61
struct SOCK * specdata
Definition: dataserv.c:31
Definition: sock.h:30
int smart_log_open(char *name, int offset)
int arrayNum
Definition: otf.h:77
int singleOtfBin
Definition: otf.h:74
Definition: otf.h:58
int singleChan
Definition: otf.h:73
struct BOUND * sock_bind(char *mbname)
struct SOCK * sock_connect(char *mbname)
int feed
Definition: otf.h:65
struct SPECDATA sd
Definition: otf.c:43