IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42385


Ignore:
Timestamp:
Feb 8, 2023, 12:11:27 PM (3 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20220316. add fpcamera, add option in ppSim to define reference catalog, add allow-multiple-definition in gcc, simtest improvements

Location:
trunk
Files:
1 deleted
10 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r41296 r42385  
    25752575      REFERENCES stackExternalCamera(ext_camera_id)
    25762576) ENGINE=innodb DEFAULT CHARSET=latin1;
     2577
     2578-- EAM 2022.05.09 : adding fpcamRun, fpcamProcessedExp
     2579
     2580CREATE TABLE fpcamRun (
     2581    fpcam_id      BIGINT AUTO_INCREMENT,
     2582    cam_id        BIGINT,
     2583    chip_id       BIGINT,
     2584    state         VARCHAR(64),
     2585    workdir       VARCHAR(255),
     2586    workdir_state VARCHAR(64),
     2587    label         VARCHAR(64),
     2588    data_group    VARCHAR(64),
     2589    dist_group    VARCHAR(64),
     2590    reduction     VARCHAR(64),
     2591    dvodb         VARCHAR(255),
     2592    software_ver  VARCHAR(16),
     2593    note          VARCHAR(255),
     2594    PRIMARY KEY(fpcam_id),
     2595    KEY(cam_id),
     2596    KEY(chip_id),
     2597    KEY(state),
     2598    KEY(label),
     2599    INDEX(chip_id, cam_id),
     2600    FOREIGN KEY (cam_id) REFERENCES camRun(cam_id),
     2601    FOREIGN KEY (chip_id) REFERENCES chipRun(chip_id))
     2602ENGINE=innodb DEFAULT CHARSET=latin1;
     2603
     2604CREATE TABLE fpcamProcessedExp (
     2605    fpcam_id     BIGINT,
     2606    path_base    VARCHAR(255),
     2607
     2608    zpt_obs      FLOAT,
     2609    zpt_stdev    FLOAT,
     2610    zpt_lq       FLOAT,
     2611    zpt_uq       FLOAT,
     2612
     2613    dtime_script FLOAT,
     2614
     2615    hostname     VARCHAR(64),
     2616    n_stars      INT,
     2617    fault        SMALLINT NOT NULL,
     2618    epoch        TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
     2619
     2620    software_ver VARCHAR(16),
     2621
     2622    deteff_obs   FLOAT,
     2623    deteff_err   FLOAT,
     2624    deteff_lq    FLOAT,
     2625    deteff_uq    FLOAT,
     2626
     2627    quality      SMALLINT
     2628
     2629    PRIMARY KEY(fpcam_id),
     2630    KEY(fault),
     2631    FOREIGN KEY (fpcam_id) REFERENCES fpcamRun(fpcam_id),
     2632) ENGINE=innodb DEFAULT CHARSET=latin1;
     2633
  • trunk/dbconfig/ipp.m4

    r36507 r42385  
    4242include(ff.md)
    4343include(remote.md)
     44include(fpcam.md)
  • trunk/extsrc/gpcsw/gpcsrc/Make.Common

    r34800 r42385  
    163163CCWARN   = -Wall -Wstrict-prototypes # -Wshadow
    164164CFLAGS   = $(CCDEBUG) $(EXTRA_CFLAGS) $(CCWARN) $(CCDEFS) $(CCINCS) $(CCHACKS)
    165 LDFLAGS  = $(CCDEBUG) $(EXTRA_CFLAGS) $(CCLIBS)
     165LDFLAGS  = $(CCDEBUG) $(EXTRA_CFLAGS) $(CCLIBS) -Wl,--allow-multiple-definition
    166166CXXFLAGS = $(subst -Wstrict-prototypes,,$(CFLAGS))
    167167ARFLAGS  = -rc
  • trunk/extsrc/gpcsw/gpcsrc/fits/libfh

    • Property svn:ignore
      •  

        old new  
        11obj
         2fh_registry.asm
  • trunk/ippTasks/Makefile.am

    r36852 r42385  
    5050        bg.regeneration.pro \
    5151        remote.pro \
     52        fpcamera.pro \
    5253        fullforce.pro
    5354
  • trunk/ippTasks/automate.pro

    r24189 r42385  
    1717# DONE (action finished)
    1818
     19macro automate.status
     20
     21  ## Pull out the ones that are to be run regularly
     22  local npages
     23  book npages automate -var npages
     24  for i 0 $npages
     25    book getpage automate $i -var pageName
     26    echo $i : $pageName
     27    book getword automate $pageName pantaskState -var myState
     28    if ("$myState" != "NULL")
     29      echo $pageName : $myState
     30    end
     31  end
     32end
     33
    1934macro automate.reset
    2035  ## probably should not always init
     
    2742    break
    2843  end
    29   queueload tmp -x "cat $MODULES:0/$1"
     44
     45  file $1 isFound
     46  if ($isFound)
     47    queueload tmp -x "cat $1"
     48  else
     49    # search module path list for existing file
     50    queueload tmp -x "cat $MODULES:0/$1"
     51  end
    3052
    3153  pwd -var cwd
     54  $username = `whoami`
    3255
    3356  ## interpolate standard values
     
    3558  queuesubstr tmp @DBNAME@ $3
    3659  queuesubstr tmp @CWD@ $cwd
    37 
    38   $username = `whoami`
    3960  queuesubstr tmp @USER@ $username
    4061
  • trunk/ippTasks/simtest.pro

    r28767 r42385  
    6666  if (("$init" == "new") || ("$init" == "inject")) 
    6767    # XXX this will fail and exit the script if the db does not exist or is old...
     68    # XXX this step is too dangerous and was eliminated
    6869    exec pxadmin -delete -dbname $dbname
    6970
    7071    # XXX this gives warnings if the db exists...
     72    # XXX this step is too dangerous and was eliminated
    7173    exec pxadmin -create -dbname $dbname
    7274
     
    7476      # the labels "wait" and "proc" are special names used in automate.pro
    7577   
    76       $ppsim = "ppSimSequence $MODULES:0/$SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path $SIMTEST_RAWDIR -workdir $SIMTEST_WORKDIR -dbname $dbname -label wait -dvodb DVO -tess_id TESS"
     78      # make a reference database
     79      mkref refcat 10
     80
     81      $ppsim = "ppSimSequence $SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path $SIMTEST_RAWDIR -workdir $SIMTEST_WORKDIR -dbname $dbname -label wait -dvodb DVO -tess_id TESS -refcat refcat.catdir"
    7782      if ("$PPSIM_RECIPE" != "default")
    7883         $ppsim = $ppsim -ppsim_recipe $PPSIM_RECIPE
     
    101106  module automate.pro
    102107
    103   module.tasks
    104 
    105   add.label proc
     108  module chip.pro
     109  module camera.pro
     110  module register.pro
     111  # module.tasks
     112
     113  # XXX consolidate design of label / state / ?? for processing sequences
     114  add.label simtest
    106115
    107116  if ($SIMTEST_THREADS == 0)
     
    115124  automate.load $SIMTEST_AUTO $SIMTEST_CAMERA $dbname
    116125
    117   tasks.revert.off
     126  # tasks.revert.off
    118127
    119128  run
     
    159168  $SIMTEST_AUTO = simtest.flatcorr.auto
    160169end
     170
     171# basic options for the these images (filter, location, obstype)
     172$BaseOptions = -type OBJECT -filter r -skymags 20.86 -ra 270.70 -dec -23.70 -pa 0.0
     173$BaseOptions = $BaseOptions -Df PSASTRO:DVO.GETSTAR.MAX.RHO 50000.0
     174$BaseOptions = $BaseOptions -nx 2500 -ny 2500
     175
     176# options for the reference image
     177$RefOptions = $BaseOptions -exptime 100.0 -seeing 1.0
     178$RefOptions = $RefOptions -D PSF.MODEL PS_MODEL_GAUSS
     179$RefOptions = $RefOptions -Df STARS.SIGMA.LIM 0.5
     180$RefOptions = $RefOptions -Db PSF.CONVOLVE T
     181
     182# create a reference database of fake stars to be used by ppSim below
     183macro mkref
     184  if ($0 != 3)
     185    echo "mkref (refbase) (density)"
     186    break
     187  end
     188
     189  local refbase
     190  $refbase = $1
     191
     192  exec rm -rf $refbase.catdir
     193  exec rm -f $refbase.fits
     194 
     195  $RefOptions = $RefOptions -Df STARS.DENSITY $2
     196
     197  # create an image with fake sources and insert the resulting cmf file into a dvodb
     198  $RefConfig = -camera SIMTEST -recipe PPSIM STACKTEST.MAKE -D PSASTRO:PSASTRO.CATDIR $refbase.catdir
     199
     200  exec ppSim $RefOptions $RefConfig $refbase
     201 
     202  file synth.photcodes found
     203  if (not($found))
     204    echo "making photcodes file"
     205    mkphotcodes synth.photcodes
     206  end
     207
     208  exec addstar -D CAMERA simtest -D CATDIR $refbase.catdir -accept-astrom -photcode SYNTH.r -D PHOTCODE_FILE synth.photcodes $refbase.cmf -quick-airmass
     209  exec relphot -averages -D CATDIR $refbase.catdir -update -region 260 280 -33 -13
     210end
     211
     212# if we run this test as a stand-alone program somewhere, we may need to create a local copy of the photcode file:
     213macro mkphotcodes
     214  if ($0 != 2)
     215    echo "USAGE: mkphotcodes (filename)"
     216    break
     217  end
     218
     219  exec /bin/rm -f $1
     220  output $1
     221  echo "#                                           airmass      color                         astrometry  mag    photom  astrom mask    photom mask"
     222  echo "# code  name                type    zero  slope offset c1    c2   slope   zero  equiv  sys scale   scale  sys     poor   bad     poor   bad"
     223  echo "  1     g_SYNTH              sec   0.000  0.000 0.000     1     3 0.0000     0    21   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     224  echo "  2     r_SYNTH              sec   0.000  0.000 0.000     2     3 0.0000     0    22   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     225  echo "  3     i_SYNTH              sec   0.000  0.000 0.000     2     3 0.0000     0    23   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     226  echo "  4     z_SYNTH              sec   0.000  0.000 0.000     3     4 0.0000     0    24   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     227  echo "  5     y_SYNTH              sec   0.000  0.000 0.000     4     5 0.0000     0    25   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     228  echo "  3001  SYNTH.g              ref   0.000  0.000 0.000     -     - 0.0000     0     1   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     229  echo "  3002  SYNTH.r              ref   0.000  0.000 0.000     -     - 0.0000     0     2   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     230  echo "  3003  SYNTH.i              ref   0.000  0.000 0.000     -     - 0.0000     0     3   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     231  echo "  3004  SYNTH.z              ref   0.000  0.000 0.000     -     - 0.0000     0     4   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     232  echo "  3005  SYNTH.y              ref   0.000  0.000 0.000     -     - 0.0000     0     5   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
     233  output stdout
     234end
     235
  • trunk/ppSim/src/ppSimSequence.c

    r27967 r42385  
    4848        psArgumentRemove(argNum, &argc, argv);
    4949        ppsim_recipe = psStringCopy (argv[argNum]);
     50        psArgumentRemove(argNum, &argc, argv);
     51    }
     52
     53    char *refcat = NULL;
     54    if ((argNum = psArgumentGet (argc, argv, "-refcat"))) {
     55        psArgumentRemove(argNum, &argc, argv);
     56        refcat = psStringCopy (argv[argNum]);
    5057        psArgumentRemove(argNum, &argc, argv);
    5158    }
     
    96103        fprintf (stderr, " -label (label)\n");
    97104        fprintf (stderr, " -dvodb (dvodb)\n");
     105        fprintf (stderr, " -refcat (catdir)\n");
    98106        fprintf (stderr, " -tess_id (tess_id)\n");
    99107        exit (2);
     
    242250        }
    243251        if (!strcasecmp (type, "OBJECT")) {
    244             ppSimSequenceObject (simfile, inject, sequence, i, rng, path, basename, ppSimCommandReal, injectCommandReal, files);
     252            ppSimSequenceObject (simfile, inject, sequence, i, rng, path, basename, refcat, ppSimCommandReal, injectCommandReal, files);
    245253            psFree (injectCommandReal);
    246254            psFree (ppSimCommandReal);
  • trunk/ppSim/src/ppSimSequence.h

    r27967 r42385  
    1515bool ppSimSequenceDark   (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand, psArray *files);
    1616bool ppSimSequenceFlat   (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand, psArray *files);
    17 bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand, psArray *files);
     17bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *refcat, const char *ppSimCommand, const char *injectCommand, psArray *files);
    1818
    1919#endif
  • trunk/ppSim/src/ppSimSequenceObject.c

    r27967 r42385  
    11# include "ppSimSequence.h"
    22
    3 bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand, psArray *files) {
     3bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *refcat, const char *ppSimCommand, const char *injectCommand, psArray *files) {
    44
    55    bool status;
     
    9797                            psStringAppend (&command, " -obs_mode OBJECT.%s", (char *) filters->data[i]);
    9898
     99                            if (refcat) { psStringAppend (&command, " -D PSASTRO:PSASTRO.CATDIR %s", refcat); }
     100
    99101                            double frnd = psRandomUniform(rng);
    100102                            float seeing = IQmin + (IQmax - IQmin)*frnd;
Note: See TracChangeset for help on using the changeset viewer.