IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35103


Ignore:
Timestamp:
Feb 6, 2013, 3:24:03 PM (13 years ago)
Author:
eugene
Message:

add setastrom program (apply koppenhoefer effect correction); add region (and cpt) option to setphot & setposangle

Location:
trunk/Ohana/src/uniphot
Files:
9 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/uniphot/Makefile

    r34749 r35103  
    2323setposangle: $(BIN)/setposangle.$(ARCH)
    2424setposangle_client: $(BIN)/setposangle_client.$(ARCH)
     25setastrom: $(BIN)/setastrom.$(ARCH)
     26setastrom_client: $(BIN)/setastrom_client.$(ARCH)
    2527
    26 install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client $(DESTBIN)/setposangle $(DESTBIN)/setposangle_client
     28install: $(DESTBIN)/uniphot $(DESTBIN)/setfwhm $(DESTBIN)/setphot $(DESTBIN)/setphot_client $(DESTBIN)/setposangle $(DESTBIN)/setposangle_client $(DESTBIN)/setastrom $(DESTBIN)/setastrom_client
    2729
    2830UNIPHOT = \
     
    99101$(BIN)/setposangle_client.$(ARCH): $(SETPOSANGLE_CLIENT)
    100102
     103SETASTROM = \
     104$(SRC)/setastrom.$(ARCH).o          \
     105$(SRC)/initialize_setastrom.$(ARCH).o \
     106$(SRC)/astrom_correction.$(ARCH).o \
     107$(SRC)/update_dvo_setastrom.$(ARCH).o \
     108$(SRC)/update_catalog_setastrom.$(ARCH).o \
     109$(SRC)/SetSignals.$(ARCH).o         \
     110$(SRC)/Shutdown.$(ARCH).o           
     111
     112$(SETASTROM): $(INC)/setastrom.h
     113$(BIN)/setastrom.$(ARCH): $(SETASTROM)
     114
     115SETASTROM_CLIENT = \
     116$(SRC)/setastrom_client.$(ARCH).o           \
     117$(SRC)/update_dvo_setastrom.$(ARCH).o \
     118$(SRC)/update_catalog_setastrom.$(ARCH).o \
     119$(SRC)/astrom_correction.$(ARCH).o \
     120$(SRC)/initialize_setastrom.$(ARCH).o
     121
     122$(SETASTROM_CLIENT): $(INC)/setastrom.h
     123$(BIN)/setastrom_client.$(ARCH): $(SETASTROM_CLIENT)
     124
    101125SETFWHM =                           \
    102126$(SRC)/setfwhm.$(ARCH).o            \
  • trunk/Ohana/src/uniphot/include/setphot.h

    r33963 r35103  
    2525char        *HOSTDIR;
    2626char        *IMAGES;
     27char        *SINGLE_CPT;
    2728int          VERBOSE;
    2829int          RESET;
     
    3435int          PARALLEL_SERIAL;
    3536int          IMAGES_ONLY;
     37
     38SkyRegion    UserPatch;
    3639
    3740/***** prototypes ****/
  • trunk/Ohana/src/uniphot/include/setphot_client.h

    r33654 r35103  
    7878time_t       TSTOP;
    7979PhotCode    *photcode;
     80
     81SkyRegion    UserPatch;
    8082
    8183enum {black, white, red, orange, yellow, green, blue, indigo, violet};
  • trunk/Ohana/src/uniphot/include/setposangle.h

    r34749 r35103  
    2525char        *HOSTDIR;
    2626char        *IMAGES;
     27char        *SINGLE_CPT;
    2728int          VERBOSE;
    2829int          RESET;
     
    3132int          PARALLEL_MANUAL;
    3233int          PARALLEL_SERIAL;
     34
     35SkyRegion    UserPatch;
    3336
    3437/***** prototypes ****/
  • trunk/Ohana/src/uniphot/src/initialize_setphot.c

    r34749 r35103  
    4949  if ((N = get_argument (argc, argv, "-reset"))) {
    5050    RESET = TRUE;
     51    remove_argument (N, &argc, argv);
     52  }
     53
     54  SINGLE_CPT = NULL;
     55  if ((N = get_argument (argc, argv, "-cpt"))) {
     56    remove_argument (N, &argc, argv);
     57    SINGLE_CPT = strcreate (argv[N]);
     58    remove_argument (N, &argc, argv);
     59  }
     60
     61  // region of interest
     62  UserPatch.Rmin = 0;
     63  UserPatch.Rmax = 360;
     64  UserPatch.Dmin = -90;
     65  UserPatch.Dmax = +90;
     66  if ((N = get_argument (argc, argv, "-region"))) {
     67    remove_argument (N, &argc, argv);
     68    UserPatch.Rmin = atof (argv[N]);
     69    remove_argument (N, &argc, argv);
     70    UserPatch.Rmax = atof (argv[N]);
     71    remove_argument (N, &argc, argv);
     72    UserPatch.Dmin = atof (argv[N]);
     73    remove_argument (N, &argc, argv);
     74    UserPatch.Dmax = atof (argv[N]);
    5175    remove_argument (N, &argc, argv);
    5276  }
  • trunk/Ohana/src/uniphot/src/initialize_setphot_client.c

    r34749 r35103  
    3636  if ((N = get_argument (argc, argv, "-reset"))) {
    3737    RESET = TRUE;
     38    remove_argument (N, &argc, argv);
     39  }
     40
     41  // region of interest
     42  UserPatch.Rmin = 0;
     43  UserPatch.Rmax = 360;
     44  UserPatch.Dmin = -90;
     45  UserPatch.Dmax = +90;
     46  if ((N = get_argument (argc, argv, "-region"))) {
     47    remove_argument (N, &argc, argv);
     48    UserPatch.Rmin = atof (argv[N]);
     49    remove_argument (N, &argc, argv);
     50    UserPatch.Rmax = atof (argv[N]);
     51    remove_argument (N, &argc, argv);
     52    UserPatch.Dmin = atof (argv[N]);
     53    remove_argument (N, &argc, argv);
     54    UserPatch.Dmax = atof (argv[N]);
    3855    remove_argument (N, &argc, argv);
    3956  }
  • trunk/Ohana/src/uniphot/src/initialize_setposangle.c

    r34844 r35103  
    5858  // XXX for now, hardwire gpc1 photcodes
    5959
     60  SINGLE_CPT = NULL;
     61  if ((N = get_argument (argc, argv, "-cpt"))) {
     62    remove_argument (N, &argc, argv);
     63    SINGLE_CPT = strcreate (argv[N]);
     64    remove_argument (N, &argc, argv);
     65  }
     66
     67  // region of interest
     68  UserPatch.Rmin = 0;
     69  UserPatch.Rmax = 360;
     70  UserPatch.Dmin = -90;
     71  UserPatch.Dmax = +90;
     72  if ((N = get_argument (argc, argv, "-region"))) {
     73    remove_argument (N, &argc, argv);
     74    UserPatch.Rmin = atof (argv[N]);
     75    remove_argument (N, &argc, argv);
     76    UserPatch.Rmax = atof (argv[N]);
     77    remove_argument (N, &argc, argv);
     78    UserPatch.Dmin = atof (argv[N]);
     79    remove_argument (N, &argc, argv);
     80    UserPatch.Dmax = atof (argv[N]);
     81    remove_argument (N, &argc, argv);
     82  }
     83
    6084  PARALLEL = FALSE;
    6185  if ((N = get_argument (argc, argv, "-parallel"))) {
     
    146170  }
    147171
     172  // region of interest
     173  UserPatch.Rmin = 0;
     174  UserPatch.Rmax = 360;
     175  UserPatch.Dmin = -90;
     176  UserPatch.Dmax = +90;
     177  if ((N = get_argument (argc, argv, "-region"))) {
     178    remove_argument (N, &argc, argv);
     179    UserPatch.Rmin = atof (argv[N]);
     180    remove_argument (N, &argc, argv);
     181    UserPatch.Rmax = atof (argv[N]);
     182    remove_argument (N, &argc, argv);
     183    UserPatch.Dmin = atof (argv[N]);
     184    remove_argument (N, &argc, argv);
     185    UserPatch.Dmax = atof (argv[N]);
     186    remove_argument (N, &argc, argv);
     187  }
     188
    148189  HOST_ID = 0;
    149190  if ((N = get_argument (argc, argv, "-hostID"))) {
  • trunk/Ohana/src/uniphot/src/update_dvo_setphot.c

    r33963 r35103  
    44int update_dvo_setphot (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) {
    55
    6   SkyRegion UserPatch;
    76  SkyTable *sky = NULL;
    87  SkyList *skylist = NULL;
     
    3433
    3534  // determine the populated SkyRegions overlapping the requested area (default depth)
    36   UserPatch.Rmin = 0;
    37   UserPatch.Rmax = 360;
    38   UserPatch.Dmin = -90;
    39   UserPatch.Dmax = +90;
    40   skylist = SkyListByPatch (sky, -1, &UserPatch);
     35  if (SINGLE_CPT) {
     36      skylist = SkyRegionByCPT (sky, SINGLE_CPT);
     37  } else {
     38      skylist = SkyListByPatch (sky, -1, &UserPatch);
     39  }
     40  myAssert (skylist, "ooops!");
    4141
    4242  // update measurements for each populated catalog
     
    110110
    111111    char command[1024];
    112     snprintf (command, 1024, "setphot_client -hostID %d -catdir %s -hostdir %s -images %s",
    113               table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile);
     112    snprintf (command, 1024, "setphot_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",
     113              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile,
     114              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    114115
    115116    fprintf (stderr, "command: %s\n", command);
  • trunk/Ohana/src/uniphot/src/update_dvo_setposangle.c

    r34749 r35103  
    33int update_dvo_setposangle (ImageSubset *image, off_t Nimage) {
    44
    5   SkyRegion UserPatch;
    65  SkyTable *sky = NULL;
    76  SkyList *skylist = NULL;
     
    3635
    3736  // determine the populated SkyRegions overlapping the requested area (default depth)
    38   UserPatch.Rmin = 0;
    39   UserPatch.Rmax = 360;
    40   UserPatch.Dmin = -90;
    41   UserPatch.Dmax = +90;
    42   skylist = SkyListByPatch (sky, -1, &UserPatch);
     37  if (SINGLE_CPT) {
     38      skylist = SkyRegionByCPT (sky, SINGLE_CPT);
     39  } else {
     40      skylist = SkyListByPatch (sky, -1, &UserPatch);
     41  }
     42  myAssert (skylist, "ooops!");
    4343
    4444  // update measurements for each populated catalog
     
    113113
    114114    char command[1024];
    115     snprintf (command, 1024, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s",
    116               table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile);
     115    snprintf (command, 1024, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",
     116              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile,
     117              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    117118
    118119    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.